-
Notifications
You must be signed in to change notification settings - Fork 625
Remove support for sx
from BranchName
component
#6625
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 15c149e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
👋 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! |
Update BranchName component to no longer support sx, add sx wrapper to @primer/styled-react
size-limit report 📦
|
sx
from the BranchName
componentsx
from BranchName
component
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/397512 |
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
This PR removes the deprecated sx
prop support from the BranchName
component in @primer/react
as part of the design system's migration away from styled-components. The component is simplified to use standard CSS modules while maintaining a styled-react wrapper for backward compatibility.
Key changes:
- Remove
sx
prop support and styled-components dependencies from BranchName - Simplify component implementation to use direct DOM elements
- Add BranchName to styled-react package exports for migration compatibility
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/BranchName/BranchName.tsx | Removes sx prop support, BoxWithFallback usage, and simplifies to direct component rendering |
packages/react/src/BranchName/BranchName.docs.json | Removes sx prop from component documentation |
packages/styled-react/src/index.ts | Adds BranchName export for backward compatibility |
packages/styled-react/src/tests/snapshots/exports.test.ts.snap | Updates snapshot to include BranchName export |
.changeset/strange-peas-kiss.md | Documents breaking change and minor styled-react update |
🔴 golden-jobs completed with status |
Closes https://github.com/github/primer/issues/5730
❌ Still need to separately update github-ui components to use @primer/styled-react (sx: 3)
Changelog
Removed
sx
from the BranchName componentRollout strategy
We are using the
@primer/styled-react
component to mitigate removingsx
usage. We will make sure usage is updated upstream before merging.Merge checklist