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: env detection #7232

Merged
merged 3 commits into from
Jan 13, 2023
Merged

refactor: env detection #7232

merged 3 commits into from
Jan 13, 2023

Conversation

segunadebayo
Copy link
Member

@segunadebayo segunadebayo commented Jan 13, 2023

Closes #6374
Closes #6420

📝 Description

  • Add disableEnvironment option to disable the environment-injected span
  • Refactored code to avoid state updates within the ref

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

Partially. Environment is an internal API that isn't documented. Most users shouldn't use this anyways

📝 Additional Information

@vercel
Copy link

vercel bot commented Jan 13, 2023

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

Name Status Preview Updated
chakra-ui-storybook ✅ Ready (Inspect) Visit Preview Jan 13, 2023 at 11:50AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Jan 13, 2023

🦋 Changeset detected

Latest commit: d8ea209

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

This PR includes changesets to release 6 packages
Name Type
@chakra-ui/provider Minor
@chakra-ui/media-query Patch
@chakra-ui/react-env Major
@chakra-ui/react Patch
@chakra-ui/skeleton Patch
@chakra-ui/test-utils 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

@LeonardDrs
Copy link

If I may, the const showSpan = !disabled || !environmentProp statement prevents from using disableEnvironment without specifying an environmentProp anyway.
This makes the disableEnvironment prop shallow as the span was not showing anyway if we had an environmentProp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants