Skip to content

Conversation

llastflowers
Copy link
Contributor

@llastflowers llastflowers commented Aug 19, 2025

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

  • 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: 15c149e

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

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

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 90.31 KB (+0.04% 🔺)
packages/react/dist/browser.umd.js 90.37 KB (-0.09% 🔽)

@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 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

@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

@llastflowers llastflowers marked this pull request as draft August 22, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants