-
Notifications
You must be signed in to change notification settings - Fork 621
chore(SegmentedControl): Remove the CSS modules feature flag from the SegmentedControl component #5933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: fe97485 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 📦
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/377284 |
🟢 golden-jobs completed with status |
There was a problem hiding this 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 legacy CSS modules feature flag and styled-components toggles from the SegmentedControl
suite, consolidating all styling in CSS modules and the BoxWithFallback
component.
- Eliminated the
getSegmentedControlStyles
file and its related feature flag. - Replaced all
toggleStyledComponent
andstyled
usages inSegmentedControl
,SegmentedControlButton
, andSegmentedControlIconButton
withBoxWithFallback
and CSS module classes. - Updated CSS to include a new
.LeadingIcon
rule for consistent icon spacing.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/SegmentedControl/getSegmentedControlStyles.ts | Deleted—removed the old style generator and feature flag. |
packages/react/src/SegmentedControl/SegmentedControlIconButton.tsx | Swapped styled-component logic for BoxWithFallback + CSS modules. |
packages/react/src/SegmentedControl/SegmentedControlButton.tsx | Swapped styled-component logic for BoxWithFallback + CSS modules. |
packages/react/src/SegmentedControl/SegmentedControl.tsx | Replaced the toggled ul and inline styles with BoxWithFallback . |
packages/react/src/SegmentedControl/SegmentedControl.module.css | Added .LeadingIcon for icon margin. |
.changeset/chilled-camels-obey.md | Added changeset for minor release. |
Co-authored-by: Josh Black <[email protected]>
👋 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! |
… SegmentedControl component (#5933) Co-authored-by: Josh Black <[email protected]>
Closes https://github.com/github/primer/issues/3917
Changelog
New
Changed
Removed
Remove the CSS modules feature flag from the SegmentedControl component
Rollout strategy
Testing & Reviewing
Shouldn't have any visual effect on production.
Merge checklist