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

use display name for styled custom element #4403

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

keithamus
Copy link
Member

Closes #4402

This moves the displayName value set to before styled() so that styled components don't prepend the custom-element__createComponent- prefix. By doing this, a class like custom-element__createComponent-sc-192p0ln-0 becomes just sc-192p0ln-0.

Changelog

New

Changed

Custom Element React wrapper now outputs cleaner class names

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@keithamus keithamus requested a review from a team as a code owner March 18, 2024 11:48
Copy link

changeset-bot bot commented Mar 18, 2024

🦋 Changeset detected

Latest commit: a577e67

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

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

Copy link
Contributor

github-actions bot commented Mar 18, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 87.47 KB (+0.07% 🔺)
packages/react/dist/browser.umd.js 87.77 KB (-0.1% 🔽)

@keithamus keithamus added this pull request to the merge queue Mar 19, 2024
Merged via the queue into main with commit d4edf2a Mar 19, 2024
30 checks passed
@keithamus keithamus deleted the use-display-name-for-styled-custom-element branch March 19, 2024 13:37
@primer primer bot mentioned this pull request Mar 19, 2024
lukasoppermann pushed a commit that referenced this pull request Apr 16, 2024
* use display name for styled custom element

* changeset

* ensure Styled doesnt change displayName
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.

Clean up custom element styled class names
2 participants