Repository navigation
Commit 17dbea4
docs(grid): scope the rich text cell panel wording to the select-first grid (objectstack-ai#36414)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbGyo1s5XDjcEx7u8WDqbFTx)_
Fixes objectstack-ai#36360
Part of objectstack-ai#35155 (item 3 only, the two "(empty)" doc comments; items 1-2
stay on that card)
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 读文档的开发者:说明从"富文本单元格都在格子下方面板里编辑"改为分开写清"选中优先表格"与普通表格两种行为;用户界面无感。
- 属于列表单元格编辑富文本那项工作的收尾,替照着文档挂载普通表格的人纠正误导。
- 只改文字与注释,出错只是说明不准,可直接撤回。
- 要你做什么:无。
## What changes
Text only, no code or behaviour change. Each text that described the
rich-text cell panel now names the select-first grid (`cellSelection`)
for the panel and its keys, and says in one sentence what a grid without
`cellSelection` does:
- `ui/packages/plugin-grid/README.md` (ships in the npm tarball): panel
sentence scoped; adds the non-select-first sentence.
- `ui/packages/fields/README.md` (ships): same.
- `content/docs/frontend/plugins/plugin-grid.mdx`: panel sentence scoped
(its keys sentence already was); adds the non-select-first sentence.
- `ui/packages/fields/src/FieldEditWidget.tsx`: jsdoc on
`IN_CELL_PANEL_EDIT_WIDGETS` only.
- `.changeset/36023-rich-text-cell-panel.md` (pending, not yet consumed
by a release): the "Before" line now says the "This field can't be
edited in a list" notice was the select-first grid's.
- `.changeset/36360-rich-text-panel-wording.md`: new patch note for the
two published READMEs.
- Second commit (rider, objectstack-ai#35155 item 3): `GroupRowProps.label` in
`ui/packages/plugin-grid/src/GroupRow.tsx` and the doc comment in
`ui/packages/plugin-grid/src/temporalCellFace.ts` now say an empty group
key is labelled with the grid's `grid.empty` string ("Empty" in English,
`useGroupedData.ts` `emptyLabel = t('grid.empty')`), not "(empty)".
Comments only.
**DELIBERATE CORRECTION** of the pending note
`.changeset/36023-rich-text-cell-panel.md` (Check Changeset's
foreign-changeset rule stays red by design). Corrected sentence:
"Before, these cells opened no editor; on a select-first grid the cell
said "This field can't be edited in a list"." Reason: the notice comes
from `cellSelection.describeCell`, which only a select-first grid has
(`factsOf` in `data-table.tsx`).
Every clause was measured in
`ui/packages/components/src/renderers/complex/data-table.tsx` at the
base:
- panel placement: `editsBelow = isEditing && selectFirst &&
editorBelow`, else `placement: 'cover'` (over the cell);
- one click opens: the non-select-first `onClick` calls `startEdit`
under `singleClickEdit`, which `ObjectGrid` defaults to `true`;
- Ctrl/Cmd+Enter in the injected TEXTAREA commits only under
`selectFirst && (ctrlKey || metaKey)`;
- Esc: `exitEdit(true)` on both hosts;
- click outside: the document `pointerdown` listener calls
`saveEdit(true)`, which stages; without `autosaves` (`selectFirst &&
onRowSave`) the staged value waits for the save bar (`hasPendingChanges
&& !autosaves`).
## Tests
No tested behaviour changed, so no tests and no ablation.
## Acceptance notes
- The select-first panel sentence says "a click outside saves";
measured, an immediate save needs `autosaves` (`selectFirst` plus
`onRowSave`); a select-first grid wired with `onBatchSave` alone keeps
the save bar. Not changed here (outside the card's wording); noted only.
## Verification
Two-minute check: `git diff origin/main...HEAD --
ui/packages/plugin-grid/README.md` shows the panel bullet now opening
"on a select-first grid (`cellSelection`)" and a second sentence for a
grid without it.
Files to read first: `ui/packages/plugin-grid/README.md` (published),
`.changeset/36023-rich-text-cell-panel.md` (the corrected pending note).
<details><summary>Local gates at 83d66cf</summary>
- `dispatch-gates --commands` derived 66 commands; 59 exit 0.
- `check-empty-changeset --base origin/main` exit 1: the expected
DELIBERATE CORRECTION refusal above.
- NOT MEASURED, reason PREREQUISITE NOT MET (unbuilt workspace `dist/`,
shared verify lock contended): `check:doc-formula-expressions` (3),
`check:doc-security-posture` (3), spec `check:docs` (1), spec
`check:skill-examples` (3), `check:docs-transcript-drift` (3), `pnpm
--dir ui exec vitest run scripts/` (all 56 failures import the unbuilt
`@objectstack/spec` dist). CI builds and runs them.
- `overlap-check`: VERDICT clean exit 0 (objectstack-ai#36357, objectstack-ai#36316 merge cleanly).
- `check-nul-bytes`: OK.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01QsR2jTqAcPU4VyEPH7iVn2
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8466fca commit 17dbea4
8 files changed
Lines changed: 45 additions & 17 deletions
File tree
- .changeset
- content/docs/frontend/plugins
- ui/packages
- fields
- src
- plugin-grid
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 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 | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1003 | 1007 | | |
1004 | 1008 | | |
1005 | 1009 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
0 commit comments