Skip to content

Conversation

francinelucca
Copy link
Member

Borrowing changes from #6929 that don't have blockers and can be merged now

Relates to https://github.com/github/primer/issues/5424 and https://github.com/github/primer/issues/5828

Changelog

Removed

  • sxProp and BoxWithFallback from components that no longer support it

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Co-authored-by: Mike Perrotti <mperrotti@users.noreply.github.com>
@francinelucca francinelucca requested a review from a team as a code owner October 7, 2025 16:43
Copy link

changeset-bot bot commented Oct 7, 2025

🦋 Changeset detected

Latest commit: 8dbc374

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 Patch
@primer/styled-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 staff Author is a staff member label Oct 7, 2025
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 the remaining sx prop support from various components as part of the cleanup effort to migrate away from the legacy styled-components system to CSS modules. The changes eliminate SxProp type annotations, remove BoxWithFallback dependencies, and update Storybook configuration to exclude the removed props.

Key changes:

  • Removed sx prop support from internal components and helper utilities
  • Replaced BoxWithFallback usage with native HTML elements in affected components
  • Updated Storybook controls to exclude the removed sx prop from various component stories

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/react/src/utils/story-helpers.tsx Removed 'sx' from textInputExcludedControlKeys array
packages/react/src/utils/form-story-helpers.tsx Removed 'sx' from textInputExcludedControlKeys array
packages/react/src/internal/components/UnstyledTextInput.tsx Removed SxProp type and BoxWithFallback, replaced with native input element
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.tsx Removed SxProp type and sx prop usage from component
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.tsx Removed SxProp type and replaced with HTMLSpanElement props
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx Removed SxProp, BoxWithFallback usage, and sx prop; replaced with dynamic component selection
packages/react/src/UnderlineNav/UnderlineNav.stories.tsx Removed 'sx' from excludedControlKeys array
packages/react/src/RadioGroup/RadioGroup.stories.tsx Removed 'sx' from Storybook controls exclude list
packages/react/src/Radio/Radio.stories.tsx Removed 'sx' from excludedControlKeys array
packages/react/src/CheckboxGroup/CheckboxGroup.stories.tsx Removed 'sx' from Storybook controls exclude list
packages/react/src/AvatarStack/AvatarStack.tsx Removed BoxWithFallback dependency and replaced with native span element

@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 Oct 7, 2025
Copy link
Contributor

github-actions bot commented Oct 7, 2025

👋 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 requested a deployment to storybook-preview-6959 October 7, 2025 16:48 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6959 October 7, 2025 16:56 Inactive
@primer-integration
Copy link

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

@github-actions github-actions bot added integration-tests: failing Changes in this PR 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 Oct 7, 2025
@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: failing Changes in this PR cause breaking changes in gh/gh labels Oct 7, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 7, 2025
Merged via the queue into main with commit 76f1ca3 Oct 7, 2025
43 of 45 checks passed
@francinelucca francinelucca deleted the chore/cleanup-remaining-sx branch October 7, 2025 18:48
@primer primer bot mentioned this pull request Oct 7, 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 staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants