Repository navigation
fix: use normal input background for SelectPanel filter text input - #8545
tay1orjones wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: 28c4fc9 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 |
|
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
0f71353 to
28c4fc9
Compare
There was a problem hiding this comment.
🟢 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.
|
Integration test results from github/github-ui PR:
All checks passed! |
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
Removed
Rollout strategy
primer_react_select_panel_legacy_contrastdefaults tofalse, so the background changes without enabling a flag. Enable it to restore the previous background. ExplicittextInputProps.contraststill wins:trueenables contrast;falseor explicitly passingundefineddisables 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
bugin the filter, then press Escape: filtering should work and focus should return to the anchor. Repeat with the modal story and a narrow viewport.