Uh oh!
There was an error while loading. Please reload this page.
feat(dashboard): label headers, currency-correct amounts, i18n & drill-through for dataset widgets - #1825
Merged
Merged
Conversation
…l-through for dataset widgets
DatasetWidget (the renderer behind dataset-bound dashboard table/pivot/metric
widgets, e.g. the Chart Gallery) had four user-facing gaps:
- Headers showed raw field names. Now resolve via the server-enriched field
label, then the i18n field-label convention, then the raw name.
- Amounts showed a hardcoded "$" even with no declared currency. `formatMeasure`
now derives the symbol from the field's `currency` via `Intl` (locale-correct),
and renders a plain number when no currency is declared. A legacy "$" literal
in a format string is still honored.
- Hardcoded English strings ("No rows", "Pick measures…", the unsupported-source
error) now go through `useObjectTranslation` with en/zh entries.
- No data drill-through. Table/pivot rows are now clickable and open the
DrillDownDrawer filtered by the clicked bucket, using the server's RAW grouped
values (`drillRawRows`) + dimension→field map so select/lookup dims filter by
the stored value, not the display label. `buildDrillFilter` is unit-tested.
data-objectstack `queryDataset` passes the new `object`/`dimensionFields`/
`drillRawRows` drill metadata through.
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
|
A `type: 'pivot'` dataset widget rendered identically to `table` — a flat grouped list (dimensions + measures as columns), so "Tasks by Status × Priority" showed three columns instead of a matrix. Now a pivot with ≥2 dimensions renders a real cross-tab: the LAST dimension spreads across as columns, the rest go down as rows, measures fill the cells. The dataset already returns one row per dimension combination, so cells just place those pre-aggregated values — no client re-aggregation (an avg/min/max can't be recombined). A single-dimension pivot degrades to the flat table. Cells drill through using the same raw-value mapping as rows: clicking a cell filters the records by BOTH dimensions' raw stored values (verified live: clicking "Backlog × Low" opens exactly the matching task). `buildPivot` is a pure, unit-tested helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jun 20, 2026
xuyushun441-sys added a commit
that referenced
this pull request
Jun 20, 2026
…t renderer (#1830) Port the dashboard DatasetWidget fixes (PR #1825/#1827/#1828) to the standalone Reports renderer, which had the same user-visible problems: - Headers showed raw field names: DatasetReportTable rendered `{c}` and DatasetMatrixTable used a Title-Case humanize() — neither the real label. - Measures formatted as plain numbers with no currency awareness. - No i18n: "Total" and friends were hardcoded English. Changes: - useDatasetRows now captures the server-returned `fields` (label/format/ currency) and `object` (queryDataset already returns them). - Headers resolve via field label → i18n fieldLabel → raw name fallback (drops the `{c}`/humanizeDimension fallbacks). - Measure cells + server totals format with the field's currency (Intl symbol) and numeral format, mirroring DatasetWidget.formatMeasure — never a bare number or a misleading "$". - i18n via useObjectTranslation / useSafeFieldLabel with graceful fallback; "Total" uses tt('report.total', 'Total'). Drill-through and server-supplied totals are unchanged. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Why
From a user-perspective review of the report page (
dashboard/showcase_chart_gallery), the "二维表"/table widgets — rendered byDatasetWidget— had four gaps:status) instead of labels (Status).$even when the field has no declared currency.What
formatMeasurederives the symbol from the field'scurrencyviaIntl(locale-correct) and renders a plain number when no currency is declared. A legacy$literal in a format string is still honored.useObjectTranslation(+en/zhentries); graceful English fallback when no provider.DrillDownDrawerfiltered by the clicked bucket, using the server's raw grouped values (drillRawRows) + dimension→field map — so select/lookup dims filter by the stored value, not the display label. PurebuildDrillFilterhelper is unit-tested.data-objectstack.queryDatasetpasses the newobject/dimensionFields/drillRawRowsmetadata through.Tests
DatasetWidget.test.tsx: header labels, currency (plain vs Intl symbol), drill enablement, andbuildDrillFilter(raw value, field mapping, runtime-filter AND, null normalization). 21/21 green; package type-check green.Requires
Server metadata from framework PR #2080 for the dimension labels (#1/#2) and drill-through (#4) to light up end-to-end.
🤖 Generated with Claude Code