Skip to content

fix: use normal input background for SelectPanel filter text input - #8545

Open
tay1orjones wants to merge 4 commits into
mainfrom
tay1orjones-select-panel-legacy-contrast
Open

tay1orjones wants to merge 4 commits into
mainfrom
tay1orjones-select-panel-legacy-contrast

Conversation

@tay1orjones

Copy link
Copy Markdown
Contributor

Stacked on #8525.

SelectPanel's forced contrast background can make its filter input look disabled. Use the normal TextInput background by default, with a flag to restore the previous appearance.

Changelog

New

Changed

  • SelectPanel uses the normal filter input background by default.

Removed

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

primer_react_select_panel_legacy_contrast defaults to false, so the background changes without enabling a flag. Enable it to restore the previous background. Explicit textInputProps.contrast still wins: true enables contrast; false or explicitly passing undefined disables it. The prop remains deprecated.

Testing & Reviewing

Open SelectPanel's Default story and compare it with Features / Legacy Contrast. Switch between light, dark, and high-contrast themes. The default input should use the normal background; the legacy story should restore the inset background. Type bug in the filter, then press Escape: filtering should work and focus should return to the anchor. Repeat with the modal story and a narrow viewport.

@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 28c4fc9

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 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

@tay1orjones tay1orjones added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 14, 2026
@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 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

@github-actions
github-actions Bot temporarily deployed to storybook-preview-8545 October 14, 2026 17:32 Inactive
@tay1orjones tay1orjones added update snapshots 🤖 Command that updates VRT snapshots on the pull request and removed update snapshots 🤖 Command that updates VRT snapshots on the pull request labels Oct 14, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8545 October 14, 2026 18:03 Inactive
@github-actions github-actions Bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 14, 2026
@tay1orjones
tay1orjones added this pull request to stack #8546 October 14, 2026 18:12
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8545 October 14, 2026 18:17 Inactive
tay1orjones and others added 4 commits October 14, 2026 13:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dcc70c7e-b01a-4abf-b3c3-f5251562a733
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 198155a9-4a01-40bd-a329-f414c1c8cb50
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 198155a9-4a01-40bd-a329-f414c1c8cb50
@tay1orjones
tay1orjones force-pushed the tay1orjones-select-panel-legacy-contrast branch from 0f71353 to 28c4fc9 Compare October 14, 2026 18:53
@tay1orjones tay1orjones changed the title use the normal SelectPanel filter background by default fix: use normal input background for SelectPanel filter text input Oct 14, 2026
@tay1orjones
tay1orjones marked this pull request as ready for review October 14, 2026 19:09
@tay1orjones
tay1orjones requested a review from a team as a code owner October 14, 2026 19:09
@tay1orjones
tay1orjones requested review from TylerJDev and a balanced review from Copilot October 14, 2026 19:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The scoped change consistently preserves explicit overrides and has matching documentation and regression coverage; runtime tests were not executed.

0 open findings

What changed in this PR

Updates SelectPanel to use the normal TextInput background, following the deprecation of contrast.

Changes:

  • Adds a default-off flag to restore legacy contrast styling while preserving explicit prop overrides.
  • Adds regression tests and a legacy-contrast story.
  • Documents the behavior and includes a patch changeset.
File Description
packages/​react/​src/​SelectPanel/​SelectPanel.tsx Uses flag-controlled contrast defaults.
packages/​react/​src/​SelectPanel/​SelectPanel.test.tsx Tests defaults, overrides, filtering, and focus.
packages/​react/​src/​SelectPanel/​SelectPanel.features.stories.tsx Adds a legacy-contrast demonstration.
packages/​react/​src/​SelectPanel/​SelectPanel.docs.json Documents defaults and override precedence.
packages/​react/​src/​FeatureFlags/​DefaultFeatureFlags.ts Registers the default-off compatibility flag.
e2e/​components/​SelectPanel.test.ts Checks themes, panel variants, accessibility, and screenshots.
.changeset/​select-panel-default-background.md Records the patch release change.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@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 14, 2026
@tay1orjones

tay1orjones commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Base automatically changed from tay1orjones-contrast-prop-deprecation to main October 15, 2026 15:25
@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Passed  Changes   Passed
Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@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 15, 2026

This branch was successfully deployed

2 active deployments
storybook-preview-8545 — 28c4fc96 Deployed Oct 14, 2026 by github-actions[bot]
github-pages — 28c4fc96 Deployed Oct 14, 2026 by tay1orjones via deploy-preview #33698
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants