-
Notifications
You must be signed in to change notification settings - Fork 213
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
build: Upgrade Storybook to 5.2 #267
Conversation
It looks like the Chromatic CI check is failing on |
If we don't want to list out all the properties on the host Element, it looks like props can be filtered out: storybookjs/storybook#8104 (comment) |
@NicholasBoll this should be able |
@@ -0,0 +1,65 @@ | |||
const docGen = require('react-docgen-typescript'); |
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.
Discovered from strothj/react-docgen-typescript-loader#37
c22dc4b
to
3bf8dc9
Compare
f80800a
to
11b209f
Compare
@anicholls There was some dependency mismatches, so we simply updated the yarn.lock file will all the latest changes and that fixed the issue, but added a lot of diffs to the |
@NicholasBoll Changes were manually introduced to yarn.lock? |
@NicholasBoll I told you 🤣 |
@sahlhoff @anicholls What happened here? https://www.chromaticqa.com/snapshot?appId=5d854c26ba934e0020f5e98a&id=5db78ba417a1ee0020846163 It looks like now there is a background image? It wasn't showing before? |
@NicholasBoll just looking at the resources panel in chrome– looks like previously it was incorrectly getting base64ed compared to current build. The story css has it explicitly set so going to assume we want it here. |
Hi all, you'll notice two storybook changes in this PR:
Avatar
andCard
.Avatar
is using the legacystoriesOf
api but withaddParameters({component: <component>})
.Card
is using the new CSF format.Some notes:
I'm unable to get CSF to work with thesource-loader
. Thesource-loader
is able to parse the legacy stories (and show the code) but is having issues showing the CSF code. There's similar issues on github.You'll notice for both theCard
andAvatar
story we are able to parse the props in the props section. However this appears to be just the default props from the component. I did have some success using thedocgenLoader
– you'll see commented out in.storybook/webpack.config.js
. This however had a severe impact on build performance and also LOTS of props got passed because in most cases we are extendingHTMLAttributes
.The refactor to CSF is going to be a pretty large change to the codebase. CSF requires that there are only one component per file– this means potentially we could at least see double of the storybook files in components like
button
andform-field
. I've got a lot of these changes stashed locally and I can follow up with them if we can figure out the webpack issues /source-loader
.Any thoughts or help, greatly appreciated! 🙏
Checklist
yarn test
passespackage.json
canvas-kit-react
and/orcanvas-kit-css
universal modules, ifapplicable
Additional References
Storybook's recommended docs configuration: https://github.com/storybookjs/storybook/tree/next/addons/docs#manual-configuration
Performance