Skip to content

Commit ad15579

Browse files
fix(plugin-dashboard): remove the dashboard table widget's CSV export button (#35242)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg6LBHtbsqCbRPM9MzTWbFBv)_ repo:objectstack#5 · os-bill · session_01Utp6CaQvpYhavZuHEZEF3C Fixes #34906 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:删掉仪表盘表格组件(平铺表和交叉表)右上角的「导出 CSV」按钮,连同只为它存在的 CSV 生成函数和 11 个语言包里的 `dashboard.exportCsv` 文案。 - 为什么改:按钮在浏览器里直接生成 CSV 下载,不过导出授权、不留导出审计。维护者裁定「直接删掉导出按钮」(ruling 6985168401)。 - 风险与回滚:只删界面控件,不动服务器、不动元数据协议;报表自己的导出不变。回滚即 revert 本 PR。 - 先看:`ui/packages/plugin-dashboard/src/DatasetWidget.tsx`(删掉的 `downloadCsv` / `toCsv` 与按钮)→ `DatasetWidget.test.tsx` 新钉子 `renders no export control on the …`。 - 两分钟验证:打开任一带表格组件的仪表盘,表格右上角不再有下载图标。 - 需要你做的:无,席位落地。 ## What changes - `DatasetWidget.tsx`: the table and cross-tab no longer render the `dataset-export` button. `downloadCsv`, `toCsv`, `csvCell`, the `exportCsv` / `exportColumns` closure and the `Download` icon import go with it; nothing else read them (`toCsv` was exported from the module but not from the package index). - `@object-ui/i18n`: `dashboard.exportCsv` removed from all 11 locale packs. No other reader of the key. - Tests: five tests that pinned the CSV's contents (compare columns, dotted and local select labels, sort order, totals row) and the `toCsv` unit test are deleted with the feature. The phone touch-target test drops its export-button assertions. A new pin in `DatasetWidget.test.tsx` covers both table shapes: no `dataset-export` node, no button named export/CSV/download, and clicking every button builds no file. - Changeset: patch for `@object-ui/plugin-dashboard` and `@object-ui/i18n`. ## Acceptance notes - The ruling's "Done when" says no dashboard widget offers a download. The other dashboard-package block that can, `object-data-table`, passes an authored `exportable` prop through to `data-table`, which then shows its own Export CSV button. It defaults to off, it is the shared table's prop rather than a dashboard widget option, and it is not in this PR's scope. Reported to the seat; not changed here. - No docs describe the dashboard control: `content/docs/**` and the package README carry no mention of it, so there is nothing to correct. ## Verification <details><summary>Tests and type-check (head 2429132)</summary> - `pnpm --filter @object-ui/plugin-dashboard test`: Test Files 206 passed (206), Tests 2010 passed, 6 skipped. - `pnpm --filter @object-ui/plugin-dashboard type-check`: exit 0. - `pnpm --filter @object-ui/i18n test`: Test Files 104 passed (104), Tests 1956 passed, 13 skipped. - `pnpm --filter @object-ui/i18n type-check`: exit 0. - Reverse check: with `DatasetWidget.tsx` taken from `origin/main`, the new pin fails on both shapes (2 failed); restored from `HEAD`, `git diff HEAD` empty. </details> <details><summary>Derived gate families</summary> Local, at head 2429132: `node scripts/pm/dispatch-gates.mjs --commands` derived 40 families; all 40 ran and exited 0. `--ran` reconciliation: ✓ dispatch-gates --ran: 40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero — all 40 recorded an exit code and none of them is 3). - `node scripts/check-adr-0087-registration.mjs --base origin/main` :: exit 0 - `node scripts/check-adr-0087-registration.mjs --self-test` :: exit 0 - `node scripts/check-changeset-no-major.mjs --base origin/main` :: exit 0 - `node scripts/check-closing-keyword-parity.mjs` :: exit 0 - `node scripts/check-closing-keyword-parity.mjs --self-test` :: exit 0 - `node scripts/check-comment-mask-corpus.mjs` :: exit 0 - `node scripts/check-empty-changeset.mjs --base origin/main` :: exit 0 - `node scripts/check-empty-changeset.mjs --self-test` :: exit 0 - `node scripts/check-sdui-manifest.mjs` :: exit 0 - `node scripts/check-sdui-manifest.mjs --self-test` :: exit 0 - `node scripts/ci/snapshot-next.mjs --self-test` :: exit 0 - `node scripts/pm/check-governed-queue-guard.mjs --self-test` :: exit 0 - `node scripts/pm/release-rehearsal-clone.mjs --self-test` :: exit 0 - `node scripts/release-pending-publish.mjs --self-test` :: exit 0 - `pnpm --dir ui exec vitest run scripts/` :: exit 0 - `pnpm --filter @objectstack/spec run check:duration-unit-keys` :: exit 0 - `pnpm check:adr-anchors` :: exit 0 - `pnpm check:changeset-gate-self-tests` :: exit 0 - `pnpm check:closed-ceremony-text` :: exit 0 - `pnpm check:cross-package-test-inputs` :: exit 0 - `pnpm check:dispatcher-error-vocabulary` :: exit 0 - `pnpm check:driver-memory-census` :: exit 0 - `pnpm check:engine-double-contract` :: exit 0 - `pnpm check:gitlink-declared` :: exit 0 - `pnpm check:merge-driver` :: exit 0 - `pnpm check:nul-bytes` :: exit 0 - `pnpm check:published-files` :: exit 0 - `pnpm check:query-options-erasure` :: exit 0 - `pnpm check:refd-timer-probe` :: exit 0 - `pnpm check:registry-log-declared` :: exit 0 - `pnpm check:rest-log-spy-declared` :: exit 0 - `pnpm check:role-word` :: exit 0 - `pnpm check:skill-identifier-liveness` :: exit 0 - `pnpm check:test-source-alias` :: exit 0 - `pnpm check:tier-file-adoption` :: exit 0 - `pnpm check:type-check-coverage` :: exit 0 - `pnpm check:type-check-debt` :: exit 0 - `pnpm check:undeclared-dep-imports` :: exit 0 - `pnpm check:watch-hint-literal` :: exit 0 - `pnpm check:where-matcher` :: exit 0 Every other family is CI's; its check-runs on this PR are the reading. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CaQvpYhavZuHEZEF3C)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 02a1e2f commit ad15579

