feat(dashboard-filters): #2578 follow-ups — catalog examples, guide tutorial, i18n entries, spec-alignment cleanup#2581
Merged
Conversation
…utorial, i18n entries, spec-alignment cleanup Follow-ups to the dashboard-level filters feature (#2576, framework#2501): - schema-catalog: five new plugin-dashboard examples — optionsFrom dynamic options, text/number/lookup filter types, dataset + inline widget mix, legacy targetWidgets allow-list, and date presets + custom range with a dateRange opt-out. - docs: new 'Dashboard-Level Filters' guide page (full tutorial from zero: dateRange + globalFilters + filterBindings, page.* expression usage, filter-type condition table, known limitations with workarounds); cross- linked from plugin-dashboard.mdx. - i18n: dashboard.filters.* entries for en and zh (bar label, All time, Custom…, All, Reset, and the 13 date-range preset labels) — the filter bar previously always rendered the useSafeTranslate English fallbacks. - types: GlobalFilterSchema.name + DashboardWidgetSchema.filterBindings are now landed in @objectstack/spec, so the 'Pending alignment' JSDoc flips to 'Aligned' (no shape changes). 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. |
13 tasks
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.
Summary
Follow-ups to the dashboard-level filters feature (#2576, framework#2501), tracked in #2578 — this PR covers the schema-catalog examples (item 1), the docs + i18n work (item 2), and the objectui side of the spec pairing (item 3, paired with objectstack-ai/framework#3035 on the same branch name).
Changes
Schema-catalog examples (issue item 1) — five new
plugin-dashboardexamples, registered in the catalog index:filtered-dashboard-dynamic-options—optionsFromselect filter fetching distinct values from object records, with a cross-objectfilterBindingsre-target.filtered-dashboard-filter-types—text($contains),number(equality) andlookup(optionsFrom) filters, plus a metric opted out of all three.filtered-dashboard-dataset-widgets— dataset-bound widgets (dataset+values, scoped via the dataset query'sruntimeFilter) mixed with inlineobjectwidgets under one dateRange + region filter.filtered-dashboard-target-widgets— legacytargetWidgetsallow-list semantics, including an explicitfilterBindingsentry winning over the allow-list.filtered-dashboard-date-presets—defaultRange+allowCustomRange, a per-widget date-field override, and adateRange: falseopt-out.Docs (issue item 2) — new guide page
content/docs/guide/dashboard-filters.md(registered inguide/meta.json, cross-linked fromplugin-dashboard.mdx):dateRange→globalFilters→filterBindings, with the binding precedence rules;page.<name>expression usage in widgets (value display, conditional visibility,page.dateRangeobject shape);variablesshadowing (inner provider wins), static-data (inlinedata) widgets not filtered, default bindings hitting non-existent fields →filterBindingsoverride orfalseopt-out.i18n (issue item 2) —
dashboard.filters.*entries forenandzh(bar label, "All time", "Custom…", "All", "Reset", and the 13 date-range preset labels). The filter bar previously always rendered theuseSafeTranslateEnglish fallbacks.Spec pairing cleanup (issue item 3) —
GlobalFilterSchema.nameandDashboardWidgetSchema.filterBindingsland in@objectstack/specvia framework#3035, so the "Pending alignment" JSDoc inpackages/typesflips to "Aligned" (no shape changes). The metadata-admin inspector (dashboard-schema.ts) derives its form from the spec schema, so the new properties appear there automatically once the@objectstack/specdependency is bumped to a release containing them.Not in this PR (still open in #2578)
invoices/accountsseed data (item 1, last two bullets).filterBindingseditor (item 4).optionsFrom, metadata-aware default-binding skip, nested Page variables context merging.Testing
pnpm --filter @object-ui/types build— clean.pnpm --filter @object-ui/i18n build && test— 10 files / 86 tests passing.pnpm --filter @object-ui/example-schema-catalog build && test— 848 tests passing (includes per-example validation of the five new JSON schemas).node scripts/check-doc-links.mjs— no new broken links (the one reportedenhanced-actions.mdxlink pre-exists onmain).node scripts/check-changeset-fixed.mjs— clean.Refs #2578, #2576, framework#2501
🤖 Generated with Claude Code
https://claude.ai/code/session_01HG5LQnPbQbjAAyofghzz3Z
Generated by Claude Code