feat(plugin-dashboard): render dataset-bound widgets (ADR-0021 B-P1)#1576
Merged
Conversation
A dashboard widget that binds a semantic-layer `dataset` (instead of an inline
`object`+`valueField` query) now renders via the governed queryDataset path:
new DatasetWidget fetches `dataSource.queryDataset(dataset, {dimensions,
measures: values, compareTo})` and renders a KPI value (metric) or a bar chart
(dimensioned) — numbers match the dataset everywhere. DashboardRenderer branches
to it when `widget.dataset` is set (early, before the object-aggregate path),
at both render sites. Additive/dual-form: inline widgets unchanged. Errors
surface instead of wrong/empty numbers.
Widget fields read via `(widget as any)` until objectui bumps @objectstack/spec
(the bundled DashboardWidget type gains dataset/dimensions/values then).
Tests: DatasetWidget (6) — KPI value, chart query mapping, compareTo forwarding,
error surfacing, no-dataset-support guard, no-measures prompt.
Pairs with framework dashboard.zod dual-form.
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.
DatasetWidget renders a widget bound to a semantic-layer dataset (dimensions/measures by name) via queryDataset — KPI value for metric widgets, bar chart otherwise. DashboardRenderer branches to it when widget.dataset is set. Additive: inline widgets unchanged. Tests: DatasetWidget (6). Verified live: KPI=710000 + Revenue-by-Stage chart render in Studio.
🤖 Generated with Claude Code