Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update storybook and stories #2007

Merged
merged 38 commits into from
Sep 1, 2022
Merged

Conversation

SgtPooki
Copy link
Member

Upgrades storybook and all storybook stories

fixes #1982

SgtPooki added 28 commits July 21, 2022 09:04
This addresses the following warning when running `npm run storybook`:

  WARN Storybook support for Create React App is now a separate preset.
  WARN To use the new preset, install `@storybook/preset-create-react-app` and add it to the list of `addons` in your `.storybook/main.js` config file.
  WARN The built-in preset has been disabled in Storybook 6.0.
Resolves the following error:

  Error: NormalModuleFactory.beforeResolve (IgnorePlugin) is no longer a
  waterfall hook, but a bailing hook instead. Do not return the passed
  object, but modify it instead. Returning false will ignore the request
  and results in no module created.
but displays error in built website
* Ran `git ls-files | grep 'stories.js' | xargs -n1 -- npx --yes sb migrate storiesof-to-csf --glob`
* Normalized default stories exports
  * Added jsdoc comment for default exports
  * export default as object literal
* disable default export rule for stories
* enable react/prop-types validation warning
@SgtPooki SgtPooki linked an issue Aug 17, 2022 that may be closed by this pull request
6 tasks
@SgtPooki SgtPooki temporarily deployed to Deploy August 17, 2022 23:23 Inactive
@SgtPooki SgtPooki temporarily deployed to Deploy August 18, 2022 18:38 Inactive
@SgtPooki SgtPooki requested review from hacdias and lidel August 18, 2022 19:00
@hacdias
Copy link
Member

hacdias commented Aug 19, 2022

@SgtPooki I cannot run the storybook. I get the following error:

Error: CSF: unexpected storiesOf call /Users/hacdias/Code/ipfs/ipfs-webui/src/components/radio/Radio.stories.js (line 12, col 0)

Found this issue (storybookjs/storybook#18640) but no more information.

I tried different node versions (16.12.0 and 16.15.0), as well as npm install and npm ci. Did you encounter this error too?

@SgtPooki
Copy link
Member Author

@SgtPooki I cannot run the storybook. I get the following error:

Error: CSF: unexpected storiesOf call /Users/hacdias/Code/ipfs/ipfs-webui/src/components/radio/Radio.stories.js (line 12, col 0)

Found this issue (storybookjs/storybook#18640) but no more information.

I tried different node versions (16.12.0 and 16.15.0), as well as npm install and npm ci. Did you encounter this error too?

There should be no more storiesOf calls. I thought I got rid of all of them.. I will look into it

@SgtPooki
Copy link
Member Author

Looks like there are some remaining storiesOf that must have stuck around after merging from main or something.

╰─ ✔ ❯ git status && rg 'storiesOf' .

On branch 1982-chore-update-storybook
Your branch is up to date with 'origin/1982-chore-update-storybook'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.cache/
	.nyc_output/
	install-missing-deps.md
	npm-install
	pnpm-import.log
	pnpm-lock.yaml
	test-repos.sh

nothing added to commit but untracked files present (use "git add" to track)
./src/components/radio/Radio.stories.js
2:import { storiesOf } from '@storybook/react'
12:storiesOf('Radio', module)

./src/files/modals/publish-modal/PublishModal.stories.js
2:import { storiesOf } from '@storybook/react'
7:storiesOf('Files/Modals', module)

Migrated leftover storiesOf stories with:
`npx @storybook/cli migrate storiesof-to-csf -g '**/(Radio|PublishModal).stories.js'`
@SgtPooki SgtPooki temporarily deployed to Deploy August 26, 2022 19:52 Inactive
@SgtPooki SgtPooki temporarily deployed to Deploy August 29, 2022 17:48 Inactive
Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I checked both the code and the storybook itself.

@SgtPooki SgtPooki merged commit 83ceac1 into main Sep 1, 2022
@SgtPooki SgtPooki deleted the 1982-chore-update-storybook branch September 1, 2022 17:59
ipfs-gui-bot pushed a commit that referenced this pull request Sep 9, 2022
## [2.18.0](v2.17.3...v2.18.0) (2022-09-09)

 CID `bafybeidb5eryh72zajiokdggzo7yct2d6hhcflncji5im2y5w26uuygdsm`

 ---

### Features

* IPNS Publishing ([#1973](#1973)) ([4ff4939](4ff4939))
* ux improvements to publish modal ([#1998](#1998)) ([ea4f632](ea4f632))

### Bug Fixes

* **ci:** parsing "ipfs-cluster-ctl peers ls" output ([#1966](#1966)) ([828e460](828e460))
* korean detection ([#2005](#2005)) ([362dab8](362dab8))
* Kubo agent text to link via ReleaseLink [#2010](#2010) ([#2011](#2011)) ([3d04988](3d04988))
* nodejs readme badges ([#1985](#1985)) ([a9e661b](a9e661b))
* remove web ui version and keep revision ([#2000](#2000)) ([42ed78d](42ed78d))
* resolve issues with automated releases  ([#1974](#1974)) ([9a7cfad](9a7cfad))

### Trivial Changes

* add missing classnames dependency ([#1977](#1977)) ([c4216b8](c4216b8))
* **deps:** update react-scripts ([#1969](#1969)) ([136b260](136b260))
* pull transifex translations ([#1996](#1996)) ([0de4267](0de4267))
* Pull transifex translations ([#2003](#2003)) ([cc51b15](cc51b15))
* **readme:** NodeJS version support info ([#1986](#1986)) ([829450d](829450d))
* **readme:** update release steps ([#1963](#1963)) ([c5b4822](c5b4822))
* Update .github/workflows/stale.yml [skip ci] ([f15818d](f15818d))
* update storybook and stories ([#2007](#2007)) ([83ceac1](83ceac1)), closes [/github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack-5](https://github.com/ipfs//github.com/storybookjs/storybook/blob/next/MIGRATION.md/issues/webpack-5)
@ipfs-gui-bot
Copy link
Collaborator

🎉 This PR is included in version 2.18.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: Update storybook
3 participants