-
Notifications
You must be signed in to change notification settings - Fork 645
chore(Select): Remove the CSS modules feature flag from the Select component #6015
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: 6bf8f70 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/376658 |
|
🟢 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
Remove the CSS modules feature flag from the Select component and simplify its implementation.
- Drop all feature-flag toggles and styled-component variants in favor of a single native
<select>with CSS modules. - Update the ArrowIndicator to always use the CSS modules class.
- Remove legacy flag-based tests and adjust testing to the simplified API.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/react/src/tests/Select.test.tsx | Removed FeatureFlags import and legacy flag-based test cases |
| packages/react/src/Select/Select.tsx | Eliminated feature-flag logic and styled-component wrappers, simplified to native <select> |
| .changeset/loose-planes-mix.md | Added a changeset entry for removing the feature flag |
Comments suppressed due to low confidence (1)
packages/react/src/tests/Select.test.tsx:21
- Add tests covering placeholder insertion and
validationStatusbehavior (e.g., verify that a placeholder option is rendered whenplaceholderis provided and thataria-invalidis set whenvalidationStatusis 'error').
expect(render(<Element />).getAllByTestId('select-default')[0]).toHaveClass('test-class-name')
| sx={sx} | ||
| > | ||
| <StyledSelect | ||
| <select |
Copilot
AI
May 7, 2025
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.
The new <select> element no longer includes aria-invalid, data-hasplaceholder, or defaultValue props that were on the previous styled component; restoring these ensures accessible error reporting and correct placeholder behavior.
Closes https://github.com/github/primer/issues/4299
Changelog
New
Changed
Removed
Remove the CSS modules feature flag from the Select component
Rollout strategy
Testing & Reviewing
Merge checklist