feat(spec): dashboard filter pairing — GlobalFilterSchema.name + DashboardWidgetSchema.filterBindings (#2501)#3035
Merged
Conversation
…boardWidgetSchema.filterBindings (#2501) Land the two dashboard-level-filter properties the objectui runtime already ships (objectui#2576, follow-up tracked in objectui#2578): - GlobalFilterSchema.name — stable filter name used as the dashboard-variable key (page.<name> in widget expressions) and the key widgets reference in filterBindings; defaults to field. "dateRange" is reserved for the built-in dashboard date range. - DashboardWidgetSchema.filterBindings — per-widget map from a dashboard filter name to one of THIS widget's fields (string override / false opt-out / absent = default to the filter's own field). Purely additive; the metadata-admin dashboard inspector derives its form from this schema via z.toJSONSchema, so both properties surface there automatically once objectui bumps @objectstack/spec. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 97 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…oards guide Pairs the spec addition with its authoring doc: stable filter names as the page.<name> variable key, per-widget binding overrides / opt-out, and the binding precedence order. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z
13 tasks
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
Spec pairing for the dashboard-level filters feature (#2501) shipped in objectui — objectstack-ai/objectui#2576, follow-up items tracked in objectstack-ai/objectui#2578 (section 3). Lands the two properties the objectui runtime already uses so the protocol and the renderer agree:
GlobalFilterSchema.name(optional string) — stable filter name used as the dashboard-variable key (readable in widget expressions aspage.<name>) and as the key widgets reference infilterBindings. Defaults tofield;"dateRange"is reserved for the built-in dashboard date range.DashboardWidgetSchema.filterBindings(optionalRecord<string, string | false>) — per-widget binding from a dashboard filter name to one of THIS widget's fields: a string re-targets the filter to that field,falseopts the widget out, absent falls back to the filter's ownfield.Purely additive — existing dashboards parse unchanged.
The metadata-admin dashboard inspector (objectui
app-shell/src/views/metadata-admin/dashboard-schema.ts) derives its form fromDashboardSchemaviaz.toJSONSchema, so both properties surface there automatically once objectui bumps its@objectstack/specdependency to a release containing this change (no objectui inspector code needed). The paired objectui-side cleanup (flipping the "Pending alignment" JSDoc to "Aligned") is in the sibling objectui PR on the same branch name.Changes
packages/spec/src/ui/dashboard.zod.ts— addGlobalFilterSchema.name+DashboardWidgetSchema.filterBindingswith JSDoc mirroring the objectui runtime semantics.packages/spec/src/ui/dashboard.test.ts— 2 new tests:nameoptional round-trip,filterBindingsstring/false values + rejection of non-string/non-false values..changeset/dashboard-filter-spec-pairing.md— minor bump for@objectstack/spec.Testing
pnpm buildinpackages/spec— clean.pnpm vitest runinpackages/spec— 253 files / 6866 tests passing (17/17 indashboard.test.ts).Refs #2501, objectstack-ai/objectui#2578
🤖 Generated with Claude Code
https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z
Generated by Claude Code