Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 15, 2025

Refactor IssueLabelToken to use global data-color-mode attribute for css selector instead of custom local component one from theme

Changelog

Changed

  • Refactor IssueLabelToken to use global data-color-mode attribute for css selector instead of custom local component one from theme

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

Copy link

changeset-bot bot commented Oct 15, 2025

⚠️ No Changeset found

Latest commit: fc7e0fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 15, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot requested a deployment to storybook-preview-7012 October 15, 2025 15:20 Abandoned
@github-actions github-actions bot requested a deployment to storybook-preview-7012 October 15, 2025 15:28 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7012 October 15, 2025 15:37 Inactive
@francinelucca francinelucca marked this pull request as ready for review October 15, 2025 15:48
@francinelucca francinelucca requested a review from a team as a code owner October 15, 2025 15:48
Copy link
Contributor

@Copilot Copilot AI left a 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.

@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4742

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 15, 2025
"@primer/react": patch
---

chore: refactor IssueLabelToken styles
Copy link
Member

@siddharthkp siddharthkp Oct 15, 2025

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?

Copy link
Contributor

👋 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!

@github-actions github-actions bot temporarily deployed to storybook-preview-7012 October 16, 2025 00:18 Inactive
@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 16, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 16, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-7012 October 16, 2025 16:40 Inactive
@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 16, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh labels Oct 16, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 16, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 16, 2025
Merged via the queue into main with commit 3e6e448 Oct 16, 2025
42 checks passed
@francinelucca francinelucca deleted the chore/refactor-issuelabeltoken-styles branch October 16, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants