You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dda665f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(grid): a narrowed list keeps every data cell clear of its fixed columns and shows its scrollbar (#35552)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg6v19uPsX6gX42G8tGcvvzb)_Fixes#35446
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户看到的变化:AI
助手打开、窗口变小或记录抽屉打开、列表放不下时,每行的「⋮」移到名称列旁边一起冻结,不再压住金额等数据列;其余列横向滚动,底部滚动条一直可见;页头不显示说明文字,「导入」收进「⋯」,标题不再被截断。
- 为什么:右侧面板打开时,列表里的金额被「操作」列遮住,后面几列看不到,也没有任何提示。
- 如果判断错:只影响窄宽度下列表和页头的显示,不隐藏任何列、不改列配置,其他页面的页头不变;够宽时和原来一样。
- 需要您做的:无,席位落地。
## What changes
**Row actions column (plugin-grid).** `useInlineRowActionFold` already
folded inline primary row actions into the row's "⋮" menu while the
table overflowed its scroll box. It now also answers `actionsFrozen`.
While the table, menu-only, is still wider than its box, `ObjectGrid`
draws the auto-pinned Actions column right after the frozen columns and
counts it into `frozenColumns`, instead of pinning it to the right edge.
The frozen zone never covers a column at rest, so every data column
scrolls and none is covered. The column goes back to the right edge once
the box is as wide as the table was when it moved. The move swaps the
frozen zone's edge rule, which changes the width by a pixel or two, so
the way back reads the width recorded before the move and cannot
flip-flop. A frozen table that fits with more than 4 px to spare also
goes back, so a table that shrank while frozen is not held there. The
placement survives a data refresh.
Option picked, of the three the dispatch named: **join the frozen
zone**. The card measured an opaque right-pinned cell over a clipped
data cell (the geometry pin's overlap reading is 67.9 px on
`origin/main`). A "⋮" shown on row hover would still cover a cell while
it shows, and has no hover on touch. In the frozen zone the trigger is
always visible, one click away, and covers nothing.
Not changed: an author's own `pinned: 'right'` columns (the author's
layout, per the card's 「不改列表的列配置」), the grouped list (it disables frozen
columns in its shared scroller), and a list whose table fits its box
(the CONTROL cases).
**Scrollbar (components `data-table`).** While the table is wider than
its box (`scrollsSideways`, read at mount and on resize), the scroll box
draws its scrollbar at rest in the muted foreground. A table that fits
keeps the shared hover-only bar of objectui#12708. This is the approach
of the Studio Records tab fix (`RECORDS_SCROLLBAR_VISIBLE`) moved into
the table, and applied only while the table actually scrolls sideways.
**List header (app-shell).** `PageHeader` gains an opt-in `compactBelow`
(px of the header's own width). Below it, the one-row header does not
draw the description, draws `foldedActions`, and drops the title's 60 %
cap, which exists only to leave room for the description. Setup's
two-line posture ignores it. Only `ObjectViewPageHeader` passes it (768,
the `md` breakpoint read against the header's own width), so every other
`PageHeader` page is unchanged. At 768 px and above, the list header is
exactly as before, including the content-driven fold of objectui#12705.
## Tests
- `ui/e2e/list-narrow-pinned-columns-35446.spec.ts` (new Playwright
geometry pin; the real `ObjectGrid` is bundled from source, styled with
real Tailwind). Case: a 699 px main area (the card's AI-panel case),
with and without an inline primary action. Checks: no fixed cell
overlaps a data cell in the header row or the first body row; every data
cell in view answers `elementFromPoint` at its centre; the "⋮" column
sticks left after `name`; the scrollbar colour at rest is not
transparent; the last column answers at its centre after a scroll to the
end; Archive runs from the row menu. CONTROL at 1184 px: nothing moves
and nothing is covered, and the bar stays hover-only. CONTROL at 699 px
with columns that fit: Actions stays on the right.
- `ui/e2e/list-header-narrow-35446.spec.ts` (new; the real
`ObjectViewPageHeader` with the actions its page builds,
`useObjectViewHeaderChrome`, and the `action:bar` renderer). At 699 px:
compact form, no description, no Import button in the row, New drawn,
nothing spills past the header, the title is not cut, and Import runs
from the 「⋯」 menu. CONTROL at 1184 px: description drawn, Import is a
button, the actions are not folded.
- `PageHeader.actionsFold-12705.test.tsx`: new top-level describe for
`compactBelow`. At 700 px: no description, folded actions, Import runs
from the 「⋯」, title not capped. It follows width both ways (1000 px
gives the full row, 700 px compact again). CONTROL: no `compactBelow`
keeps the description, the three actions and the cap. CONTROL: Setup
ignores it.
- `row-action-sticky.test.tsx` and
`data-table-scroll-shadow-12463.test.tsx`: new top-level describes, as
in the first round.
- Existing pin updated: `related-list-pinned-actions-width.spec.ts`, the
case where the drawer overflows even menu-only, now asserts the Actions
column has left the right edge. The jsdom pins of the right-pinned shape
are unchanged and green.
<details><summary>CI red on ca569b4, root cause and fix: the header
pin's title-cut assertion</summary>
`Build & E2E UI` failed both attempts on the AI-panel header case, at
the assertion that the title is not cut. CI reading: `compact: true`,
`folded: true`, `spill: []`, `titleClipped: true`. The pin's measure is
right; the header was wrong. In the compact form the title kept the
one-row header's 60 % cap (`sm:max-w-[60%]`), which leaves room for a
description the compact form no longer draws. With CI's fonts, the title
「Opportunities / Open opportunities」 is just wider than 60 % of the 521
px text block (312 px), so it was cut while about 200 px of the row
stood empty. Locally the fallback font measured 291 px and passed, which
is why the first local run was green.
Reproduced locally by making the fixture's view label long enough to
exceed the cap in any font (`Open opportunities this quarter`). Red
before the fix: `title.box 312, content 391, block 521, maxWidth 60%`,
"the title is cut". The fix drops the cap in the compact form only.
Green after the fix: `box 391, content 391, maxWidth 100%`. The
full-width CONTROL keeps `maxWidth 60%`. The assertion is unchanged; the
pin now also reports the title's box, content, block and max-width.
Ablation of the fix (cap restored in compact, anchor 1 → 0, replacement
0 → 1): red with the same reading, restored blob == HEAD.
</details>
<details><summary>Readings and ablations</summary>
Grid pin on `origin/main` code at 699 px: Actions pinned right, overlap
67.9 px over `expected_revenue`, scrollbar `rgba(0, 0, 0, 0)` (2 failed,
2 CONTROLs passed). This branch: `order [name, _actions, account, …,
close_date]`, `frozen [name, _actions]`, overlap 0, `covered []`,
scrollbar `rgb(100, 116, 139)`, `scrollWidth` 977 before and after the
move.
Ablations, each through `scripts/ablation-replace.mjs`, restored with
blob == HEAD and `git diff HEAD` empty:
- `actionsInFrozenZone` forced false: grid pin red (overlap 67.9 px),
`row-action-sticky` 2 failed.
- at-rest scrollbar forced off: grid pin red ("the scrollbar is
transparent at rest"), the 12463 file 1 failed.
- the list page's `compactBelow` opt-in removed: header pin red ("the
list header did not take its compact form"). The reading shows that on
`origin/main` the 699 px header already folds Import (`folded: true`)
but keeps its description.
- the description guard in `PageHeader` removed: header pin red ("the
description is still drawn"), the PageHeader harness 2 failed.
- the compact title cap restored: header pin red ("the title is cut").
- Two attempts were refused by the tool as no-ops before running,
because the replacement was a substring of the anchor. Each was redone
with a distinct replacement.
</details>
## Acceptance notes
- Premise readings on `origin/main`: the name column was already frozen
and the table already scrolled inside its own box; the header already
folded Import into the 「⋯」 once its text would clip (objectui#12705).
Still true were the Actions column over a data column at rest, the
transparent scrollbar at rest, and the description drawn at a narrow
width.
- The grouped list (a `groupBy` view) keeps its right-pinned Actions
column over the shared scroller. Frozen columns are disabled there by
design, and it is out of this round (not reproduced in a browser).
- Headless Chromium draws no scrollbar, so the grid pin reads the
scrollbar's computed colour, not the room it takes.
## Verification
<details><summary>Local runs</summary>
- Round 1 (head 8e8ce3d): `vitest run packages/plugin-grid/` plus the
76 components test files that name the data table: 364 files passed, 1
skipped; 3045 tests passed. `vitest run scripts/` (ui): 171 files
passed, 5092 tests passed. Type-check of components and plugin-grid:
exit 0.
- Round 2: both new e2e specs plus the related-list spec, green on the
final head. PageHeader harness: 11 passed. Under the shared lock:
`@object-ui/app-shell` type-check and `pnpm check:type-check-debt`, exit
0 (`VERDICT command-exit 0`).
- The derived gate families and the targeted app-shell tests on the
final head are in the report on #35446.
- `overlap-check` clean before each push of this round. `Test UI` and
the rest of the farm run in CI.
</details>
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6CbSphdunq2aJq7ktuY -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(grid): a list in a narrowed main area keeps every data cell clear of its fixed columns, shows its horizontal scrollbar, and draws a short header
8
+
9
+
Clause-②: no
10
+
Metadata-protocol: none
11
+
12
+
-**Row actions column.** While a list's table is wider than its box (the AI panel docked, a small window, the record drawer open), the row actions column (the row's "⋮") is drawn right after the frozen name column and frozen with it, instead of pinned to the right edge, where it covered the data column reaching that edge (an amount cut to 「¥94,0」). Every data column then scrolls sideways under the frozen columns, and none is covered at rest. Once the box is wide enough for the whole table again, the column goes back to the right edge, so a list that fits looks as before. Inline primary row actions still fold into the "⋮" menu first, as before. Columns an author pinned to the right stay where the author put them; the grouped list is unchanged.
13
+
-**Horizontal scrollbar.** A table wider than its box draws its scrollbar at rest instead of only while the pointer is over it, so columns out of view are announced. A table that fits keeps the scrollbar that shows on hover.
14
+
-**List header.** While the list page's header is narrower than 768 px, it draws no description, and Import moves into the 「⋯」 menu beside New. A wider header is unchanged. This is opt-in: the console `PageHeader` gains `compactBelow` (a width in px; below it the one-row header drops its description and draws its folded actions), which only the list page passes, so other pages that use `PageHeader` are unchanged. Setup's two-line header ignores it.
15
+
- No column is hidden and no column configuration changes.
0 commit comments