Add FilterBuilder component - #4294
Draft
amcclain wants to merge 14 commits into
Draft
Conversation
New panel-based component for constructing filters of arbitrary complexity. Provides a visual query builder UI with nested AND/OR groups, NOT negation, type-appropriate value editors, favorites, persistence, and full integration with Hoist's filter binding system. Key additions: - FilterBuilderModel (cross-platform) with mutable working tree, apply/cancel workflow, bi-directional binding, and favorites - FilterBuilderFieldSpec extending renamed FilterFieldSpec (was BaseFilterFieldSpec) - Desktop FilterBuilder component with recursive group cards, type-mapped value editors, and favorites menu - CompoundFilter `not` support for negated filter groups - cmp/filter/README.md documenting both FilterChooser and FilterBuilder - CHANGELOG, doc index, doc registry, and roadmap updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
Member
Author
- Simplify `FilterGroupNode.isComplete` (redundant ternary) - Simplify `fromFilter` op normalization - Add `@computed` to `FilterRuleNode.isComplete` for proper MobX caching - Use field spec display names in favorite descriptions, with safe fallback for stale favorites Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Conflict resolutions: - data/filter/FilterFieldSpec.ts: kept the branch's FilterFieldSpec naming (dropping develop's reintroduced `Base` prefix) while adopting develop's new JSDoc on the config interface. - CHANGELOG.md: combined both sides' New Features entries under the current 86.0.0-SNAPSHOT heading. - docs/planning/docs-roadmap-log.md: merged both sides' dated log entries in ascending order.
The 86.0.0-SNAPSHOT entry had two separate `### 🎁 New Features` sections; merged the persistence (`pathPrefix` / `persistOptions()`) bullets into the single New Features section ahead of Bug Fixes, per the standard changelog section order.
Catches the branch up across 202 commits of develop (v86 release through v87.0.0-SNAPSHOT), including the React 19 upgrade, the pnpm migration, and the data-layer/column-chooser overhaul. Conflict resolutions: - `cmp/grid/filter/GridFilterFieldSpec.ts` - develop kept `BaseFilterFieldSpec` while this branch renamed it to `FilterFieldSpec` (planned step 0a). Took develop's newer content wholesale - the `GridFilterRenderer` / `GridFilterSortValueFn` types, the added `sortValue` config, and the blank `tags` filter fix - and re-applied it against the `FilterFieldSpec` name. Develop's other changes to the base spec (the `date` -> `localDate` default from #3338) came through git's rename detection already. - `CHANGELOG.md` - moved the `FilterBuilder` and `CompoundFilter` `not` entries under the `87.0.0-SNAPSHOT` heading and dropped the stale duplicates this branch carried (`CheckboxButton`, `SegmentedControl`, Admin Metrics publish controls, `FileChooser`), which have since shipped and are filed under released versions on develop. Also converted em dashes in our own entries to " - " per docs/changelog-format.md. Also updated the verification commands in the FilterBuilder PLAN.md from yarn to pnpm to follow the repo's package-manager migration, and scrubbed a private client name from a pre-existing docs-roadmap-log entry that the client-name guard flagged. Verified: pnpm lint, pnpm typecheck, pnpm lint:mcp, and pnpm audit --prod --audit-level high all pass. Doc indexes and docs/doc-registry.json reconcile clean against the merged tree.
Picks up 5 commits: the PatchableRecordSet consolidation into RecordSet, the data package README rewrite, the new kit/blueprint README, and Inspector pop-out window support. Conflict resolutions: - `data/README.md` - develop's README rewrite dropped our `/cmp/filter/` cross-link and added a `/svc/` entry. Kept both. - `docs/planning/docs-roadmap-log.md` - develop scrubbed the same client name we did last merge, with the correct `JobSite` casing. Took develop's version. Also tightened the `cmp/filter/README.md` keywords in `docs/doc-registry.json` to follow develop's updated keyword rule in the xh-update-doc-links skill, which now requires distinctive terms. Dropped `bind`, `commitOnChange`, `AND`, `OR`, and `NOT` - all generic or owned by another package - in favor of exported symbols such as `FilterBindTarget`, `FilterValueSource`, and `FilterGroupNode`. Verified: pnpm lint, pnpm typecheck, and pnpm audit --prod --audit-level high all pass. Doc registry and inter-doc links reconcile clean.
Picks up 3 commits: Inspector Cube/View tracking with a data-pipeline Diagnostics panel, a fix for mobile inputs broken by the callback ref handed to react-onsenui, and removal of the obsolete `PatchableRecordSet` references. No conflicts. The `PatchableRecordSet` cleanup covers the stale doc-registry keyword flagged after the last merge. Verified: pnpm lint, pnpm typecheck, and pnpm audit --prod --audit-level high all pass. Doc registry and inter-doc links reconcile clean.
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
FilterBuilderpanel component for constructing filters of arbitrary complexity with nested AND/OR groups, NOT negation, type-appropriate value editors, favorites, and persistence.FilterBuilderModelwith mutable working tree, apply/cancel workflow, bi-directional Store binding, and favorites support.CompoundFilternotsupport for negated filter groups (backwards-compatible).BaseFilterFieldSpec→FilterFieldSpecfor cleaner class hierarchy.cmp/filter/README.mddocumenting both FilterChooser and FilterBuilder.Companion PR
Test plan
yarn lint && npx tsc --noEmit🤖 Generated with Claude Code