Repository navigation
fix(plugin-detail): a record page's body table wider than the details column pins its first column and offers ⤢ as "All columns" - #29982
Merged
Conversation
…than its column A body table that overflows the details column pins its first column, keeps the table's own right-edge shadow, and offers the enlarge control with a visible label; a table that fits shows none of these cues. Claude-Session: https://claude.ai/code/session_01WGufziRW9G6UKkSyGRbh7x Co-authored-by: Claude <noreply@anthropic.com>
…or the body-table overflow cues Claude-Session: https://claude.ai/code/session_01WGufziRW9G6UKkSyGRbh7x Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#1 · os-support-ai · session_01WGufzjDyeFwq6AuFu3vwTd 维护者速读(席位终稿)
席位核对 · ACCEPT · head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Yibo Wang · project thread
Fixes #29945
Clause-②: no
Metadata-protocol: none
维护者速读
data-table表头标签多了一个title(所有表格都有,悬停显示完整列名),滚动容器多一个data-table-scroll-box标记属性。新增一个 i18n 键(10 个语言)。不加 spec 键、不改布局;回滚即还原本 PR。ui/packages/plugin-detail/src/RelatedList.tsx中bodyTableOverflows的读数 effect 和放大按钮的两种形态;ui/packages/components/src/renderers/complex/data-table.tsx的两处属性;测试RelatedList.bodyTable-27055.test.tsx新增的 objectstack#29945 用例组。pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/RelatedList.bodyTable-27055.test.tsx,预期 15 个测试全部通过(8 列:有阴影、首列 sticky、放大按钮带文字;滚到末尾阴影消失;3 列放得下:三者皆无)。What changes
The seat's ruling for this card keeps the record page v3 grid (ADR-0085's role-based layout puts body tables in the details column) and makes the overflow obvious instead. A body table (
bodyTableinRelatedList, a related list inRecordBodyTablesContext) now reads whether it is wider than its column, and while it is:data-table(objectui#12708); clears at the endfrozenColumns: 1, set only while the table overflowsdetail.relatedCardAllColumns("All columns" / 「全部列」); sameenlargeRelatedcall, same enlarged tabtitlewith the whole label (everydata-table, see below)A body table that fits shows none of these: no pinned column, the icon-only ⤢ (
aria-label"Enlarge"), anddata-tabledraws no shadow.How overflow is read.
RelatedListwraps the table in a hostdivand, in a layout effect, finds the table's scroll box by a newdata-table-scroll-boxmarker and readsscrollWidth - clientWidth > 1, re-read by aResizeObserveron the box and on itstable(rows arriving, columns sizing themselves). If the table mounts after the list (a deferred renderer) aMutationObserverwaits for the box, then disconnects. The effect is keyed on primitives only (bodyTableDrawn,isMobile; ui/AGENTS.md commandment 10). Under 768 px the body table is the card gallery and readsfalse. The PM's mechanism assumption holds: overflow is detectable from the scroll container with aResizeObserver, and jsdom has no layout, so the tests stub the widths.No new scroll-shadow or sticky utility. The shadow is
data-table's own (fromcustom/use-horizontal-overflow), the pin isdata-table'sfrozenColumns. Neither was changed.@object-ui/components, two attributes ondata-table. (1) the header labelspancarriestitle={col.header}. This reaches everydata-table, not only body tables (a non-body-table header case is pinned, below). (2) the scroll box carriesdata-table-scroll-box=""for a host that reads its overflow. In a table's auto layout a header cell is never narrower than its nowrap label, so (1) is the hover fallback for the ellipsis; the card's "Busines…" reads as the box edge cutting the column, which the pinned first column, the shadow and the labelled ⤢ now announce.Tests
New top-level
describein the existing body-table harness,RelatedList.bodyTable-27055.test.tsx(the widths stubbed onHTMLElement.prototypefor the element carryingdata-table-scroll-box: 120 px per header cell inside a 680 px column; restored inafterAll):data-body-table-overflow="true", the right shadow present, the first header cellstickyand the second not, ⤢ carriesdata-overflow="true"with a visible label and no icon-onlyaria-label, clicking it callsenlargeRelated('clm_version.contract'), and the "Business owner" header carries its full label astitle;scrollLeft = scrollWidth - clientWidth, then ascrollevent): the trailing shadow clears, the first column stays pinned, overflow stilltrue;data-body-table-overflow="false", no shadow, nostickyheader, the icon-only ⤢ with itsaria-label;spancarriestitle="Quantity", the reach of thedata-tablechange beyond body tables.Ablation. On fix commit
384e15f8, throughscripts/ablation-replace.mjs: the overflow readsetBodyTableOverflows(box.scrollWidth - box.clientWidth > 1)replaced bysetBodyTableOverflows(false /* ABLATED-29945 */): anchor x1 → x0, blobfc68c4aefa7e→6e7dc9971b75; 2 tests red ("eight columns in the details column…" and "scrolled to the end…"), 13 green (the CONTROL among them). Restored: blob == HEADfc68c4aefa7e,git diff HEADempty. The test imports../RelatedListfrom source, so no build sat between the mutation and the run.Acceptance notes
npm pack @object-ui/components@18.3.0carriesdata-table-scroll-shadow-rightindist/index.js, so the card's "no visible cue" was measured against a page that had the shadow (afrom-foreground/10gradient 24 px wide) and a scrollbar that stays transparent until hover. This PR leaves the shared shadow as it is and adds the pinned column and the labelled ⤢; whether the shared shadow itself should be stronger is adata-table-wide design call, not taken here.border-r-2+ shadow,data-table's frozen-column styling) is the left-edge cue; no separate left shadow was added.Metadata-protocol: none. No change to which column a body table sits in.plugin-detailanddata-tablenames none touchingRelatedList.tsxordata-table.tsx(hits: the Version Packages PR and unrelatedplugin-auth/spec/lintPRs).Verification
All on head
d361bd80(shared box; lock VERDICT lines quoted).Build, type-check, vitest
npx turbo run build --filter='@object-ui/plugin-detail...' --concurrency=2: VERDICT command-exit 0 (52 tasks, 6m31s)npx turbo run build --filter=@object-ui/components --filter=@object-ui/i18n --filter=@object-ui/plugin-detail --concurrency=2: VERDICT command-exit 0 (52 tasks, 47 cached)pnpm --filter @object-ui/plugin-detail type-check,… @object-ui/components type-check,… @object-ui/i18n type-check(eachtsc --noEmit && tsc -p tsconfig.test.json): VERDICT command-exit 0 ×3pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/: VERDICT command-exit 0 · Test Files 369 passed | 1 skipped (370) · Tests 3253 passed | 18 skipped (3271)pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/: VERDICT command-exit 0 · Test Files 476 passed | 1 skipped (477) · Tests 4548 passed | 24 skipped (4572)pnpm --dir ui exec vitest run --maxWorkers=2 packages/i18n/: VERDICT command-exit 0 · Test Files 95 passed (95) · Tests 1443 passed | 13 skipped (1456)pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/RelatedList.bodyTable-27055.test.tsx: 15 passed (15)npx eslinton the changed files from each package dir: 0 errors (warnings only, pre-existingno-explicit-anyclass)Derived gates (`dispatch-gates --commands`, 35 lines, then `--ran`)
dispatch-gates --ran: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN, exit 0 ("a DERIVED zero — all 35 recorded an exit code and none of them is 3"). CI check-runs: read by the seat.Generated by Claude Code