-
Notifications
You must be signed in to change notification settings - Fork 175
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
base: master
Are you sure you want to change the base?
chore(storybook): update v1 syntax to use Storybook v6 #568
Commits on Jul 18, 2024
-
fix(deps): downgrade all breakage from dependabot et al
- go back to Storybook v6 addons, matching the `storybook` dep - the addons were partially auto-upgraded to breaking versions by dependabot - go back to Webpack v4, matching Storybook v6 - this was also auto-upgraded to a breaking version by dependabot - go back to `ts-loader` v8, matching Webpack v4 - and this too had a breaking dependabot upgrade Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 30acdb5 - Browse repository at this point
Copy the full SHA 30acdb5View commit details -
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 233c828 - Browse repository at this point
Copy the full SHA 233c828View commit details -
revert the yarn.lock semver compatible changes as well
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6470e20 - Browse repository at this point
Copy the full SHA 6470e20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25b3beb - Browse repository at this point
Copy the full SHA 25b3bebView commit details -
attempt to revert more unnecessary auto-made yarn.lock changes
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e2f27ae - Browse repository at this point
Copy the full SHA e2f27aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa39e16 - Browse repository at this point
Copy the full SHA fa39e16View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78a9486 - Browse repository at this point
Copy the full SHA 78a9486View commit details -
set all storybook deps to 6.5.14 and ensure yarn.lock follows it
- the latter took some manual editing and resolutions until it got it, and now it reproduces the minimal variant Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0d6fc93 - Browse repository at this point
Copy the full SHA 0d6fc93View commit details -
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 991775d - Browse repository at this point
Copy the full SHA 991775dView commit details -
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 27113f8 - Browse repository at this point
Copy the full SHA 27113f8View commit details -
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9a0affa - Browse repository at this point
Copy the full SHA 9a0affaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d219d35 - Browse repository at this point
Copy the full SHA d219d35View commit details -
couple more iterations on that
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ce69bfa - Browse repository at this point
Copy the full SHA ce69bfaView commit details -
migrate from
@dump247/storybook-state
touseState
hook- as per its archived docs - tried to make the diff as small as possible Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d7a4c73 - Browse repository at this point
Copy the full SHA d7a4c73View commit details
Commits on Jul 19, 2024
-
import individual components from dir
- same as downstream in Workflows, in order to code split properly, can't use the `src/` or `src/components/` imports as they have side effects (and therefore can't be tree-shaken) - instead have to do individual component imports to tree shake properly - this seems to substantially improve performance from lethargic minutes of loading on first page load to seconds - I believe Storybook tries to code split things itself, so maybe it was making a giant bundle for each story file? Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6a82512 - Browse repository at this point
Copy the full SHA 6a82512View commit details -
chore(storybook): update v1 syntax to use Storybook v6
- 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 <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 59aedfc - Browse repository at this point
Copy the full SHA 59aedfcView commit details -
chore(storybook): convert v1 config to use Storybook v6
- modified version of v2's config Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4b05145 - Browse repository at this point
Copy the full SHA 4b05145View commit details -
fixup config a bit -- take more from prev webpack config
- `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 <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b1da16f - Browse repository at this point
Copy the full SHA b1da16fView commit details -
rename to
.stories.tsx
and removeindex
- the conventional format - also had some problems finding stories without this change Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1bb3401 - Browse repository at this point
Copy the full SHA 1bb3401View commit details -
fix deprecation warning re:
storyName
- 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 <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f09b116 - Browse repository at this point
Copy the full SHA f09b116View commit details -
also fix history deprecation warning
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ae6ef5c - Browse repository at this point
Copy the full SHA ae6ef5cView commit details -
attempt to load CSS properly but still fail
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ba76eda - Browse repository at this point
Copy the full SHA ba76edaView commit details -
improve perf with built in loader for TS
- remove `ts-loader` as not necessary - plus some settings for Storybook's TS loader preset Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ea006e0 - Browse repository at this point
Copy the full SHA ea006e0View commit details