Refactor SelectPanel behind a feature flag with mode-specific next architecture#7732
Refactor SelectPanel behind a feature flag with mode-specific next architecture#7732hectahertz wants to merge 4 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 6070498 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 |
|
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
4f686bc to
b2587a3
Compare
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
b2587a3 to
bc49f6e
Compare
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Closes #
Changelog
New
primer_react_select_panel_next(defaultfalse).SelectPanel(public entry)SelectPanelLegacy(fallback path)SelectPanelNext(flagged path)singleandmulti)Changed
singlevsmulti) and derived once in the wrapper.onSave,onSelectAllChange) are now centralized in a single mode model inSelectPanelNextorchestration.Removed
Why this change
The previous implementation mixed multiple responsibilities in one large component (overlay shell, mode routing, state transitions, selection semantics, and footer behavior). That made regressions more likely and mode-specific behavior harder to reason about.
This refactor keeps rollout risk low (feature-flagged, legacy fallback intact) while making the next path easier to test, evolve, and eventually promote.
What is better now
Key practical improvements:
Rollout strategy
Rationale: Public SelectPanel API remains compatible. Internal architecture is refactored behind a default-off feature flag, with behavior parity coverage and legacy fallback preserved.
Testing & Reviewing
Validated locally:
runTestson:packages/react/src/SelectPanel/SelectPanel.test.tsxpackages/react/src/SelectPanel/SelectPanelNext.test.tsxnpm run type-checkat repository root: passed.Suggested review path:
SelectPanelNext.Merge checklist