Skip to content

Remove support for sx from CircleBadge component - #6673

Merged
francinelucca merged 31 commits into
mainfrom
llastflowers/5780/no-sx-CircleBadge
Sep 29, 2025
Merged

Remove support for sx from CircleBadge component#6673
francinelucca merged 31 commits into
mainfrom
llastflowers/5780/no-sx-CircleBadge

Conversation

@llastflowers

@llastflowersllastflowers commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Closeshttps://github.com/github/primer/issues/5780

Current sx usage: 5

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

@llastflowersllastflowers self-assigned this Aug 26, 2025
@changeset-bot

changeset-botBot commented Aug 26, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9f01823

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

This PR includes changesets to release 2 packages
NameType
@primer/reactMajor
@primer/styled-reactMajor

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-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 26, 2025
@github-actions

Copy link
Copy Markdown
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-actionsBot commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js89.52 KB (+0.12% 🔺)
packages/react/dist/browser.umd.js89.66 KB (+0.04% 🔺)

@github-actions
github-actionsBot requested a deployment to storybook-preview-6673 August 26, 2025 17:40 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6673 August 26, 2025 17:49 Inactive
@llastflowers
llastflowers marked this pull request as ready for review September 5, 2025 16:58
CopilotAI review requested due to automatic review settings September 5, 2025 16:58
@llastflowers
llastflowers requested a review from a team as a code ownerSeptember 5, 2025 16:58

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes the deprecated sx prop support from the CircleBadge component as part of a broader effort to eliminate sx usage across Primer React components. The change is part of a major version release with an existing migration strategy in place.

Key changes:

  • Removes sx prop support from CircleBadge component type definitions and styling
  • Updates component documentation to reflect the removed prop
  • Updates test snapshots to reflect the styling changes

Reviewed Changes

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

FileDescription
packages/react/src/CircleBadge/CircleBadge.tsxRemoves sx prop from component interface and styled component implementation
packages/react/src/CircleBadge/CircleBadge.docs.jsonRemoves sx prop from component documentation
packages/react/src/CircleBadge/__snapshots__/CircleBadge.test.tsx.snapUpdates test snapshots to reflect new CSS class names after sx removal
.changeset/cool-apricots-sneeze.mdAdds changeset entry documenting the breaking change for major version release

@francineluccafrancinelucca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like CircleBadge is still a styled component 🤔 , though it is up for deprecation, I'm not sure if we care to migrate? cc @TylerJDev
Also, let's make sure to run integration checks before merging

@llastflowers

llastflowers commented Sep 5, 2025

Copy link
Copy Markdown
ContributorAuthor

Looks like CircleBadge is still a styled component 🤔 , though it is up for deprecation, I'm not sure if we care to migrate? cc @TylerJDev Also, let's make sure to run integration checks before merging

Tyler confirmed in the issue comments that we should just migrate this one, since the removal might not happen in v38 👍

@francinelucca

francinelucca commented Sep 5, 2025

Copy link
Copy Markdown
Member

Tyler confirmed in the https://github.com/github/primer/issues/5780#issuecomment-3254503394 that we should just migrate this one, since the removal might not happen in v38 👍

should we migrate it to css modules then?

@github-actions
github-actionsBot requested a deployment to storybook-preview-6673 September 23, 2025 15:49 Abandoned
@primer-integration

Copy link
Copy Markdown

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

@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

@github-actionsgithub-actionsBot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Sep 23, 2025
@github-actions

Copy link
Copy Markdown
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-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 23, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6673 September 23, 2025 19:08 Inactive
@github-actionsgithub-actionsBot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 29, 2025
@github-actions

Copy link
Copy Markdown
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!

@primerprimerBot mentioned this pull request Sep 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

@llastflowers@francinelucca