Uh oh!
There was an error while loading. Please reload this page.
fix(metadata-admin): currency-aware, labelled headers in the dataset preview - #1845
Merged
Merged
Conversation
…preview The live dataset-authoring preview (DatasetPreview) rendered raw dimension/ measure NAMES in its table headers and used a local currency-blind `formatCell` — the same three issues (raw-name headers, no currency awareness, no i18n) the dashboard widget and report renderer were already fixed for. It's the same dataset-bound `queryDataset` result, so authors saw a different rendering of the exact numbers their dashboards/reports show. Reuse the shared `@object-ui/core` helpers (`formatMeasure`, `formatDimensionValue`, `buildDatasetFieldHelpers`) + i18n `useSafeFieldLabel`: - headers resolve field label → i18n fieldLabel → raw name; - measure cells format with the field's declared currency (Intl symbol) + format, never a misleading "$"; - the preview chart's series label uses the display label too. Graceful: when the result carries no field metadata, headers fall back to the raw name and amounts to plain numbers (no regression). Tests: DatasetPreview 6 passed (+2: labelled headers + currency / no-currency formatting). type-check green for app-shell. 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
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
Found during an audit of sibling dataset-render surfaces (after #1830 / #1841 / #1842). The live dataset-authoring preview (
DatasetPreview) had the same three bugs the dashboard widget and report renderer were already fixed for:<th>{c}).formatCell(plaintoLocaleString).It renders the same
queryDatasetresult a dashboard/report does, so authors saw a different rendering of the exact numbers their published surfaces show.Fix
Reuse the shared helpers instead of a bespoke formatter:
buildDatasetFieldHelpers+useSafeFieldLabel→ headers resolve field label → i18n fieldLabel → raw name.formatMeasure→ measure cells use the field's declared currency (Intlsymbol) + numeral format, never a misleading$;formatDimensionValuefor dimensions.Graceful: when the result carries no field metadata (older server), headers fall back to the raw name and amounts to plain numbers — no regression (the existing
fields: []test still passes).Tests
DatasetPreview→ 6 passed (+2: labelled headers, and currency / no-currency formatting).type-checkgreen forapp-shell.Audit note
Swept all dataset-consuming surfaces:
ReportPreviewalready delegates to the (fixed)DatasetReportRenderer;ObjectChartuses the label-awarebuildChartSeries.DatasetPreviewwas the one remaining instance. Separately,plugin-grid/useColumnSummary.tshas a currency-blind aggregation footer, but it's a different data source (grid field metadata, not dataset results) — left as a potential follow-up, not in scope here.🤖 Generated with Claude Code