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

Fix emotion label not being applied to components with numbers in name #2122

Merged
merged 5 commits into from
Nov 21, 2020
Merged

Conversation

dcastil
Copy link
Contributor

@dcastil dcastil commented Nov 19, 2020

What:

Fixes emotion label in development not being applied to components with numbers in component name.

/** @jsx jsx */
import { jsx } from '@emotion/react'

// className: css-2a3l4r-MyComponent
const MyComponent = () => <div css={{}}  />

// className: css-fhsrqh
const MyComponentNo1 = () => <div css={{}}  />

Why:

Components with numbers in their name deserve the same love and recognition within the Elements tab in Chrome devtools!

How:

Adding numbers to the regex which is used to identify the emotion label.

Checklist:

  • Documentation
  • Tests
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2020

🦋 Changeset detected

Latest commit: 42de837

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

This PR includes changesets to release 4 packages
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 Nov 19, 2020

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 42de837:

Sandbox Source
Emotion Configuration

@Andarist
Copy link
Member

Looks good, could u add a changeset?

@dcastil
Copy link
Contributor Author

dcastil commented Nov 19, 2020

@Andarist I added the changeset, the PR is ready for review now. 😊

@Andarist Andarist merged commit 1ee3400 into emotion-js:master Nov 21, 2020
@Andarist
Copy link
Member

Thanks!

@github-actions github-actions bot mentioned this pull request Nov 21, 2020
@dcastil dcastil deleted the patch-1 branch November 21, 2020 21:20
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