Repository navigation
Commit a6756a2
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
Fixes #36147
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuSuiLqQhyEd4RmCmzfMdhFV)_
repo:objectstack#1 · os-sales · session_01L6bhgWmyKFrcthV9y5wUiP
Part of epic #35590 (record page redo). One PR for the card. Claim
7066162109; Sales ruled "all as the card says" (7066516044).
Clause-②: yes (widening): `@object-ui/fields` exports a new
`ReferenceChipContext` (a boolean React context, default `false`);
`@object-ui/i18n` gains five keys in every pack (`detail.systemInfo`,
`detail.createdTime`, `detail.updatedTime`, `detail.recordNumber`,
`detail.clickToEdit`). No prop, export or schema key is removed or
narrowed. The field-list context (`RecordFieldListContext`) is
module-internal to `@object-ui/plugin-detail`, not in its barrel.
Metadata-protocol: none
## 维护者速读
-
抽屉、手机「详情」页签、宽屏钉住的左栏,字段区现在是同一个列表:一行一个字段,标签在左、值在右,行间细线;任何宽度都是一列。只有「整页且没有其他页签」的记录页仍按宽度多列。
- 分组标题在左,箭头在最右(收起朝下、展开朝上),整行可点。
- 查找字段显示成带对象颜色图标的标签,名字完整换行不截断;点标签打开那条记录,点同一行其他地方是编辑。
- 所有分组的空字段合成列表最后一行「显示 N 个空字段」,选择按对象记住。
- 「系统信息」是最后一个分组,默认收起(创建人、创建时间、修改人、修改时间、负责人〔正文没画时〕、记录编号)。**它在这个页面上替代了
objectui#12307 加的底部一行元信息**;别处那一行不变。
- 不再有铅笔:单击可编辑的值就进入编辑,不再需要双击;**只读值单击不再复制**(悬停或键盘聚焦时的复制图标还在)。
- 手机上原来的 iOS 分组卡片样式在这里去掉了,和抽屉一样的行;手机上只读值不再出现复制图标(长按选中文字)。
- 箭头只出现在对象声明为「可折叠」的分组上(字段分组默认不可折叠,CRM
的分组都是这样),默认分组不加箭头,不改元数据约定;「系统信息」总是可折叠。
- 桌面上能看到的变化:有其他页签的整页(例如商机,有产品明细等页签)「详情」从按宽度 3 列变成 1 列。
## What changes
All on the synthesized (default) record page's field area, which is
`DetailSection`'s frameless face in all three places (side preview /
split pane, phone 「详情」 tab, wide page's pinned left column). Authored
record pages and every other `DetailView` keep their faces.
1. **One shared list, one column at any width (items 1, 2, 8).**
`RecordPageColumns` now sets `DetailsColumnCapContext` to 1 everywhere
except a full page whose details are its only face (no other tab, none
hidden), which keeps 3. Under the cap of 1 the section draws one column
of label-left rows with a hairline between them
(`data-detail-section-list`). The phone's iOS grouped-inset branch no
longer applies to the frameless face, so the phone draws the same rows.
The phone's two-column highlights block was already gone on the default
page (#35891); nothing is drawn in its place.
2. **Group title row (item 3).** Title left, chevron at the row's right
end: `ChevronDown` folded, `ChevronUp` open; the whole row is the toggle
(`aria-expanded`).
3. **Reference chips (item 4).** Inside the frameless section
`ReferenceChipContext` is `true`, and `LookupCellRenderer`'s
`ReferencedRecordLink` draws a pill: the referenced object's
`ObjectIconTile` (`ObjectSchema.color` / `icon`, #35985) and the whole
name, `break-words`, not truncated. It is still the same anchor (same
`href`, same `openRecord` click, `stopPropagation`), so a click opens
the record and is not the row's; with no route it is a plain pill.
Outside the context the link face is unchanged.
4. **Empty fields in one last row (item 5).** Under the laid-out page
each section hides its empty rows and reports the count to a per-page
tally (`recordFieldList.ts`, the `recordBodyFields.ts` store pattern:
`useId` + layout effect, read with `useSyncExternalStore`).
`EmptyFieldsRow` closes the details column with 「显示 N 个空字段」 / 「隐藏空字段」.
The choice is the existing per-object record-page preference
`showEmptyFields` (#25883). This replaces, on this page only, each
section's own toggle and `DetailView`'s 「N 个空分组」 line. An authored
`hideEmpty` section stays hidden and is not counted; an all-empty group
draws nothing until the reader shows empties.
5. **「系统信息」 last group (item 6).** Under the field list,
`RecordMetaFooter` draws a folded `DetailSection` titled 系统信息 with one
read-only row per fact: created by, created on, updated by and updated
on (only when the record was updated), the owner (only when neither the
strip nor the body draws it, the #28868 / #35941 owner-once rule
unchanged) and the record ID. **This reverses objectui#12307's one-line
meta footer on the laid-out record page**, as the card asks; outside the
field list (print, embedded `DetailView`, authored pages) the line is
unchanged. The group is wrapped so its rows do not report as body
fields.
6. **Click to edit, no pencil (item 7).** On the frameless face a single
click on an editable value calls `onEnterInlineEdit`, unless the click
lands on a link, button, input or `role=button|link|checkbox` inside the
value, or the reader has a text selection in the row. The pencil
`Button` stays in the DOM as `sr-only` and shows on `focus-visible`, so
keyboard users keep a way in; the title hint reads "Click to edit".
Double-click is no longer wired there. The pencil, its tooltip and the
value's title are named for the gesture that works there,
`detail.clickToEdit` ("Click to edit" / 点击编辑); every other face keeps
`detail.editInlineHint`. Read-only values no longer copy on click
(`copyInteractive` is off for frameless). The copy icon stays for a
mouse (hover / keyboard focus) and is `pointer-coarse:hidden` on the
field list, so a phone shows no copy icon (ruling 1): a tap would
otherwise set `:hover` and reveal it. An editable lookup: the chip opens
the record (#36015 precedent), the rest of the row edits.
Dev-thread calls (no card needed under the 22:19Z rule):
- **Item 3 reads the authored contract.** The chevron and the whole-row
toggle are drawn for a group that folds: a field group the object
declares `collapse: 'collapsed' | 'expanded'`, and 系统信息. A field group's
spec default is `collapse: 'none'` ("always open, no toggle"), so on CRM
(商机, 其他) no group has an arrow. Making `none` groups foldable would
override authored metadata, so it is not done here; that would be a
separate question for the seat. A declared foldable group (showcase
Semantic Zoo, 财务信息) is shown folded and open in the evidence comment.
- Items 3–7 apply to the whole default-page frameless face, including
the multi-column full page with no other tabs, so the page has one
behaviour.
- The empty-fields row sits after 系统信息, as the column's last row.
- `RecordDetailView.tsx` is not touched (#36151, #36149 + #36201 wait on
this merge).
## Card checklist
- One shared field area for drawer / phone / pinned left column. ✔
(`DetailSection.fieldList-36147`, `RecordPageColumns.test.tsx` new
describe)
- One column at any width; full page with no other tabs keeps
multi-column. ✔ (cap tests at drawer / pinned / full-page-alone;
browser: drawer 2→1, opportunity full page 3→1)
- Group chevron at the right, down folded / up open, whole row toggles.
✔
- Lookup values are object-colour chips; click opens the record. ✔
(`referenceChip-36147`; browser href)
- Empty fields in one collapsed last row. ✔ (count, toggle, withdraw on
unmount, authored hide not counted, outside-list control)
- 系统信息 last, collapsed by default. ✔
(`RecordMetaFooter.systemInfo-36147`, control: outside the list the line
is unchanged)
- No pencil; click edits; read-only takes no click. ✔ (unit + browser on
desktop and iPhone 12 emulation)
- No two-column highlights on phone. ✔ (already none on the default
page; the phone face is the same rows)
## Verification
- `vitest run packages/plugin-detail`: 406 files / 3,749 tests pass (18
skipped, existing), re-run after the L1-d rework. `vitest run
packages/fields`: 321 files / 4,821 pass (7 skipped).
- App-shell and console tests that mount the record page (247 files
picked by
`RecordDetailView|RecordPageColumns|record-meta-footer|data-detail-field|…`):
2,092 / 2,099 passed first time; the 7 failures were the two owner-once
files that read the meta line (`RecordDetailView.phoneOwnerLine-28909`,
`RecordMetaFooter.ownerOnceBody-35941`). They now open 系统信息 and read its
Owner / Record ID rows, with the same owner-once assertions; 9 / 9 pass.
- `type-check` (src and tests) clean for plugin-detail and fields; full
`pnpm build` (console `tsc` included) passes; ESLint on every changed
file: 0 errors; `check:new-line-citations`: 0 new.
- E2E `record-flow-phone-targets` (CI E2E UI) now reads the pencil
classes from the module constants `PENCIL_CLASS` /
`FIELD_LIST_PENCIL_CLASS` instead of a JSX attribute pattern, and gains
one test: on a 375 px touch screen the field list's pencil is 1×1 px
until a keyboard focuses it, then drawn at its size (6 / 6 pass locally;
the new one failed before the class was given explicit `h-px w-px`).
- Live e2e `inline-edit-polish-2572` (not in the CI live list) is
updated from double-click to click and the "Click to edit" hint.
`read-only-member-record` and `RecordDetailView.harness` count pencils
by name and now accept the field list's click name; the admin control
counts the `sr-only` pencil instead of asking it to be visible.
- Browser (examples/app-crm, zh-CN): before / after shots of the drawer
at 768 / 1024 / 1440 windows, the opportunity full page at 1440, the
account's pinned left column at 1440 (also with 系统信息 opened), and the
phone at 375 are in the project thread. A single click or tap on 金额
opens its editor; a click or tap on a read-only value does nothing;
read-only values are `user-select: auto` with no click or touch handler,
so the phone's native long-press selection applies. **NOT MEASURED on a
physical phone:** that long-press selects a read-only value (ruling 1)
was checked only by source (no handler, no `select-none`) and in
emulation; it is owed to the first hosted phone reading.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No `packages/spec` change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; lint passes on the changed files.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset
(`.changeset/36147-record-field-list.md`), and both declaration lines
are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block is the
maintainer's summary, in the maintainer's language).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgWmyKFrcthV9y5wUiP)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgWmyKFrcthV9y5wUiP
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgWmyKFrcthV9y5wUiP -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a60740a commit a6756a2
30 files changed
Lines changed: 1134 additions & 61 deletions
File tree
- .changeset
- ui
- e2e
- live
- packages
- app-shell/src/views
- fields/src
- __tests__
- i18n/src/locales
- plugin-detail/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | | - | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
223 | | - | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| |||
261 | 263 | | |
262 | 264 | | |
263 | 265 | | |
264 | | - | |
265 | | - | |
| 266 | + | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | | - | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
119 | | - | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
89 | | - | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
265 | 286 | | |
266 | 287 | | |
267 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3029 | 3029 | | |
3030 | 3030 | | |
3031 | 3031 | | |
3032 | | - | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
3033 | 3035 | | |
3034 | 3036 | | |
3035 | 3037 | | |
| |||
3058 | 3060 | | |
3059 | 3061 | | |
3060 | 3062 | | |
3061 | | - | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
3062 | 3068 | | |
3063 | | - | |
| 3069 | + | |
3064 | 3070 | | |
3065 | 3071 | | |
3066 | 3072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
176 | 190 | | |
177 | 191 | | |
178 | 192 | | |
| |||
214 | 228 | | |
215 | 229 | | |
216 | 230 | | |
| 231 | + | |
217 | 232 | | |
218 | 233 | | |
219 | 234 | | |
220 | 235 | | |
221 | | - | |
| 236 | + | |
222 | 237 | | |
223 | 238 | | |
224 | 239 | | |
| |||
229 | 244 | | |
230 | 245 | | |
231 | 246 | | |
232 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
233 | 253 | | |
234 | 254 | | |
235 | 255 | | |
236 | 256 | | |
237 | | - | |
| 257 | + | |
238 | 258 | | |
239 | 259 | | |
0 commit comments