feat(studio): filter-mode selector for interface-page user filters#1694
Merged
Conversation
Airtable-parity authoring control for interfaceConfig.userFilters: a None / Tabs / Dropdown / Toggle segmented selector (the 'filter-mode' widget). None is a first-class UI state that maps to ABSENCE of userFilters (onChange(undefined)) — the protocol stores 'no filter bar' as omission, not a literal element: 'none' (ADR-0047 §3.4a). Dropdown/ Toggle modes edit the exposed fields inline (per-field showCount + remove + an add-field picker sourced from the bound object), matching Airtable's 'Dropdowns: <fields>'. ResourceEditPage now feeds widgetContext.objectFields from the draft's source object (interfaceConfig.source / object), so field-picker widgets in the page editor list the real fields instead of being empty. Browser-verified on the showcase Task Workbench page editor: the segmented selector reflects the saved element, None removes userFilters from the draft, Dropdown reveals the field list + add-picker with the source object's fields. Locked by FilterModeWidget.test.tsx (5 cases). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
….4a) Per design review (Airtable converged on None/Tabs/Dropdown): the filter-mode selector now offers None / Tabs / Dropdown only. `toggle` overlaps tabs (presets) + dropdown (per-field values) without adding expressive power and needs per-field defaultValues to be useful — it's the least-exercised path. A deprecated `element: 'toggle'` config still renders its field picker so it stays editable; it just isn't offered as a new choice. Tests assert Toggle is absent + a toggle config stays editable.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
What
Airtable-parity authoring control for
interfaceConfig.userFiltersin the Studio page editor: a None / Tabs / Dropdown / Toggle segmented selector (thefilter-modewidget), matching Airtable's User-filters Elements control.userFilters(onChange(undefined)) — the protocol stores "no filter bar" as omission, not a literalelement: 'none'(ADR-0047 §3.4a). Storage stays clean; authors get the explicit affordance.showCounttoggle, remove, and an add-field picker sourced from the bound object (Airtable's "Dropdowns: ").ResourceEditPagenow feedswidgetContext.objectFieldsfrom the draft's source object (interfaceConfig.source/object), so field-picker widgets in the page editor list the real fields instead of being empty.Pairs with framework PR (page.form.ts references
widget: 'filter-mode'+ the ADR §3.4a note). Independently mergeable — an unknown widget name degrades to the prior composite rendering.Verification
element(Dropdown active); None removesuserFiltersfrom the saved draft (confirmed via?state=draft); Dropdown reveals the field list + add-picker listing showcase_task's real fields.FilterModeWidget.test.tsx: 5 cases (None-active-when-absent, None→undefined, Dropdown→element set, field list + add-picker, tabs hint). All pass.🤖 Generated with Claude Code