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

feat: Add display names to public React contexts #2428

Merged
merged 3 commits into from Aug 8, 2021

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Jul 13, 2021

What:

Give public contexts a distinct name in React DevTools:

Before:
Screenshot from 2021-07-13 10-00-01

After:
Screenshot from 2021-07-13 10-08-14

Why:

Easier debugging when inspecting the cache of e.g. <CacheProvider value={cache}>.

How:

Add a displayName property in development to the context.

Checklist:

  • [ ] Documentation N/A
  • Tests (manually verified in DevTools)
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Jul 13, 2021

🦋 Changeset detected

Latest commit: 948fcae

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

This PR includes changesets to release 1 package
Name Type
@emotion/react 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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 13, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 948fcae:

Sandbox Source
Emotion Configuration

@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #2428 (fe100ae) into main (dcc72d0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head fe100ae differs from pull request most recent head 948fcae. Consider uploading reports for the commit 948fcae to get more accurate results
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/react/src/context.js | 100.00% <100.00%> (ø) | |
| packages/react/src/theming.js | 100.00% <100.00%> (ø) | |

Copy link
Member

@Andarist Andarist left a comment

Choose a reason for hiding this comment

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

You have opened this as a draft - do you want to still add something to this PR?

@eps1lon
Copy link
Contributor Author

eps1lon commented Jul 13, 2021

You have opened this as a draft - do you want to still add something to this PR?

Just a habit until CI is either green or waiting for "ready for review". Has some benefits on GitHub since e.g. automatic review requests aren't dispatched until the PR is ready for review.

@eps1lon eps1lon marked this pull request as ready for review July 13, 2021 08:44
@Andarist Andarist merged commit a69929d into emotion-js:main Aug 8, 2021
@github-actions github-actions bot mentioned this pull request Aug 8, 2021
@eps1lon eps1lon deleted the feat/context-displayname branch August 8, 2021 09:38
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.

None yet

2 participants