Skip to content

Conversation

@jonrohan
Copy link
Member

@jonrohan jonrohan commented May 7, 2025

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

Changelog

New

Changed

Removed

Remove the CSS modules feature flag from the Select 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: 6bf8f70

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 the staff Author is a staff member label 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 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 May 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 98.68 KB (-0.06% 🔽)
packages/react/dist/browser.umd.js 98.91 KB (-0.07% 🔽)

@primer-integration
Copy link

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

@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 03:55
Copilot AI review requested due to automatic review settings May 7, 2025 03:55
@jonrohan jonrohan requested a review from a team as a code owner May 7, 2025 03:55
@jonrohan jonrohan requested a review from TylerJDev May 7, 2025 03:55
@jonrohan jonrohan enabled auto-merge May 7, 2025 03:55
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

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 validationStatus behavior (e.g., verify that a placeholder option is rendered when placeholder is provided and that aria-invalid is set when validationStatus is 'error').
expect(render(<Element />).getAllByTestId('select-default')[0]).toHaveClass('test-class-name')

sx={sx}
>
<StyledSelect
<select
Copy link

Copilot AI May 7, 2025

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.

Copilot uses AI. Check for mistakes.
@jonrohan jonrohan added this pull request to the merge queue May 7, 2025
Merged via the queue into main with commit 237186a May 7, 2025
49 checks passed
@jonrohan jonrohan deleted the css_modules_remove_flag/select branch May 7, 2025 13:38
@primer primer bot mentioned this pull request May 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