Skip to content

data-component adr part 4#7838

Open
llastflowers wants to merge 8 commits into
mainfrom
llastflowers/6497/data-component-ADR-part-4
Open

data-component adr part 4#7838
llastflowers wants to merge 8 commits into
mainfrom
llastflowers/6497/data-component-ADR-part-4

Conversation

@llastflowers
Copy link
Copy Markdown
Contributor

Relates to https://github.com/github/primer/issues/6497

Changelog

New

Add data-component attributes and associated tests for Hidden, InlineMessage, KeybindingHint, Label, and LabelGroup

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

Copilot AI review requested due to automatic review settings May 13, 2026 21:53
@llastflowers llastflowers requested a review from a team as a code owner May 13, 2026 21:53
@llastflowers llastflowers requested a review from siddharthkp May 13, 2026 21:53
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

🦋 Changeset detected

Latest commit: e0b74cf

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 Minor

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

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@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 May 13, 2026
Add data-component attributes and associated tests for Hidden, InlineMessage, KeybindingHint, Label, and LabelGroup
Copy link
Copy Markdown
Contributor

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

Adds stable data-component attributes for several @primer/react components as part of the ADR-driven stable selector rollout, with unit tests covering the new selectors.

Changes:

  • Adds data-component to Hidden, InlineMessage, KeybindingHint, Label, and LabelGroup roots.
  • Adds tests asserting those selectors are rendered.
  • Updates LabelGroup’s two render paths to include the selector.
Show a summary per file
File Description
packages/react/src/Hidden/Hidden.tsx Adds data-component="Hidden" to the root div.
packages/react/src/Hidden/Hidden.test.tsx Tests Hidden selector rendering.
packages/react/src/InlineMessage/InlineMessage.tsx Adds data-component="InlineMessage" to the root div.
packages/react/src/InlineMessage/InlineMessage.test.tsx Tests InlineMessage selector rendering.
packages/react/src/KeybindingHint/KeybindingHint.tsx Adds data-component="KeybindingHint" to the rendered kbd wrapper.
packages/react/src/KeybindingHint/KeybindingHint.test.tsx Tests KeybindingHint selector rendering.
packages/react/src/Label/Label.tsx Adds data-component="Label" to the polymorphic root.
packages/react/src/Label/Label.test.tsx Tests Label selector rendering.
packages/react/src/LabelGroup/LabelGroup.tsx Adds data-component="LabelGroup" to both LabelGroup root render paths.
packages/react/src/LabelGroup/LabelGroup.test.tsx Tests LabelGroup selector rendering for the default path.

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 2

Comment thread packages/react/src/Label/Label.tsx
Comment thread packages/react/src/LabelGroup/LabelGroup.tsx
@github-actions github-actions Bot requested a deployment to storybook-preview-7838 May 13, 2026 21:58 Abandoned
@github-actions github-actions Bot requested a deployment to storybook-preview-7838 May 13, 2026 22:04 Abandoned
@github-actions github-actions Bot temporarily deployed to storybook-preview-7838 May 13, 2026 22:25 Inactive
@primer-integration
Copy link
Copy Markdown

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

@primer-integration
Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@llastflowers llastflowers changed the title Llastflowers/6497/data component adr part 4 data-component adr part 4 May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Canary Release Apply this label when you want CI to create a canary release of the current PR integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants