Uh oh!
There was an error while loading. Please reload this page.
feat(dashboard): CSV export for dataset table & pivot widgets - #1828
Merged
Conversation
Dataset table and cross-tab widgets now have an export button that downloads the underlying grouped rows as CSV — display-label headers (i18n-resolved), dimension values as their display labels, and measures kept numeric so the data round-trips cleanly into a spreadsheet. A UTF-8 BOM is prepended so Excel renders non-ASCII labels (e.g. Chinese) correctly. The button is omitted for metric/chart widgets. `toCsv` is a pure, unit-tested helper (RFC4180-style quoting). The "Export CSV" label is i18n (`dashboard.exportCsv`, en + zh). 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.
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
Rounding out the report-page work: tables and cross-tabs had no way to get the data out. Export is a standard report ask.
What
Dataset table and pivot/cross-tab widgets get a subtle export button (top-right) that downloads the underlying grouped rows as CSV:
状态,优先级,Tasks).toCsvis a pure, unit-tested helper (RFC4180-style quoting: quote on comma/quote/newline, double embedded quotes). Label is i18n (dashboard.exportCsv, en + zh).Tests
DatasetWidget.test.tsx(33 total):toCsvquoting/escaping/null-handling; export button present on table & pivot, absent on metric; click produces a CSV blob with label headers + numeric measures. Type-check green.Verified live
Chart Gallery: both "Projects by Account" and "Tasks by Status × Priority" show the export button; clicking the pivot's button yields
状态,优先级,Tasks+ rows likeBacklog,Low,1.🤖 Generated with Claude Code