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

refactor: replace @chakra-ui/addon with local setup #12944

Merged

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented May 10, 2024

Description

In response to attempting to add a RTL language as a locale option for Storybook, this PR removes @chakra-ui/storybook-addon in favor of a local decorator setup.

It is expected that the addon will not be updated due to ongoing building of Chakra v3 (which will deprecate the addon). In it's current state, the addon is not set up to properly sync with the changing of locale direction via i18next, affecting DX.

Creation of a local decorator similar to the addon expects a resolution to this, along with other modifications.

The .storybook/types brings in the getThemingArgTypes from the addon to generate SB controls based on the given component theme. (Currently in use in Button.stories)

The Farsi language is added to SB as a locale option to generate RTL snapshots in Chromatic.

Copy link

netlify bot commented May 10, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 9e6d5ce
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/663da995ec94770008337bea
😎 Deploy Preview https://deploy-preview-12944--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 50 (🔴 down 6 from production)
Accessibility: 92 (no change from production)
Best Practices: 94 (🔴 down 4 from production)
SEO: 95 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@TylerAPfledderer TylerAPfledderer force-pushed the refactor/localize-chakra-sb-addon branch from 4d55e67 to 9e6d5ce Compare May 10, 2024 04:59
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.

Thanks for digging into this issue and adding the context of what is going on @TylerAPfledderer.

LGTM and rtl is working as expected after this change 👍🏼

@TylerAPfledderer
Copy link
Contributor Author

@pettinarip should I add a story mode for Farsi here to be absolutely sure?

@pettinarip
Copy link
Member

@pettinarip should I add a story mode for Farsi here to be absolutely sure?

Aren't you covering that on the other PR related to story modes? Same for me but yes, a specific test for that locale to test RTL would be really helpful.

@pettinarip pettinarip merged commit 92f3662 into ethereum:dev May 13, 2024
12 checks passed
@TylerAPfledderer TylerAPfledderer deleted the refactor/localize-chakra-sb-addon branch May 14, 2024 12:43
This was referenced May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Changes related to project dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants