Uh oh!
There was an error while loading. Please reload this page.
Remove support for sx from Checkbox component - #6654
Conversation
🦋 Changeset detectedLatest commit: dc92e80 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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! |
size-limit report 📦
|
There was a problem hiding this comment.
Pull Request Overview
This PR removes the deprecated sx prop support from the Checkbox component as part of Primer React's migration away from styled-system. The change removes the sx prop from the component interface, eliminates the conditional rendering logic that wrapped the checkbox in a Box component when sx was present, and updates associated documentation and tests.
Key Changes:
- Removed
sxprop fromCheckboxPropsinterface and component implementation - Simplified component rendering by removing conditional
Boxwrapper logic - Updated Storybook configuration and documentation to reflect the removed prop
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react/src/Checkbox/Checkbox.tsx | Removed SxProp type, Box import, sx parameter, and conditional rendering logic |
| packages/react/src/Checkbox/Checkbox.stories.tsx | Removed sx from excluded control keys in Storybook configuration |
| packages/react/src/Checkbox/Checkbox.docs.json | Removed sx prop documentation entry |
| .changeset/tasty-cheetahs-pay.md | Added changeset documenting the breaking change |
francinelucca
commented
Sep 5, 2025
Note: make sure to run integration checks 🙏 |
👋 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! |
👋 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! |
👋 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! |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/2741 |
🟢 ci completed with status |
Uh oh!
There was an error while loading. Please reload this page.
…y epic The data-* event contract (data-event-type / data-event-scope / data-actor-type) is owned by github/primer#6664 (Phase 3), whose "category taxonomy and data-* tagging" section is the actual deliverable. github/primer#6654 is the broad parity epic, not the contract. Fix the citations in all six banners plus the toEventDataAttributes serializer note, and relabel #6654 as the parent epic.
Closeshttps://github.com/github/primer/issues/5759
Current
sxusage: 2✅
sxusages are only in repos other than github-ui; those usages have been added to the tracking issueChangelog
Removed
Remove support for
sxfrom theCheckboxcomponent, and associated stories, docs, and testsRollout strategy
We are using the
@primer/styled-reactcomponent to mitigate removingsxusage. We will make sure usage is updated upstream before merging.Merge checklist