Repository navigation
fix(plugin-detail): a related list's date column reads in one absolute face - #26519
Conversation
…lumn (red) Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…e face RelatedList's table cell builder passes inGridColumn on every cell it makes, as ObjectGrid does, so an undeclared date column paints one absolute face with the relative phrase as its title. A declared format still wins. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…oltip A related list's table cell now paints the absolute face with the relative phrase as its title, so the per-row deadline pin asserts both. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
Correcting another PR's pending release note is a release decision for a person, not part of this diff. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
维护者速读改了什么:记录页相关列表自建的表格单元格,现在和列表网格一样带上 席位核对seat 2 · 2026-10-27T06:47Z · head
|
Fixes #26344
Clause-②: no
Metadata-protocol: none
维护者速读
inGridColumn;未声明format的日期列整列只显示一种绝对日期,相对说法("昨天"、"逾期 3 天")移到悬停提示里。RelatedList.tsx一处单元格构建(加一个属性)、一个新 pin、一个旧 pin 改断言、一个 patch changeset。声明了format: 'relative'的字段照旧;手机宽度的卡片画廊、详情正文不受影响。回滚即 revert 本 PR。ui/packages/plugin-detail/src/RelatedList.tsx的makeCell末尾inGridColumn: true;新 pinRelatedList.dateColumnOneFace-26344.test.tsx的四条路径。cd ui && pnpm exec vitest run packages/plugin-detail/src/__tests__/RelatedList.dateColumnOneFace-26344.test.tsx packages/plugin-detail/src/__tests__/RelatedList.deadlineSettled-11815.test.tsx,预期 2 个文件 6 个用例全绿。What changes
ui/packages/plugin-detail/src/RelatedList.tsx: the table cell builder (makeCell) passesinGridColumn: trueon every cell it creates, the wayObjectGriddoes since fix(fields,plugin-grid): a grid date column reads in one absolute face #26341. All three column sources reach that one builder (objectcolumns, stringcolumnsand the object'shighlightFieldsthroughnormalizeColumn, and the field walk), so one line covers every table cell the list builds. An undeclareddatecolumn now reads in one absolute face, with the relative phrase as the cell'stitle; a declaredformatstill wins (DateCellRendererreads the flag only when the field declares none).ui/packages/plugin-detail/src/__tests__/RelatedList.dateColumnOneFace-26344.test.tsx, modelled onObjectGrid.dateColumnOneFace-25884. It mounts the real list over the real data-table at desktop width and drives paths A (objectcolumns), B (stringcolumns), C (highlightFields) and D (the field walk). For each one it checks: one absolute face per date column (six rows at -1, -3, -6, +2, -40 and -400 days), the deadline's red kept withOverdue 3d/In 2 daysas tooltip,Yesterdayas the tooltip of an undeclared date, and the control: a field declaringformat: 'relative'keepsYesterday/3 days ago.RelatedList.deadlineSettled-11815.test.tsx: its cell text expectations moved from the relative phrase to the absolute face plus the phrase astitle. The per-row verdict it pins (open row red, settled row neutral) is unchanged..changeset/26344-related-date-one-face.md(@object-ui/plugin-detailpatch), carrying both declaration lines.Tests
548f25d0(pin only, no fix) the new pin failed 4 of 4, each onexpected 'Yesterday' not to match /ago|yesterday|today|tomorrow|^in \d|…/i.ca662813),pnpm exec vitest run packages/plugin-detail --maxWorkers=2(fromui/, under the verify lock): 1 failed, the 11815 pin asserting the old relative text, as expected. That pin was updated ind6a01e1d.pnpm exec vitest run packages/plugin-detail --maxWorkers=2on the tree ofd6a01e1d: Test Files 309 passed, 1 skipped (310); Tests 2869 passed, 18 skipped (2887); lock VERDICT command-exit 0. The head2811bbccdiffers from that tree only by restoring.changeset/25884-grid-date-absolute.mdto its merge-base bytes.pnpm --filter @object-ui/plugin-detail type-check(tsc --noEmit && tsc -p tsconfig.test.json): VERDICT command-exit 0.tsc -p tsconfig.test.json --listFilesOnlylists both touched test files (2 of 2).Gates
At head
2811bbcc:node scripts/pm/dispatch-gates.mjs --commandsderived 34 families. All 34 ran with exit 0 and were reconciled with--ran: "34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED (a DERIVED zero)". These includecheck-sdui-manifest(intact, 106 components; no registry contract changed, so no regeneration),check-empty-changeset,check-adr-0087-registration,check:cross-package-test-inputs,check:test-source-alias,check:type-check-coverage,check:type-check-debtandpnpm --dir ui exec vitest run scripts/(178 files passed, 2 skipped). Families CI runs outside the derived set are left to the PR's check-runs.Acceptance notes
.changeset/25884-grid-date-absolute.md(from fix(fields,plugin-grid): a grid date column reads in one absolute face #26341) lists "a record page's related list" among the surfaces that "renderdatecells as before". Once this PR lands, that sentence is false for the release that ships both notes. An earlier commit on this branch corrected it, andcheck-empty-changesetrefused the edit: rewriting another PR's pending note is a decision about a release, not part of this diff. The note is therefore left byte-identical tomain, and this PR's own note states the new behaviour. Whether to drop the four words from the list grid: a date column mixes relative and absolute formats in the same column ("昨天 / 3天前 / 7天前 / 9月25日 / 2025年9月20日"), so a sorted column cannot be read as sorted #25884 note is left to a person.CellRendererProps.inGridColumn's doc comment inui/packages/fields/src/index.tsxsaysObjectGridpasses the flag. That is still true but no longer complete, because a related list's table passes it too. The file is outside this card's surface, so the comment is unchanged.RecordPickerDialog,cellRenderer={getCellRenderer}) draws its own candidate table in@object-ui/fields, which is not one of the cells this list builds, so it is untouched. Whether its date columns mix faces was not measured.{ field, label }. An object column with no display text is deliberately left headerless (RelatedList.columnHeaderLabel).Generated by Claude Code