Skip to content

Add FilterBuilder component#4294

Draft
amcclain wants to merge 11 commits into
developfrom
filter-builder
Draft

Add FilterBuilder component#4294
amcclain wants to merge 11 commits into
developfrom
filter-builder

Conversation

@amcclain

@amcclain amcclain commented Mar 10, 2026

Copy link
Copy Markdown
Member

Summary

  • New FilterBuilder panel component for constructing filters of arbitrary complexity with nested AND/OR groups, NOT negation, type-appropriate value editors, favorites, and persistence.
  • Cross-platform FilterBuilderModel with mutable working tree, apply/cancel workflow, bi-directional Store binding, and favorites support.
  • CompoundFilter not support for negated filter groups (backwards-compatible).
  • Renamed BaseFilterFieldSpecFilterFieldSpec for cleaner class hierarchy.
  • New cmp/filter/README.md documenting both FilterChooser and FilterBuilder.

Companion PR

Test plan

  • Verify FilterBuilder renders with field/operator/value editors for all field types (string, number, date, bool)
  • Test nested AND/OR groups with NOT negation
  • Test apply/cancel workflow (commitOnChange=false) and live sync (commitOnChange=true)
  • Test favorites save/load/delete with localStorage persistence
  • Verify bi-directional sync between FilterBuilder and FilterChooser on same Store
  • Verify empty state placeholder with Add Rule button
  • Run yarn lint && npx tsc --noEmit

🤖 Generated with Claude Code

amcclain and others added 2 commits March 10, 2026 10:27
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>
@amcclain

Copy link
Copy Markdown
Member Author
CleanShot 2026-03-10 at 15 23 21@2x

amcclain and others added 9 commits March 11, 2026 06:19
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant