-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Debt] Replaces storybook-addon-intl
with storybook-react-intl
#10022
Conversation
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.
It works well! I'm worried that the useEffect fix may have broken some Chromatic snapshotting though.
@@ -33,15 +33,13 @@ type ThemeSetterProps = { | |||
theme: Theme; | |||
}; | |||
const ThemeSetter = ({ theme }: ThemeSetterProps) => { | |||
const { setTheme } = useTheme(); |
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.
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.
Good 👁️, thanks! As discussed, any of the stories with the ThemeSwitcher
component were actually previously incorrect due to the infinite re-render bug in ThemeDecorator
where the initial state should have been the system default rather than light mode. The home page I've added a Chromatic delay to the DateInput
and Pending
stories that should get them to where they should be (more or less). The other diffs are existing issues: #9636, #10025.
packages/storybook-helpers/main.ts
Outdated
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.
🤖 Resolves #10021.
👋 Introduction
This PR replaces
storybook-addon-intl
withstorybook-react-intl
.🎩 Acknowledgement
@esizer for stopping the infinite re-render caused by
useEffect
.🧪 Testing
Assist reviewers with steps they can take to test that the PR does what it says it does.
pnpm storybook