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

revert(gatsby-plugin): revert implementation of baseTheme #7525

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

TylerAPfledderer
Copy link
Collaborator

Closes #7179

📝 Description

This PR reverts the Gatsby plugin back to the version prior to adding the ChakraBaseProvider as an option with the baseTheme.

This is a two-fold change

⛳️ Current behavior (updates)

Console warning Attempted import error: 'baseTheme' is not exported from './theme' (imported as 'baseTheme') when attempting to use extendBaseTheme in the project

🚀 New behavior

Warning is gone because the baseTheme import is removed from the plugin.

💣 Is this a breaking change (Yes/No):

No. Use of the extendBaseTheme is still valid, and only the added option isBaseProvider is removed.

📝 Additional Information

In using the added features of extendBaseTheme and ChakraBaseProvider and from the discussion in the related issue, the provider seems unnecessary.

With the component default theming stripped away initially from ChakraBaseProvider, the user might already be inclined to create custom theming. In doing so, with extendTheme or extendBaseTheme, the merging of the theme or baseTheme objects from the respective functions into the custom theming will override whatever object is initially rendered in the provider.

So long as the user uses extendBaseTheme, the entire set of default component theme will not be apart of the payload aside from defaults the user decides to import.

DISCLAIMER: The above statement is assuming that this is the only behavior occurring and not predisposed to any other purpose of the ChakraBaseProvider alone in improving the build.

@changeset-bot
Copy link

changeset-bot bot commented Apr 1, 2023

🦋 Changeset detected

Latest commit: 873a588

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chakra-ui/gatsby-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
chakra-ui-storybook ✅ Ready (Inspect) Visit Preview Apr 1, 2023 2:46pm

@segunadebayo segunadebayo merged commit d14458b into main Apr 3, 2023
@segunadebayo segunadebayo deleted the revert/gatsby-plugin-base-theme branch April 3, 2023 11:49
@github-actions github-actions bot mentioned this pull request Apr 3, 2023
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.

[@chakra-ui/gatsby-plugin] Attempted import error: 'baseTheme' is not exported from './theme'
2 participants