Skip to content

Conversation

llastflowers
Copy link
Contributor

@llastflowers llastflowers commented Aug 19, 2025

Closes https://github.com/github/primer/issues/5730

Current sx usage: 1

sx usages are only in repos other than github-ui; those usages have been added to the tracking issue

Changelog

Removed

  • Remove support for sx from the BranchName component

Rollout strategy

  • Major release; if selected, include a written rollout or migration plan

We are using the @primer/styled-react component to mitigate removing sx usage. We will make sure usage is updated upstream before merging.

Merge checklist

@llastflowers llastflowers self-assigned this Aug 19, 2025
Copy link

changeset-bot bot commented Aug 19, 2025

🦋 Changeset detected

Latest commit: b5cbf1d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

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 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 19, 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!

Update BranchName component to no longer support sx, add sx wrapper to @primer/styled-react
Copy link
Contributor

github-actions bot commented Aug 19, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 87.94 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js 88.16 KB (+0.07% 🔺)

@llastflowers llastflowers changed the title Remove support for sx from the BranchName component Remove support for sx from BranchName component Aug 19, 2025
@primer-integration
Copy link

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

@github-actions github-actions bot temporarily deployed to storybook-preview-6625 August 19, 2025 17:50 Inactive
@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 labels Aug 19, 2025
@llastflowers llastflowers marked this pull request as ready for review August 21, 2025 17:00
@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 17:00
@llastflowers llastflowers requested a review from a team as a code owner August 21, 2025 17:00
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

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

@llastflowers llastflowers marked this pull request as draft August 22, 2025 22:18
@llastflowers llastflowers removed the integration-tests: failing Changes in this PR cause breaking changes in gh/gh label Sep 3, 2025
@primer primer deleted a comment from primer-integration bot Sep 4, 2025
Copy link
Contributor

github-actions bot commented Sep 4, 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 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 Sep 4, 2025
@llastflowers llastflowers marked this pull request as ready for review September 4, 2025 23:00
@francinelucca
Copy link
Member

Note: make sure to run integration checks 🙏

@llastflowers llastflowers added this pull request to the merge queue Sep 5, 2025
Merged via the queue into main with commit 65ae375 Sep 5, 2025
62 of 64 checks passed
@llastflowers llastflowers deleted the llastflowers/5730/no-sx-BranchName-component branch September 5, 2025 17:10
@primer primer bot mentioned this pull request Sep 5, 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.

2 participants