-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
ff3ca11
to
e6fc825
Compare
Codenotify: Notifying subscribers in CODENOTIFY files for diff cf59b33...f8a41e3.
|
Codenotify: Notifying subscribers in OWNERS files for diff cf59b33...f8a41e3.
|
Should every component be rendered in both light and dark mode? The UI review only shows some components being rendered in dark mode. |
food for thought.. storybookjs/storybook#16837.. looks like this isn't an issue in 6.5. from testing it myself looks great! |
I think this is intentional. It's basically checking against a chromatic dark variable if it should render the dark mode. We only render darkmode if the story tells us to (like here) |
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.
Looks solid from my testing
Ahh thank you, that's what I was missing here. I didn't understand how some were being rendered in dark mode and some were not based on this changeset alone; turns out it's preexisting code! :) |
Context
Upgrading Storybook to the latest version to benefit from goodies released since Oct 14 and eventually enable lazy compilation in development mode. Read more about Storybook Lazy Compilation for Webpack here.
Slack thread for context.
Changes
isChromatic
helper to locally test the change described above. RunCHROMATIC=true yarn storybook
to test it.prettier
version to avoid huge diff in this PR. Let's unpin it in a follow-up PR.Popover
component to be able to change the HTML element where it's rendered. Thanks, @vovakulikov, for implementing that! 🙌New global decorator
The withChromaticThemes decorator renders stories with
parameters.chromatic.enableDarkMode === true
twice — in light and dark mode. The decorator is enabled only ifisChromatic() === true
. It's a suggested way of snapshotting the same story with different themes. Trade-offs:Pros
Cons
Popover
root element).Test plan
App preview:
To learn more, check out the client app preview documentation.