-
Notifications
You must be signed in to change notification settings - Fork 639
chore: refactor IssueLabelToken styles #7012
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
Conversation
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
…imer/react into chore/refactor-issuelabeltoken-styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactors IssueLabelToken to rely on the global data-color-mode attribute instead of a component-scoped data-in-color-mode attribute, simplifying theme integration and removing the need for useTheme in the component.
- Removes useTheme dependency and the data-in-color-mode attribute from the component.
- Updates CSS selectors to target ancestry via [data-color-mode], adjusting separate rules for light/auto and dark modes.
- Updates snapshots and adds a changeset for a patch release.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
File | Description |
---|---|
packages/react/src/Token/IssueLabelToken.tsx | Removes theme hook and per-instance color mode data attribute. |
packages/react/src/Token/IssueLabelToken.module.css | Replaces local attribute selectors with global data-color-mode selectors; adjusts mode-specific rules. |
packages/react/src/TextInputWithTokens/snapshots/TextInputWithTokens.test.tsx.snap | Updates snapshots to reflect removed data-in-color-mode attribute. |
.changeset/hungry-beds-fetch.md | Adds patch changeset entry. |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4742 |
.changeset/hungry-beds-fetch.md
Outdated
"@primer/react": patch | ||
--- | ||
|
||
chore: refactor IssueLabelToken styles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an implementation detail, does this need a changelog?
…suelabeltoken-styles
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
…suelabeltoken-styles
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
🟢 ci completed with status |
Refactor IssueLabelToken to use global data-color-mode attribute for css selector instead of custom local component one from theme
Changelog
Changed
Rollout strategy
Testing & Reviewing
Merge checklist