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: Bump Chakra-UI dep to latest #9577

Merged

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented Feb 24, 2023

NOTE: Recommend this PR for #9548 to not fall behind while implementing the DS. May need to consider timing in adding this while migrations are still ongoing

Description

This PR keeps Chakra up-to-date in preparation for the new DS

  • Updates dependency to latest (v.2.5.1)
  • Adds the Chakra CLI to generate typing for any custom tokens. This allow these tokens to be visible during auto-completion in the IDE with style props.
    • Adds the package scripts theme and theme:watch to generate the typing and to generate the typing on watch when updating the theme config.
    • Adds a postinstall package script to generate the typing when updating package deps or when a developer forks the project into their local environment for the first time.
  • Updates components where the Show/Hide components are replaced with the hideFrom and hideBelow props where possible.
    • This could improve build time and runtime

Related Issue

Closes #8870

@github-actions github-actions bot added the dependencies 📦 Changes related to project dependencies label Feb 24, 2023
@gatsby-cloud
Copy link

gatsby-cloud bot commented Feb 24, 2023

✅ ethereum-org-website-dev deploy preview ready

@TylerAPfledderer TylerAPfledderer marked this pull request as ready for review March 1, 2023 23:27
@TylerAPfledderer TylerAPfledderer changed the title [WIP] refactor: Bump Chakra-UI dep to latest refactor: Bump Chakra-UI dep to latest Mar 1, 2023
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.

Handy tool, nice. Thanks @TylerAPfledderer for the bump

@@ -44,4 +44,5 @@ const theme: ThemeOverride = {
components,
}

// TODO: use `extendBaseTheme` when updating theming for components for new DS
Copy link
Member

Choose a reason for hiding this comment

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

Whats the difference between extendBaseTheme vs extendTheme. Couldn't find it on the docs.

@@ -127,7 +129,9 @@
"serve": "gatsby serve",
"type-check": "tsc --noEmit",
"storybook": "storybook dev -p 6006 -c .storybook",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"theme": "chakra-cli tokens src/@chakra-ui/gatsby-plugin/theme.ts",
Copy link
Member

Choose a reason for hiding this comment

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

Nice. Interesting decision to place those generated types in node_modules and not on the project 🤔.

░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▀▀░░░░░░░░
</ContentColumn>
</Show>
<ContentColumn hideBelow={largeBp}>
Copy link
Member

Choose a reason for hiding this comment

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

Cleannn 👍🏼

@pettinarip pettinarip merged commit 88900c6 into ethereum:dev Mar 6, 2023
@TylerAPfledderer TylerAPfledderer deleted the build/chakra-dep-to-latest branch March 7, 2023 02:39
@corwintines corwintines mentioned this pull request Mar 7, 2023
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.

Bump @chakra-ui/react to Latest
2 participants