Skip to content

Conversation

@llastflowers
Copy link
Contributor

@llastflowers llastflowers commented Aug 27, 2025

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

Current sx usage: 5

❌ Still need to separately update github-ui components to use @primer/styled-react
github/github-ui PR: https://github.com/github/github-ui/pull/1870

Changelog

Removed

Remove support for sx from the CounterLabel component, and associated stories, docs, and tests

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 27, 2025
@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2025

🦋 Changeset detected

Latest commit: 984fbd5

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

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

github-actions bot commented Aug 27, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.55 KB (+0.04% 🔺)
packages/react/dist/browser.umd.js 89.61 KB (-0.01% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-6679 August 27, 2025 18:48 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6679 August 27, 2025 18:57 Inactive
@llastflowers llastflowers marked this pull request as ready for review September 5, 2025 16:57
Copilot AI review requested due to automatic review settings September 5, 2025 16:57
@llastflowers llastflowers requested a review from a team as a code owner September 5, 2025 16:57
Copy link
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 removes the deprecated sx prop support from the CounterLabel component as part of the migration away from styled-components to a more modern CSS-in-JS approach. The changes align with the broader effort to eliminate sx prop usage across Primer React components.

  • Removes sx prop from CounterLabel component interface and implementation
  • Replaces BoxWithFallback wrapper with native span element
  • Updates component documentation to reflect API changes

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/react/src/CounterLabel/CounterLabel.tsx Removes SxProp type, BoxWithFallback wrapper, and simplifies to native span element
packages/react/src/CounterLabel/CounterLabel.docs.json Removes deprecated sx prop from component documentation
.changeset/sharp-papayas-destroy.md Adds changeset entry documenting the breaking change for major release

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Approving, merge whenever the supporting PR is ready!

@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT 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 Sep 17, 2025
@llastflowers llastflowers added this pull request to the merge queue Sep 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Sep 22, 2025
@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 22, 2025
@github-actions
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 22, 2025
@github-actions
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@llastflowers llastflowers added this pull request to the merge queue Sep 22, 2025
Merged via the queue into main with commit 6158135 Sep 22, 2025
42 checks passed
@llastflowers llastflowers deleted the llastflowers/5783/no-sx-CounterLabel branch September 22, 2025 17:59
@primer primer bot mentioned this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh 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