Skip to content
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

fix(storybook): expose Inter local fonts to storybook #12787

Merged

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented Apr 21, 2024

Description

Somehow in a past build (probably during the project migration to NextJS), the Inter font lost exposure in Storybook; It is no longer available in the existing configuration to being available to the Chakra theme in the SB environment.

And with the Inter font now being served locally via PR #12501, there needed to be different approach to applying it back into the environment

  • Creates preview-head.html to redefine the CSS variable --font-inter to it is available to the Chakra theme in the SB environment
    • This variable in prod is currently declared in _app.tsx so it is unavailable to the SB environment from that location
  • Exposes the global.css to make the inter font faces available

Additional Information

This PR does not consider the mono font, which is also not exposed to Storybook. Because of the current approach to making the font available for Chakra in NextJS, it makes it difficult to apply in SB. Recommend also adding this font locally.

Related Issue

N/A

Copy link

netlify bot commented Apr 21, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit f78afe3
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/6625bd0abd92580008e5f0a6
😎 Deploy Preview https://deploy-preview-12787--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @TylerAPfledderer. Never realized that we weren't using the Inter font in sb lol!

@pettinarip pettinarip merged commit 1cfc6c3 into ethereum:dev Apr 22, 2024
8 of 10 checks passed
@TylerAPfledderer TylerAPfledderer deleted the fix/storybook-expose-inter-local branch April 22, 2024 11:31
This was referenced Apr 24, 2024
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.

2 participants