Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 2 commits into from
Apr 13, 2022
Merged

chore: fix storybook fonts #988

merged 2 commits into from
Apr 13, 2022

Conversation

greyscaled
Copy link
Contributor

@greyscaled greyscaled commented Apr 13, 2022

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:

  • 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

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
@greyscaled greyscaled requested a review from a team as a code owner April 13, 2022 01:34
@greyscaled greyscaled self-assigned this Apr 13, 2022
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #988 (ca556a8) into main (ce49966) will increase coverage by 0.23%.
The diff coverage is n/a.

@@            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     
Flag Coverage Δ
unittest-go-macos-latest 53.44% <ø> (-0.04%) ⬇️
unittest-go-postgres- 66.40% <ø> (+0.12%) ⬆️
unittest-go-ubuntu-latest 56.17% <ø> (+0.02%) ⬆️
unittest-go-windows-2022 52.91% <ø> (+0.04%) ⬆️
unittest-js 61.56% <ø> (ø)
Impacted Files Coverage Δ
provisionerd/provisionerd.go 80.14% <0.00%> (-0.15%) ⬇️
peer/conn.go 78.93% <0.00%> (ø)
coderd/database/queries.sql.go 83.86% <0.00%> (+0.20%) ⬆️
provisioner/terraform/provision.go 68.54% <0.00%> (+0.43%) ⬆️
coderd/workspaceagents.go 59.82% <0.00%> (+1.33%) ⬆️
coderd/provisionerdaemons.go 65.00% <0.00%> (+1.54%) ⬆️
provisioner/echo/serve.go 56.80% <0.00%> (+2.39%) ⬆️
peerbroker/proxy.go 61.62% <0.00%> (+3.48%) ⬆️
coderd/parameter/compute.go 78.51% <0.00%> (+4.44%) ⬆️
codersdk/provisionerdaemons.go 65.67% <0.00%> (+5.97%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce49966...ca556a8. Read the comment docs.

@greyscaled

This comment was marked as resolved.

@greyscaled greyscaled marked this pull request as draft April 13, 2022 01:38
@greyscaled greyscaled marked this pull request as ready for review April 13, 2022 02:16
Copy link
Member

@kylecarbs kylecarbs left a 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!

@greyscaled
Copy link
Contributor Author

@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!

@greyscaled greyscaled merged commit 0536a14 into main Apr 13, 2022
@greyscaled greyscaled deleted the vapurrmaid/914/storybook-fonts branch April 13, 2022 16:03
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Storybook is not loading styles correctly
4 participants