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

Implement emotion & chakra #7179

Merged
merged 22 commits into from
Aug 9, 2022
Merged

Implement emotion & chakra #7179

merged 22 commits into from
Aug 9, 2022

Conversation

pettinarip
Copy link
Member

@pettinarip pettinarip commented Jul 25, 2022

Description

The first step towards adopting Chakra UI is to migrate from styled-components to emotion.

UPDATE: chakra PR was merged #7195 now this PR includes chakra + emotion setup.

Related Issue

Epic #6374
Fixes #7054

@github-actions github-actions bot added content 🖋️ This involves copy additions or edits dependencies 📦 Changes related to project dependencies review needed 👀 labels Jul 25, 2022
@gatsby-cloud
Copy link

gatsby-cloud bot commented Jul 25, 2022

Gatsby Cloud Build Report

ethereum-org-website-dev

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 13m

@pettinarip pettinarip mentioned this pull request Jul 26, 2022
@pettinarip pettinarip marked this pull request as ready for review August 1, 2022 19:02
docs/best-practices.md Outdated Show resolved Hide resolved
@samajammin
Copy link
Member

Looks great overall @pettinarip! Noticed a few small styling issues:

  1. header anchor links (both desktop & mobile)

Image 2022-08-01 at 2 20 51 PM

  1. overall spacing of pages & size of headers

Spacing of content on docs pages looks off:
Image 2022-08-01 at 2 23 48 PM

Same with tutorials:
Image 2022-08-01 at 2 24 33 PM

Same with static templates:
Image 2022-08-01 at 2 24 51 PM

Most product pages look great but there's some slight differences in spacing / header font size on some pages:

Image 2022-08-01 at 2 25 52 PM

Copy link
Member

@samajammin samajammin left a comment

Choose a reason for hiding this comment

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

Great work! Some minor styling issues & some documentation updates needed.

@minimalsm
Copy link
Contributor

Styling changes here look to be fixed in this PR: #7195

@pettinarip pettinarip changed the title Implement emotion Implement emotion & chakra Aug 8, 2022
@pettinarip pettinarip requested a review from samajammin August 8, 2022 16:19
Comment on lines -99 to -107
// set isDarkTheme based on browser/app user preferences
useEffect(() => {
if (localStorage && localStorage.getItem("dark-theme") !== null) {
setIsDarkTheme(localStorage.getItem("dark-theme") === "true")
} else {
setIsDarkTheme(window.matchMedia("(prefers-color-scheme: dark)").matches)
}
}, [])

Copy link
Member

Choose a reason for hiding this comment

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

@pettinarip So am I correct the users browser preference will still be accounted for here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we are using this flag useSystemColorMode for that. More on this here: https://chakra-ui.com/docs/styled-system/color-mode#updating-the-theme-config

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

🎉 Nice job @pettinarip!

@pettinarip pettinarip merged commit 06ea9b5 into dev Aug 9, 2022
@pettinarip pettinarip deleted the emotion branch August 9, 2022 20:52
@samajammin
Copy link
Member

Exciting! 😄

@corwintines corwintines mentioned this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits dependencies 📦 Changes related to project dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from styled-components to emotion to prepare the ground for Chakra
4 participants