Skip to content

fix(Label): Add missing ref for Label without sx prop#6535

Merged
hussam-i-am merged 4 commits intomainfrom
hussam-i-am/fix-missing-label-ref
Aug 12, 2025
Merged

fix(Label): Add missing ref for Label without sx prop#6535
hussam-i-am merged 4 commits intomainfrom
hussam-i-am/fix-missing-label-ref

Conversation

@hussam-i-am
Copy link
Copy Markdown
Contributor

@hussam-i-am hussam-i-am commented Aug 8, 2025

Closes #6534

Changelog

New

Changed

Passes ref to child component of Label when there is no sx prop being passed in.

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

@hussam-i-am hussam-i-am self-assigned this Aug 8, 2025
Copilot AI review requested due to automatic review settings August 8, 2025 14:47
@hussam-i-am hussam-i-am requested a review from a team as a code owner August 8, 2025 14:47
@hussam-i-am hussam-i-am requested a review from jonrohan August 8, 2025 14:47
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 8, 2025

🦋 Changeset detected

Latest commit: feb3c5c

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

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

This PR fixes a missing ref forwarding issue in the Label component when the sx prop is not provided. The fix ensures that refs are properly passed through to the underlying DOM element in both code paths.

  • Adds missing ref prop to the Component element in the non-sx branch

@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 Aug 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 8, 2025

👋 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
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 8, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.18 KB (-0.03% 🔽)
packages/react/dist/browser.umd.js 90.44 KB (+0.08% 🔺)

@github-actions github-actions bot requested a deployment to storybook-preview-6535 August 8, 2025 14:51 Abandoned
@hussam-i-am hussam-i-am added this pull request to the merge queue Aug 12, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6535 August 12, 2025 14:39 Inactive
@TylerJDev TylerJDev removed this pull request from the merge queue due to a manual request Aug 12, 2025
@TylerJDev TylerJDev added this pull request to the merge queue Aug 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 12, 2025
Merged via the queue into main with commit e6c7614 Aug 12, 2025
43 checks passed
@hussam-i-am hussam-i-am deleted the hussam-i-am/fix-missing-label-ref branch August 12, 2025 15:49
@primer primer bot mentioned this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Label without sx prop is not passing through ref

5 participants