Skip to content

remove sx from RadioGroup and Truncate - #6685

Merged
liuliu-dev merged 14 commits into
mainfrom
liuliu/remove-sx-from-RadioGroup-and-Truncate
Sep 22, 2025
Merged

remove sx from RadioGroup and Truncate#6685
liuliu-dev merged 14 commits into
mainfrom
liuliu/remove-sx-from-RadioGroup-and-Truncate

Conversation

@liuliu-dev

@liuliu-devliuliu-dev commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Removes support for the sx prop from the RadioGroup component

  • RadioGroup: Removed SxProp and replace sx in Banner.examples.stories that uses RadioGroup
  • Migrates the Truncate component away from BoxWithFallback components and sx prop support to use CSS modules

Note:

Screenshot 2025-09-15 at 4 17 52 PM
  • Multiple repos are using Truncate with sx props including github/github-ui, need to update the import in github/github-ui, wait until this change is in to update the export pattens.
Screenshot 2025-09-15 at 4 18 26 PM
  • Major release; if selected, include a written rollout or migration plan

@changeset-bot

changeset-botBot commented Aug 27, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 90be68b

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 27, 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 requested a deployment to storybook-preview-6685 August 27, 2025 22:30 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6685 August 27, 2025 22:38 Inactive
@github-actions

github-actionsBot commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js89.81 KB (+0.07% 🔺)
packages/react/dist/browser.umd.js89.9 KB (+0.02% 🔺)

@github-actions

Copy link
Copy Markdown
Contributor

Uh oh! @liuliu-dev, at least one image you shared is missing helpful alt text. Check your pull request body to fix the following violations:

  • Images should have meaningful alternative text (alt text) at line 10
  • Images should have meaningful alternative text (alt text) at line 14

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically by github/accessibility-alt-text-bot.

@github-actions
github-actionsBottemporarily deployed to storybook-preview-6685 September 15, 2025 23:23 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 15, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6685 September 16, 2025 17:30 Inactive
@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 16, 2025
@liuliu-dev
liuliu-dev marked this pull request as ready for review September 16, 2025 18:01
@liuliu-dev
liuliu-dev requested a review from a team as a code ownerSeptember 16, 2025 18:01

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 PR removes the sx prop support from the RadioGroup and Truncate components as part of migrating away from styled-components to CSS modules. The changes ensure backward compatibility by maintaining sx support in the styled-react package while removing it from the core components.

  • Removes sx prop from RadioGroup and Truncate components in the main package
  • Adds wrapper components in styled-react package to maintain backward compatibility
  • Migrates Truncate from BoxWithFallback to native React components with CSS modules

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/styled-react/src/index.tsxAdds wrapper components for RadioGroup and Truncate that restore sx prop support for backward compatibility
packages/react/src/index.tsExports RadioGroupProps type for external usage
packages/react/src/Truncate/Truncate.tsxRemoves sx prop and BoxWithFallback dependency, migrates to CSS modules
packages/react/src/RadioGroup/RadioGroup.tsxRemoves sx prop from RadioGroupProps type definition
packages/react/src/Banner/Banner.examples.stories.tsxReplaces sx prop usage with CSS module class
packages/react/src/ActionList/Description.tsxRemoves sx prop usage from Truncate component

Comment threadpackages/react/src/ActionList/Description.tsx
Comment threadpackages/styled-react/src/index.tsx Outdated
@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 17, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6685 September 17, 2025 18:58 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 17, 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 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
@primer-integration

Copy link
Copy Markdown

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

@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

@liuliu-dev
liuliu-dev added this pull request to the merge queueSep 22, 2025
Merged via the queue into main with commit 00261c9Sep 22, 2025
43 checks passed
@liuliu-dev
liuliu-dev deleted the liuliu/remove-sx-from-RadioGroup-and-Truncate branch September 22, 2025 19:03
@primerprimerBot mentioned this pull request Sep 22, 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/gh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@liuliu-dev@joshblack