-
Notifications
You must be signed in to change notification settings - Fork 891
chore: fix storybook fonts #988
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
Conversation
Summary: Configures storybook with MUI themes as according to their documentation. We were previously not aligned with their example. See: https://storybook.js.org/addons/@react-theming/storybook-addon Details: - declare the themeing add-on in .storybook/main.js addons - configure a providerFn for MUI with CssBaseline. We were previously missing the CssBaseline implementation, causing the inconsistency. Impact: Resolves inconsistency between Storybook and production. I had tested the Tabpanel in production vs Storybook. In storybook, the font had fallen back to Times New Roman, whereas in production it had fallen back to Inter. This was because of CssBaseline being configured as a child of ThemeProvider. Resolves: #914
Codecov Report
@@ Coverage Diff @@
## main #988 +/- ##
==========================================
+ Coverage 66.53% 66.77% +0.23%
==========================================
Files 240 240
Lines 14588 14588
Branches 115 115
==========================================
+ Hits 9706 9741 +35
+ Misses 3892 3869 -23
+ Partials 990 978 -12
Continue to review full report at Codecov.
|
This comment was marked as resolved.
This comment was marked as resolved.
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.
Seems reasonable to me!
@presleyp I tagged you for review in https://www.chromatic.com/pullrequest?appId=624de63c6aacee003aa84340&number=988 I checked each diff here: https://www.chromatic.com/build?appId=624de63c6aacee003aa84340&number=308 it seems like in addition to typography being fixed in a few places (tabpanel, navbar), there were a few spacing changes. They seem fine to me (they're like this in prod). LMK if you spot anything concerning! |
Summary:
Configures storybook with MUI themes as according to their
documentation. We were previously not aligned with their example.
See: https://storybook.js.org/addons/@react-theming/storybook-addon
Details:
missing the CssBaseline implementation, causing the inconsistency.
Impact:
Resolves inconsistency between Storybook and production. I had tested
the Tabpanel in production vs Storybook. In storybook, the font had
fallen back to Times New Roman, whereas in production it had fallen back
to Inter. This was because of CssBaseline being configured as a child of
ThemeProvider.
Resolves: #914