Skip to content

Conversation

liuliu-dev
Copy link
Contributor

@liuliu-dev liuliu-dev commented Aug 21, 2025

Removes support for the sx prop from the RadioGroup component and its related sub-components. Closes #4823

Changelog

  • RadioGroup: Removed SxProp
    • CheckboxOrRadioGroup: Replaced BoxWithFallback with fieldset and div and removed sx prop support
    • sub-components: Removed sx prop from:
      • CheckboxOrRadioGroupCaption
      • CheckboxOrRadioGroupLabel
      • CheckboxOrRadioGroupValidation
    • Replaced sx in stories and examples
      • Banner.examples.stories, use RadioGroup
      • CheckboxGroup.dev.stories, use CheckboxOrRadioGroupCaption and CheckboxOrRadioGroupLabel
  • Major release; if selected, include a written rollout or migration plan

Copy link

changeset-bot bot commented Aug 21, 2025

🦋 Changeset detected

Latest commit: 1e13046

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

This PR includes changesets to release 2 packages
Name Type
@primer/styled-react Patch
@primer/react 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 21, 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!

Copy link
Contributor

github-actions bot commented Aug 21, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.04 KB (+0.02% 🔺)
packages/react/dist/browser.umd.js 90.27 KB (+0.06% 🔺)

@github-actions github-actions bot requested a deployment to storybook-preview-6642 August 21, 2025 21:23 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6642 August 21, 2025 21:34 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-6642 August 25, 2025 17:27 Abandoned
@liuliu-dev liuliu-dev marked this pull request as ready for review August 25, 2025 19:51
@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 19:51
@liuliu-dev liuliu-dev requested a review from a team as a code owner August 25, 2025 19:51
@liuliu-dev liuliu-dev requested a review from TylerJDev August 25, 2025 19:51
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 sx prop support from the RadioGroup component and its related sub-components as part of a breaking change. The changes involve replacing styled components with native HTML elements and moving styling to CSS modules.

Key changes:

  • Removed SxProp from RadioGroup and all CheckboxOrRadioGroup sub-components
  • Replaced BoxWithFallback with native fieldset and div elements in CheckboxOrRadioGroup
  • Updated styled-react package to provide a wrapper for backward compatibility

Reviewed Changes

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

Show a summary per file
File Description
packages/styled-react/src/index.ts Adds styled RadioGroup wrapper for backward compatibility
packages/styled-react/src/tests/snapshots/exports.test.ts.snap Updates export snapshot to reflect RadioGroup position change
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.tsx Removes sx prop from validation component
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.tsx Removes sx prop from label component
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.tsx Removes sx prop from caption component
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx Replaces BoxWithFallback with native elements and removes sx support
packages/react/src/RadioGroup/RadioGroup.tsx Removes SxProp from RadioGroup type definition
packages/react/src/RadioGroup/RadioGroup.stories.tsx Removes sx from excluded controls in Storybook
packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx Replaces sx styling with CSS module classes
packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.module.css Adds CSS module for CheckboxGroup dev stories styling
packages/react/src/Banner/Banner.examples.stories.tsx Replaces sx prop with CSS module class
packages/react/src/Banner/Banner.examples.stories.module.css Adds CSS module for Banner examples styling
.changeset/quick-bats-remain.md Documents the breaking change

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