refactor(pageFilters): abstract hybridFilters logic to hook#108217
Merged
refactor(pageFilters): abstract hybridFilters logic to hook#108217
Conversation
Moves checkbox position to the beginning of the row and unwinds the mess of checkwraps. <img width="666" height="624" alt="CleanShot 2026-02-11 at 16 28 05@2x" src="https://github.com/user-attachments/assets/4fe46a08-9619-49b7-9377-fb58088495cb" /> Fix DE-752
…dFilter - Created useStagedCompactSelect hook that encapsulates all state management and business logic for staged selection (commit/cancel/toggle) - Manages modifier key detection for hybrid single/multiple selection mode - Hook returns all handlers and state as a single object (stagedSelect) - Component now focuses on UI rendering while hook handles state logic - All existing tests pass, no behavior changes
…electProps
- Hook now returns a typed `props` object that matches CompactSelectProps
- Props can be spread directly into CompactSelect: {...stagedSelect.props}
- Separates CompactSelect props from utility functions (commit, toggleOption, etc)
- Improves type safety and makes hook more reusable
- All tests pass, no behavior changes
JonasBa
commented
Feb 13, 2026
Comment on lines
+61
to
+69
| defaultValue: Value[]; | ||
| handleReset: () => void; | ||
| hasStagedChanges: boolean; | ||
| modifierKeyPressed: boolean; | ||
| removeStagedChanges: () => void; | ||
| shouldShowReset: boolean; | ||
| stagedValue: Value[]; | ||
| toggleOption: (val: Value) => void; | ||
| disableCommit?: boolean; |
Member
Author
There was a problem hiding this comment.
I will be able to remove these when I create an abstraction for staged select UI components, at which point we can decide if we want to build them into a select multiple API or not
99b7cde to
34c0bd8
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
TkDodo
reviewed
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HybridFilters is just a glorified wrapper around CompactSelect, which should not exist. Instead, what we want is a headless control over compactSelect in the form of a hook. This has the benefit of being composable, deferring some options like hasExternal changes to callers (simply by virtue of not abstracting over the view layer)
In the next change, I will streamline hybrid filter headers and move mappedOptions, menuHeaderTrailingItems and renderFooter to the callers, which then leaves hybridFilters worthless and up for removal