feat(data-table): redesign Filters — menu-driven add flow + segmented chips#385
Draft
itsprade wants to merge 1 commit into
Draft
feat(data-table): redesign Filters — menu-driven add flow + segmented chips#385itsprade wants to merge 1 commit into
itsprade wants to merge 1 commit into
Conversation
… chips - Replace the add-filter popover (nested selects) with a Menu flyout: all filterable fields visible on open; number/date/time fields get a condition step (field ▸ condition ▸ value), others go straight to value. - Segmented filter chips: field │ operator │ value │ ✕, with a searchable operator dropdown on the operator segment. - Add `FilterConfig.chooseOperator` (defaults true for number/date/datetime/time, false otherwise) to opt a field in/out of the condition step. - Friendlier operator labels (is / is not / is between / is any of …), enum multi-select summarized as "N items", compact date ranges. - Extract shared `FilterCheckbox` + `EnumOptionList` for a consistent primary-colored checkbox across all filter surfaces. - `Menu.Content` gains `position.trackAnchor` to pin the menu when opening it shifts the trigger. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Redesigns
DataTable.Filtersfor a faster, more direct filtering experience. The old flow — an "Add filter" popover with nestedSelects, plus single-button chips that opened a popover with an operator select + Apply — is replaced with a menu-driven add flow and segmented filter chips.Closes #1509.
What changed
Add-filter menu
Menuflyout. Every filterable field is visible the moment you open it; hovering a field reveals a type-specific editor as a submenu — no more dropdown-inside-a-dropdown.field ▸ condition ▸ value(three nested popups) — so you can choose greater than / between / before while adding. Other fields go straight to the value with a sensible default operator.Segmented filter chips
field │ operator │ value │ ✕.betweenshows a min/max range).New API —
FilterConfig.chooseOperator?: booleantruefornumber/date/datetime/time;falseforstring/enum/boolean/uuid. Additive and backward-compatible.Polish & consistency
is,is not,is between,is any of,is none of; date-specificexact date/after/before.FilterCheckbox+EnumOptionListso the primary-colored checkbox is identical across the add menu, the chip value editor, and the case-sensitive toggle.Menu.Contentgainsposition.trackAnchor(via the sharedPositionProps) to pin a menu when opening it shifts the trigger.Testing & quality
pnpm type-check— cleanpnpm lint— 0 warnings / 0 errorspnpm test— 1325 passed (72 files);toolbar.test.tsxrewritten for the new segmented-chip + menu structure with equivalent coverage (Apply/Enter commits, clear→remove, case-sensitivity, live enum toggle, boolean, numeric/temporal single + between, date operator relabeling, legacy-operator preservation, remove button) plus new coverage for the enum count summary and date-range display.pnpm build— clean (incl..d.tsgeneration)minor).Follow-ups (intentionally out of scope)
Column.icon,SelectOption.icon/avatar) and is deferred to a separate PR.Intldate parts render inconsistently across locales; current output shows both full dates.🤖 Generated with Claude Code