20 files changed

Lines changed: 54 additions & 317 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/plugin-dashboard': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(plugin-dashboard): the dashboard table widget no longer offers an "Export CSV" download
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The dataset table and cross-tab widgets drew a download button that built a CSV in the browser. That file skipped the export grant and the export audit entry that list export enforces. The button, its CSV helpers and the `dashboard.exportCsv` label in every locale pack are removed. To take rows out, use list export, which checks the export grant and writes the audit entry. Report exports are unchanged.

‎ui/packages/i18n/src/locales/ar.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,6 @@ const ar = {
17701770
widgetForbiddenMessage: "ليست لديك صلاحية لعرض البيانات الخاصة بهذه الأداة.",
17711771
allWidgetsForbiddenMessage: "ليست لديك صلاحية لعرض البيانات الخاصة بلوحة التحكم هذه.",
17721772
details: "التفاصيل",
1773-
exportCsv: "تصدير CSV",
17741773
openInList: "فتح في القائمة",
17751774
filters: {
17761775
label: "عوامل تصفية لوحة المعلومات",

‎ui/packages/i18n/src/locales/de.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,6 @@ const de = {
15631563
widgetForbiddenMessage: "Sie haben keine Berechtigung, die Daten dieses Widgets anzuzeigen.",
15641564
allWidgetsForbiddenMessage: "Sie haben keine Berechtigung, die Daten dieses Dashboards anzuzeigen.",
15651565
details: "Details",
1566-
exportCsv: "CSV exportieren",
15671566
openInList: "In Liste öffnen",
15681567
filters: {
15691568
label: "Dashboard-Filter",

‎ui/packages/i18n/src/locales/en.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,6 @@ const en = {
19831983
widgetForbiddenMessage: 'You don’t have permission to view the data behind this widget.',
19841984
allWidgetsForbiddenMessage: 'You don’t have permission to view the data behind this dashboard.',
19851985
details: 'Details',
1986-
exportCsv: 'Export CSV',
19871986
openInList: 'Open in list',
19881987
config: {
19891988
breadcrumb: {

‎ui/packages/i18n/src/locales/es.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,6 @@ const es = {
16171617
widgetForbiddenMessage: "No tienes permiso para ver los datos de este widget.",
16181618
allWidgetsForbiddenMessage: "No tienes permiso para ver los datos de este panel.",
16191619
details: "Detalles",
1620-
exportCsv: "Exportar CSV",
16211620
openInList: "Abrir en la lista",
16221621
filters: {
16231622
label: "Filtros del panel",

‎ui/packages/i18n/src/locales/fr.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,6 @@ const fr = {
16131613
widgetForbiddenMessage: "Vous n’avez pas l’autorisation de voir les données de ce widget.",
16141614
allWidgetsForbiddenMessage: "Vous n’avez pas l’autorisation de voir les données de ce tableau de bord.",
16151615
details: "Détails",
1616-
exportCsv: "Exporter en CSV",
16171616
openInList: "Ouvrir dans la liste",
16181617
filters: {
16191618
label: "Filtres du tableau de bord",

‎ui/packages/i18n/src/locales/ja.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,6 @@ const ja = {
15631563
widgetForbiddenMessage: "このウィジェットのデータを表示する権限がありません。",
15641564
allWidgetsForbiddenMessage: "このダッシュボードのデータを表示する権限がありません。",
15651565
details: "詳細",
1566-
exportCsv: "CSV で書き出す",
15671566
openInList: "リストで開く",
15681567
filters: {
15691568
label: "ダッシュボードのフィルター",

‎ui/packages/i18n/src/locales/ko.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,6 @@ const ko = {
15631563
widgetForbiddenMessage: "이 위젯의 데이터를 볼 수 있는 권한이 없습니다.",
15641564
allWidgetsForbiddenMessage: "이 대시보드의 데이터를 볼 수 있는 권한이 없습니다.",
15651565
details: "세부 정보",
1566-
exportCsv: "CSV 내보내기",
15671566
openInList: "목록에서 열기",
15681567
filters: {
15691568
label: "대시보드 필터",

‎ui/packages/i18n/src/locales/pt-BR.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,6 @@ const pt = {
16121612
widgetForbiddenMessage: "Você não tem permissão para ver os dados deste widget.",
16131613
allWidgetsForbiddenMessage: "Você não tem permissão para ver os dados deste painel.",
16141614
details: "Detalhes",
1615-
exportCsv: "Exportar CSV",
16161615
openInList: "Abrir na lista",
16171616
filters: {
16181617
label: "Filtros do painel",

‎ui/packages/i18n/src/locales/ru.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,6 @@ const ru = {
16711671
widgetForbiddenMessage: "У вас нет прав на просмотр данных этого виджета.",
16721672
allWidgetsForbiddenMessage: "У вас нет прав на просмотр данных этой панели.",
16731673
details: "Подробности",
1674-
exportCsv: "Экспорт в CSV",
16751674
openInList: "Открыть в списке",
16761675
filters: {
16771676
label: "Фильтры дашборда",

0 commit comments

Comments
 (0)