Repository navigation
Commit d95d34f
fix(spec): the report form's top-level rows use the blocks grid's terms (#36879)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB9Gqqp1VYZwEqbXEm1YsTjU)_
Fixes #36838
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB
## 维护者速读
-
报表设计器(英文界面)里报表顶层的四个栏目名改成与联合报表分块表格一致的说法:数据来源、指标、分组、列分组;“指标”和“文件名”两条提示改成与实际运行一致;中文面板的“日期范围”“运行时筛选”两条提示跟上了新的英文说法。
- 属于“报表面板说业务话”这项体验工作的收尾,替用英文界面搭报表的业务管理员解决同一张表单里一个设置有两种叫法的问题。
- 只改了栏目名和提示文字,不改任何可保存的设置;出错最多是某句提示读起来别扭,直接撤回即可。
- 无
## What changes
One form, one vocabulary: the report form's top-level data rows now
carry the titles its joined-blocks grid already uses (`report.form.ts`
lines 93–96 on main), and two hints now say what the runtime does.
**Label resolution, measured.** The four top-level rows declared no
`label`, and `ReportSchema` gives those keys no `.meta({ title })`, so
both readers fell through to the key:
- the console form: `SchemaForm.tsx:1931–1934`, `fieldSpec.label`, then
the localized schema `title`, then `prettify(name)`;
- the catalog extractor: `packages/lint/src/i18n-walk.ts:2771`,
`inlineText(field.label) ?? humanizeFieldPath(path)`.
A form-row `label` is therefore the route (producer-first, no `en`
overlay). Each `metadataForms.report.fields.KEY.label` leaf already
existed with the humanized text, so no catalog key is added, moved or
removed; only its `en` value changes.
| Row (key) | Old en | New en | zh-CN |
|:---|:---|:---|:---|
| `dataset` label | Dataset (prettified key) | Data Source | console
overlay 数据来源, unchanged; platform bundle 数据集, unchanged |
| `values` label | Values (prettified key) | Metrics | overlay 指标,
unchanged; platform 度量, unchanged |
| `rows` label | Rows (prettified key) | Group By | overlay 分组,
unchanged; platform 行, unchanged |
| `columns` label | Columns (prettified key) | Group Columns By |
overlay 列分组, unchanged; platform 列, unchanged |
| `values` hint (N2) | The metrics to total or count (from the data
source). | The metrics to show, such as totals, counts, averages or
ratios (from the data source). | overlay 要统计的指标(来自数据来源), unchanged;
platform 要展示的度量名(来自该数据集), unchanged |
| `exportOptions.fileNamePrefix` hint (N3) | The start of the downloaded
file’s name, used instead of the report name. | The start of the
downloaded file’s name. Left empty, the file is named after the report’s
label, or its name when it has no label. | overlay and platform:
下载文件名的开头。留空时以报表的显示名称命名,没有显示名称时用名称 (was 下载文件名的开头,用来代替报表名称) |
| `dateRange` hint (N4) | en unchanged | en unchanged | overlay:
打开报表时显示的时间段,以及使用者能否自己选择范围 (was
默认时间段与自定义范围开关。按数据来源里的一个日期分组筛选;只有一个日期分组时可留空) |
| `runtimeFilter` hint (N4) | en unchanged | en unchanged | overlay:
每次显示报表时都会应用的筛选,叠加在数据来源自身的条件之上 (was 渲染时的范围筛选,在查询时以 AND 方式并入) |
- **N3, measured at the runtime:** `ReportExport.tsx:210–217` passes
`prefix`, then the localized report `label` with `name` as its fallback,
into `buildExportFileName`
(`ui/packages/core/src/utils/export-filename.ts:58–77`), which takes the
prefix first and appends the date and time. The form's own `Label` /
`Name` rows are the words the hint now uses (显示名称 / 名称 in zh-CN).
- **N2:** a report metric is any dataset measure (sum, count, average,
ratio, derived), so the hint names examples instead of a closed pair.
- **N4:** console overlay only, per the card. `dateRange` was already a
hand-worded row (marked 36373); `runtimeFilter` is now marked the same
way, because the platform zh-CN row is the ledger-pinned rendering of
the older sentence and is left alone.
- **Locale packs:** `node scripts/check-i18n-bundles.mjs --write`
changed only `en`. The `fileNamePrefix` hint is re-translated in zh-CN,
ja-JP and es-ES (it is not one of the six rows #36836 carries). The
locales that held the old English as a fill (ar, de, fr, ko, pt-BR, ru,
zh-Hant) carry a provenance entry for the leaf, so they serve the new
English until translated, which is the repository's rule for a changed
source string.
- **Ledgers:** `report-dataset-panel-echo-decisions.test.ts` pins the
`en` of four leaves this PR moves (`dataset`, `values`, `rows` labels
and the `values` hint). Each row now holds the new English and says why:
the label values are still byte-identical to their blocks twins, whose
English is now the same string; the `values` hint values promise no
narrower set than the new English. No verdict and no translated value
changed. `report-form-echo-decisions.test.ts` asserted the English of
the "Dataset" twin its section heading was rendered from; that assertion
now points at the dataset type's own label, which reads the same three
words, and the header records why the population did not move.
- Left alone, per the seat route: the slugged section titles `Dataset
binding` and `Joined blocks`, every key, type, default and Zod shape.
## Tests
<details><summary>platform-objects, spec, console readers: all green at
cf23885</summary>
- `pnpm --filter @objectstack/platform-objects test`: Test Files 125
passed (125), Tests 2126 passed (2126). The first run of the
translations folder had one red, `report-form-echo-decisions.test.ts`
"the authored vocabulary the other five rows were derived from is still
there" (expected 'Data Source' to be 'Dataset'); fixed as described
above.
- `pnpm --filter @objectstack/spec exec vitest run src/ui/ src/system/
src/kernel/repeater-item-titles.test.ts scripts/schema-index.test.ts`:
Test Files 267 passed (267), Tests 9316 passed (9316).
- `pnpm --filter @objectstack/spec --filter
@objectstack/platform-objects run typecheck`: exit 0.
- From `ui/`, `pnpm exec vitest run` over 26 report-form reader files
(every `ReportDefaultInspector*`, `panelBusinessWording-36373`,
`report-schema`, `metadata-form-i18n`,
`SchemaForm.machineNameChip-8231`, `SchemaForm.deDeveloperize-8218`,
`SchemaForm.refDatasetWidget-11601`, `InterfacesPillar.report*`,
`metadataError.report*`, `ReportConfigPanel*`, `_shared.labels`,
`export-filename`, the `ReportExport*` tests): Test Files 26 passed
(26), Tests 254 passed (254).
- `pnpm --filter @objectstack/spec check:generated`: "All 14 generated
artifacts are up to date".
- `pnpm check:i18n-stale-fill`: OK, no new stale fills.
</details>
<details><summary>Derived gate families: 91 run at cf23885, 89 exit 0,
2 not measured (prerequisite, exit 3)</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` derived 91 commands
for this diff; each ran once, exit code captured before any pipe. 89
exited 0, among them `pnpm check:i18n` ("all bundles in sync, no
undeclared authoring keys"), `pnpm check:i18n-stale-fill`, `pnpm
check:test-source-alias`, `pnpm check:doc-authoring`, `pnpm
check:nul-bytes`, spec `check:docs` / `check:api-surface` /
`check:authorable-surface`, and `pnpm --dir ui exec vitest run
scripts/`.
- NOT MEASURED, exit 3: `node scripts/check-plugin-teardown-shape.mjs
--self-test` (positive control pinned to a commit this shallow checkout
cannot reach) and `pnpm check:dual-build-cjs-loads` (needs a
whole-workspace build). Both are CI's.
- `node scripts/pm/dispatch-gates.mjs --ran`: "91 derived famil(ies)
accounted for — 91 run, 0 NOT-MEASURED" (the two above are NOT MEASURED
by their own exit code).
- `node scripts/pm/overlap-check.mjs`: VERDICT clean (origin/main and
open #36802 both merge cleanly).
</details>
## Acceptance notes
- The platform zh-CN, ja-JP and es-ES values for these four labels still
read the older dataset vocabulary (数据集 / 度量 / 行 / 列 and their ja-JP and
es-ES twins), at the top level and in the blocks grid alike, so each
locale stays one vocabulary inside the form. The console's curated panel
reads the business words from its own overlay. Moving the platform
values to the business wording is a translator pass over both positions
together (eight leaves), not part of this rename.
- Overlap with #36836: the `values` hint is one of its six rows. Its
English moved again here; its zh-CN, ja-JP and es-ES values were not
touched, so that card should translate against the new English. The
`fileNamePrefix` hint is not one of the six and is fully translated
here.
- With a label that no longer spells the key, the server-served form
shows its machine-name hint beside these four rows
(`SchemaForm.tsx:2044–2051`), as it already does for Sort Order. This
follows from that rule; it was not checked in a browser.
- `@object-ui/app-shell` type-check was not run locally (one data file,
strings only); it is left to CI's Type Check UI.
## Verification
First read, by risk: `packages/spec/src/ui/report.form.ts` (four labels,
two hints);
`packages/platform-objects/src/apps/translations/report-dataset-panel-echo-decisions.test.ts`
(moved `en` sources and their reasons);
`ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts`
(three zh-CN hints).
Two-minute check: open a summary report's metadata form in Studio with
the console in English. The data rows read Data Source, Metrics and
Group By (Group Columns By on a matrix report), matching the
joined-blocks grid, and the File Name hint under Period and export says
an empty prefix names the file after the report's label.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB)_
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufziH9MVhWYLVCiw5eXB -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 53733c1 commit d95d34f
9 files changed
Lines changed: 63 additions & 26 deletions
File tree
- .changeset
- packages
- platform-objects/src/apps/translations
- spec/src/ui
- ui/packages/app-shell/src/views/metadata-admin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2206 | 2206 | | |
2207 | 2207 | | |
2208 | 2208 | | |
2209 | | - | |
| 2209 | + | |
2210 | 2210 | | |
2211 | 2211 | | |
2212 | 2212 | | |
2213 | | - | |
2214 | | - | |
| 2213 | + | |
| 2214 | + | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | | - | |
| 2217 | + | |
2218 | 2218 | | |
2219 | 2219 | | |
2220 | 2220 | | |
2221 | | - | |
| 2221 | + | |
2222 | 2222 | | |
2223 | 2223 | | |
2224 | 2224 | | |
| |||
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
2310 | | - | |
| 2310 | + | |
2311 | 2311 | | |
2312 | 2312 | | |
2313 | 2313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
2310 | | - | |
| 2310 | + | |
2311 | 2311 | | |
2312 | 2312 | | |
2313 | 2313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
2310 | | - | |
| 2310 | + | |
2311 | 2311 | | |
2312 | 2312 | | |
2313 | 2313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| |||
788 | 795 | | |
789 | 796 | | |
790 | 797 | | |
791 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
792 | 805 | | |
793 | 806 | | |
794 | 807 | | |
| |||
817 | 830 | | |
818 | 831 | | |
819 | 832 | | |
| 833 | + | |
820 | 834 | | |
821 | 835 | | |
822 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
2310 | | - | |
| 2310 | + | |
2311 | 2311 | | |
2312 | 2312 | | |
2313 | 2313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | | - | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
149 | 157 | | |
150 | 158 | | |
151 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
347 | 349 | | |
348 | 350 | | |
349 | | - | |
| 351 | + | |
| 352 | + | |
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| |||
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
358 | | - | |
| 361 | + | |
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
| |||
0 commit comments