feat(metadata-admin): per-widget dataset binding in DashboardWidgetInspector#1585
Merged
Merged
Conversation
…spector Symmetric to report's dataset binding: the dashboard widget inspector now lets you bind a governed dataset (ADR-0021) and pick dimensions/values BY NAME directly in the form — previously the per-widget dataset/dimensions/values were only editable via the raw source tab / API (the inspector is hand-built, not schema-derived, so the curated-form server-field graft didn't reach it). - new "Dataset binding" section: dataset name + dimensions + values (the latter two gated behind a bound dataset). dimensions/values are comma-separated and parsed into string[]; empty dataset clears to undefined. - additive dual-form: the legacy inline object/valueField/categoryField/aggregate query stays visible and editable, so existing single-object widgets are unaffected. When `dataset` is set, DashboardRenderer already branches to <DatasetWidget> (consistent, cross-object, RLS-enforced) — this just makes that binding authorable in the UI. - field access via `(widget as any)` + cast patches (bundled @object-ui/types DashboardWidgetSchema gains these fields only once objectui bumps the spec) — same accessor pattern as DatasetWidget. - i18n: engine.inspector.widget.dataset/dimensions/values + hints (en + zh-CN). - tests: DashboardWidgetInspector.test.tsx (6) — gating, commit/clear via a stateful host, csv parsing, dual-form coexistence, zh-CN, readOnly. Full inspector suite green (68). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Makes per-widget dataset binding authorable in the form, symmetric to the report's dataset binding. The dashboard widget inspector is hand-built (not schema-derived), so the curated-form server-field graft (#1580) didn't reach it —
dataset/dimensions/valueson a widget were only editable via the raw source tab / API. This closes that gap.What
string[]; clearing the dataset sets it toundefined.object/valueField/categoryField/aggregatequery stays visible & editable, so existing single-object widgets are unaffected. Whendatasetis set,DashboardRendereralready branches to<DatasetWidget>(consistent, cross-object, RLS-enforced) — this just makes that binding authorable.(widget as any)+ cast patches (bundled@object-ui/typesgains these fields only once objectui bumps the spec) — same accessor asDatasetWidget.Tests
DashboardWidgetInspector.test.tsx(6): gating, commit/clear via a stateful host, csv parsing, dual-form coexistence, zh-CN, readOnly.🤖 Generated with Claude Code