Skip to content

Conversation

@jonrohan
Copy link
Member

@jonrohan jonrohan commented May 7, 2025

Closes https://github.com/github/primer/issues/4305

Changelog

New

Changed

Removed

Remove the CSS modules feature flag from the CheckboxOrRadioGroup component

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

@changeset-bot
Copy link

changeset-bot bot commented May 7, 2025

🦋 Changeset detected

Latest commit: 2140190

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

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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 staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels May 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 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
Copy link
Contributor

github-actions bot commented May 7, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 98.74 KB (-0.16% 🔽)
packages/react/dist/browser.umd.js 98.97 KB (-0.23% 🔽)

@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 golden-jobs 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: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels May 7, 2025
@jonrohan jonrohan marked this pull request as ready for review May 7, 2025 00:35
Copilot AI review requested due to automatic review settings May 7, 2025 00:35
@jonrohan jonrohan requested a review from a team as a code owner May 7, 2025 00:35
@jonrohan jonrohan requested a review from francinelucca May 7, 2025 00:35
@jonrohan jonrohan enabled auto-merge May 7, 2025 00:36
Copy link
Contributor

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 now-obsolete CSS modules feature flag and all associated conditional rendering from the CheckboxOrRadioGroup component and its subcomponents, simplifying them to always use CSS modules and the new BoxWithFallback wrapper.

  • Remove the CSS_MODULES_FLAG feature flag and related imports
  • Simplify CheckboxOrRadioGroupLabel and CheckboxOrRadioGroupCaption to a single implementation path
  • Replace the toggled styled component in CheckboxOrRadioGroup with BoxWithFallback and drop conditional branches

Reviewed Changes

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

Show a summary per file
File Description
packages/react/src/internal/components/CheckboxOrRadioGroup/FeatureFlag.tsx Deleted feature flag constant
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.tsx Removed feature-flag branches and imports
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.tsx Removed feature-flag branches and imports
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx Replaced toggleStyledComponent logic with BoxWithFallback; removed conditional branches
.changeset/afraid-pens-return.md Added changeset recording removal of the feature flag
Comments suppressed due to low confidence (2)

packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx:117

  • Remove the as: 'div' property from the props spread on this <div> wrapper, since it renders a native <div> and the as attribute is invalid HTML.
as: 'div',

packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.tsx:23

  • The sx prop is being destructured but never passed through to VisuallyHidden. Either forward sx={sx} or remove it from the component signature.
sx,

@jonrohan jonrohan added this pull request to the merge queue May 7, 2025
Merged via the queue into main with commit 2b2b541 May 7, 2025
50 checks passed
@jonrohan jonrohan deleted the css_modules_remove_flag/checkboxorradiogroup branch May 7, 2025 02:49
@primer primer bot mentioned this pull request May 7, 2025
hectahertz pushed a commit that referenced this pull request May 20, 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