Repository navigation
Commit ad15579
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
File tree
- .changeset
- ui/packages
- i18n/src/locales
- plugin-dashboard/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
1773 | | - | |
1774 | 1773 | | |
1775 | 1774 | | |
1776 | 1775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
1566 | | - | |
1567 | 1566 | | |
1568 | 1567 | | |
1569 | 1568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1983 | 1983 | | |
1984 | 1984 | | |
1985 | 1985 | | |
1986 | | - | |
1987 | 1986 | | |
1988 | 1987 | | |
1989 | 1988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1617 | 1617 | | |
1618 | 1618 | | |
1619 | 1619 | | |
1620 | | - | |
1621 | 1620 | | |
1622 | 1621 | | |
1623 | 1622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1613 | 1613 | | |
1614 | 1614 | | |
1615 | 1615 | | |
1616 | | - | |
1617 | 1616 | | |
1618 | 1617 | | |
1619 | 1618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
1566 | | - | |
1567 | 1566 | | |
1568 | 1567 | | |
1569 | 1568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
1566 | | - | |
1567 | 1566 | | |
1568 | 1567 | | |
1569 | 1568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1612 | 1612 | | |
1613 | 1613 | | |
1614 | 1614 | | |
1615 | | - | |
1616 | 1615 | | |
1617 | 1616 | | |
1618 | 1617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
1674 | | - | |
1675 | 1674 | | |
1676 | 1675 | | |
1677 | 1676 | | |
| |||
0 commit comments