-
Notifications
You must be signed in to change notification settings - Fork 178
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(storybook): update v1 syntax to use Storybook v6 #568
Merged
crenshaw-dev
merged 17 commits into
argoproj:master
from
agilgur5:chore-update-v1-storybook-v6-syntax
Aug 23, 2024
Merged
chore(storybook): update v1 syntax to use Storybook v6 #568
crenshaw-dev
merged 17 commits into
argoproj:master
from
agilgur5:chore-update-v1-storybook-v6-syntax
Aug 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 18, 2024
agilgur5
force-pushed
the
chore-update-v1-storybook-v6-syntax
branch
2 times, most recently
from
July 19, 2024 16:20
8a3ec46
to
ea006e0
Compare
- while the deps used Storybook v6, the configuration and stories themselves were still on a legacy v5 format - v6 had backward compat for v5, but v7 does not, so this needs upgrading/migrating - or well, v7 has some legacy mode for it that can be enabled with some config, but it is entirely gone in v8 - migrate `storiesOf` to CSF per https://storybook.js.org/docs/7/migration-guide#storiesof-to-csf - then had to do a bunch of manual changes to get back mostly the same previous indentation (with some minor differences where there were mistakes or inconsistencies) - tried to keep the diff as small as possible - CSF is still valid through to latest v8 Signed-off-by: Anton Gilgur <[email protected]>
- modified version of v2's config Signed-off-by: Anton Gilgur <[email protected]>
- `ts-loader` is necessary to handle the `import type` syntax - custom `tsconfig.json` doesn't seem necessary though - use same SASS config - plain CSS config not needed though bc PostCSS already runs by default Signed-off-by: Anton Gilgur <[email protected]>
- the conventional format - also had some problems finding stories without this change Signed-off-by: Anton Gilgur <[email protected]>
- per https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations - migrate `.story.name` -> `.storyName` - not sure why the automigration didn't do this and instead used the deprecated name 😕 Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
- remove `ts-loader` as not necessary - plus some settings for Storybook's TS loader preset Signed-off-by: Anton Gilgur <[email protected]>
agilgur5
force-pushed
the
chore-update-v1-storybook-v6-syntax
branch
from
August 22, 2024 21:18
ea006e0
to
8db46bd
Compare
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
crenshaw-dev
approved these changes
Aug 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local test lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #432 (comment) and make the v1 code Storybook v7 compatible. This is just one step toward the upgrade, but perhaps the most breaking one.
Follow-up to #567 "Future Work" part 1.
Motivation
Modifications
migrate
storiesOf
to CSF per https://storybook.js.org/docs/7/migration-guide#storiesof-to-csfalso remove
index.stories.tsx
and replace with naming other story files*.stories.tsx
migrate v1
config.js
+webpack.config.js
to Storybook v6+main.js
+preview.js
ts-loader
and instead use the built-in TS support, with a few optimizations per [Bug]: Slow initial page loading since upgrade to v7, taking more than one minute to download chunks storybookjs/storybook#22164 (comment)Verification
yarn start
works the same as it did in #567Notes to Reviewers
This requires #567 to work and so is built on top of it. Please do not merge until that is merged first!Rebased on top