Skip to content

Commit 598a34d

Browse files
fix(list): one 16px left edge on the list page, a 40px selection column at any width, no row numbers (#35706)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgEV9LRY8FfTWS7J6T3MwsSL)_ Fixes #35663 repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:列表页左边对齐成一条线:页面栏图标、视图栏图标、表头和每行的勾选框、页脚条数都离左边 16;勾选列在列多要横向滚动时不再被挤到贴边,宽度始终一样;表格不再显示行号,勾选框不用悬停就看得见。 - 为什么做:属于列表页重做这一大项,解决维护者指出的「左侧一列没有对齐、左边距太小」和「行号没必要、勾选框应始终显示」。 - 出错会怎样:只改列表和各处表格的左侧排版与行号显示,不动数据和权限;关联列表、设计器里的表格也一并不再显示行号;「选项」里的行号开关和「已个性化」里的行号一项一起去掉;有问题可以直接撤回。 - 要你做什么:无 ## What changes - **The selection column is 40px at any width** (`data-table.tsx`, `LEADING_CELL_WIDTH`). Every cell of the leading column (header, rows, summary row, the row-number-only cell) carries `w-[1%] min-w-10` instead of `w-10`. Under the table's automatic layout a plain `w-10` let the column shrink to its content once the columns overflowed (16px, the checkbox flush against the page), and on a table narrower than its box it took a share of the spare width (93.9px measured). `min-w-10` holds the floor; the 1% width makes it a percentage column, which auto layout sizes to its minimum and does not widen while a fixed or auto column can take the spare width (the same `1%` the `fitContent` columns use). - **The checkbox sits 16px in** (`LEADING_CELL_INSET = 'pl-4 pr-2'`): 16 + 16 box + 8 gap = 40. - **The checkbox is shown at rest.** The hover swap (`opacity-0` until hover / focus / coarse pointer / any selection) now applies only when a host opts into row numbers; without them every row's checkbox is visible. - **`ObjectGrid` draws no row numbers unless its host asks** (`hostShowRowNumbers ?? false`, was `?? true`). Hosts whose grids lose their numbers with this: the related lists (`plugin-detail` `RelatedList`), the designers' grids (`plugin-designer` `ObjectManager`, `FieldDesigner`), `plugin-view`'s `ObjectView` grid and any page block of type `object-grid`. None is kept on as an opt-in: after this PR no host passes the prop. `data-table`'s `showRowNumbers` stays as an opt-in for other hosts (it is a declared `DataTableSchema` key in `@object-ui/types`). - **The view bar's ends** (`listToolbarRow.ts`, `TOOLBAR_ROW`): from `sm` up, `pl-2.5 pr-2` instead of `px-4`. Every item in the bar is a padded control, so the switcher's 6px-padded icon lands on 16, and the last text trigger's 8px-padded label ends 16 in, where the page bar's 「新建」 ends. Below `sm` the row is unchanged. - **The list page stops passing row numbers, and the 行号 switch goes** (round 2, after #35646 merged). `ListView` drops its session-only row-number state, the `defaultRowNumbers` host prop and the `'rowNumbers'` personalization part; the console host's `defaultRowNumbers={!inSetup}` line goes (`objectViewListRenderer.tsx`); the switch leaves the Options menu's More level (`ViewSettingsPopover.tsx`, which now draws More only for how records open and Edit inline); the 「已个性化」 marker drops its entry (`ListPersonalizedMarker.tsx`); `list.rowNumbers` and `console.objectView.personalizedParts.rowNumbers` leave all 11 packs. Premise correction recorded on the claim: no stored personal row-number setting exists (it was session-only React state), so "刷新后也不显示" needs no migration. - **The docs sentence on the marker** (`content/docs/ui/views.mdx`, claim amendment 3): it no longer lists row numbers among what the marker names. - **A column diagnostic that became false** (`columnSpellingDiagnostics.ts`, claim amendment 2): a grid whose authored columns all fail to resolve "renders NO data columns", no longer "renders its row-number column and NO data columns". ## Tests New: - `ui/e2e/list-left-edge-35663.spec.ts` (Playwright). Real `ObjectGrid` + `data-table` + app-shell `PageHeader` (list posture), bundled by Vite from source, the view bar from `listToolbarRow.ts`'s own constants, the switcher's and the footer's classes read from their sources, real theme Tailwind. Cases: 1280 wide list (overflows), 1280 narrow list (fits), the wide list scrolled to the far right and back, and 375. Migrated (the grid no longer has a `#` column by default): - `plugin-grid`: `columnDeclaredSpellingOnly`, `columnSpellingDiagnosticRender`, `columnSpellingDiagnostics`, `gridColumnMembers-8071`, `gridDependentValues-7165`, `lookupPickerKeys-7154`, `relationalMetaCopySet-7166` (header lists lose `#`; data-cell indexes lose the +1), `rowColorTint-12375` (two sticky cells, not three; the leading cell's tint stays pinned in `data-table-row-tint-sticky-12375`), `rowHeightOffSpecBoundary` (opts into `showRowNumbers` so the table-level cell copy stays observable on the row-number cell), `serverSearch` (see Acceptance notes). - `components`: `data-table-leadingCell-12423`, the "blank until hover" case reversed to "shown at rest". - `plugin-list` (the switch is gone): `ListView.displayPopover-12423` (More carries Edit inline only; the "Row numbers is on by default" case becomes "the list hands the grid no row numbers, and no level offers a Row numbers switch"), `ListView.harness` (the displayMenuClose control flips Edit inline instead), `ListView.restoreViewDefaults-28948`, `ListView.toolbarIconButtons-12695`, `ListView.personalization-28950` (each used the switch as "a Display setting outside the stored preference"; now Edit inline, reported as `inlineEdit`), `ViewSettingsPopover.optionsMenu-35551` (More is offered through Edit inline), `ListViewBlock.compactRegion-12703` (the full list is "the grid was mounted", no longer "with row numbers"). - `plugin-list`, also: `ListView.permissions` (with Edit inline withheld and no drawer to choose, the menu now draws no More row at all; the two withheld cases assert that, each beside its control that opens More and finds the switch), `htmlTierColumnSpellings-6598` and `htmlTierListViewDefaultColumns-6598` (the authored headers no longer start with `#`). - `app-shell`: `ObjectView.setupListChrome-12606`, the control becomes "the same list under another app draws no `#` column either"; `rowClickModifierPayloadForward-9462` (RED 2 opts its grid into `showRowNumbers`, since the hover "open record" button lives in the row-number cell; red on CI at e5c9c4e). Retired: `ListView.harness` › `ListView.setupChrome-12606` CONTROL ("without the prop the grid numbers its rows"); its prop is gone. The describe keeps one case: no list hands the grid row numbers, and Display still draws. ## Acceptance notes docs/qa/platform-checklist items edited: - **`records-forms.list-view-capabilities`** (rev 11 → 12): steps[11] and an acceptance clause for the left edge, the 40px selection column under a sideways scroll, no row numbers and the checkbox at rest, and ≥12 at 375. No earlier clause changed. Readings (the e2e harness, main area 1024 wide beside a 256 sidebar at 1280; x from the main area's left): | | page icon | view icon | select-all | row checkboxes | footer | selection column | row numbers | checkbox at rest | |---|---|---|---|---|---|---|---|---| | main, wide (overflows) | 16 | 22 | 0 | 0 | 16 | 16 | 12 | opacity 0 | | main, narrow (fits) | 16 | 22 | 38.9 | 38.9 | 16 | 93.9 | 12 | opacity 0 | | this PR, wide | 16 | 16 | 16 | 16 | 16 | 40 | 0 | opacity 1 | | this PR, narrow | 16 | 16 | 16 | 16 | 16 | 40 | 0 | opacity 1 | - Scrolled to the far right and back: 40 / left 0 both legs (main: 16); no gap between frozen cells (0). First column's header text and cell text both at 52. - Right edges: page bar 「新建」 box 16 in; view bar's last label 16 in (main: 24). - 375: page icon 16, view icon 14, card content 21, footer 16 (unchanged from main; below 768 the grid draws cards). - The main-branch readings reproduce the card's live readings (0 / 22 / 16 / 28 on the wide list). Found on the way, not filed: - `serverSearch.test.tsx` "reports the real match total" was green because the second row's NUMBER put a "2" in the text; a one-page grid draws no pager, so no total is on screen. Re-pointed to the rows on screen. class: none (a test read, no product defect). - A non-selectable grid with a row click drew a hover 「打开 ›」 button inside its row-number cell (`data-table.tsx`, `row-expand-button`). With row numbers off by default, that button is drawn only where a host opts into row numbers; clicking the row still opens the record, and a Cmd/Ctrl-click on the row still forwards its modifiers (`rowClickModifierPayloadForward-9462` RED 1). carrier: none (follows from the card's "no row numbers"). - The chart view's own view bar copy (`objectViewListRenderer.tsx` ~355, `sm:px-4`) keeps the switcher icon at 22 there; it is outside this card's surface. carrier: none. Screenshots (before / after, 1280 wide, narrow, scrolled, 375): `objectstack-seat5/area-ux/ux-4/list2/card-35663/` in the project files. ## Verification Read first, by risk: 1. `ui/packages/components/src/renderers/complex/data-table.tsx`: `LEADING_CELL_WIDTH` / `LEADING_CELL_INSET` on every leading cell, and the visibility arm now gated on `showRowNumbers`. 2. `ui/packages/plugin-grid/src/ObjectGrid.tsx`: the `?? false` default. 3. `ui/packages/plugin-list/src/ListView.tsx` and `components/ViewSettingsPopover.tsx`: the row-number state, prop and part gone; `hasMore` without the switch. 4. `ui/packages/plugin-list/src/listToolbarRow.ts`: `TOOLBAR_ROW`'s `sm:` padding. Two-minute check: open any wide list (e.g. Contacts) at 1280 and scroll it sideways; the checkbox column keeps its width, 16px from the left, in line with the page bar icon. Open 「选项」 › 更多: no 行号 switch. <details><summary>Local readings</summary> - Geometry spec: 4 passed at this head. On `origin/main` sources: 3 of 4 red (wide, narrow, scroll), 375 green. - Ablations (each through `scripts/ablation-replace.mjs`, restored to the HEAD blob, `git diff HEAD` empty): - `LEADING_CELL_WIDTH` → `'w-10'`: 3 red ("the selection column is 32 wide", "93.9 wide", "32 wide after scrolling"). - `TOOLBAR_ROW` `sm:pl-2.5 sm:pr-2` → `sm:px-4`: 2 red ("view-bar icon starts at 22, not 16"). - `LEADING_CELL_INSET` → `'px-3'`: 3 red ("select-all box starts at 12, not 16"). - visibility arm `showRowNumbers && !selectionActive` → `!selectionActive`: 2 e2e red ("a row checkbox is hidden until hover") and `data-table-leadingCell-12423` red (1 of 6). - Vitest, round 1 (e5c9c4e): `components` complex renderers + the selection tests, `plugin-grid`, `plugin-list`, `plugin-detail`, `plugin-view`, `plugin-designer`, `GridField`, `RecordPickerDialog.layout-11903`, app-shell `ObjectView*`, `views/__tests__`, `rowTable-31856`, `RecordDetailView.topBar-27524`: 1213 files, 11183 passed, 18 skipped. CI at e5c9c4e then found one more pin, `rowClickModifierPayloadForward-9462` (migrated above). - Vitest, round 2 (after merging origin/main at 238661f): `plugin-list` whole, app-shell `views/ObjectView*` + `views/__tests__`, `i18n`: 476 files, 5559 passed, 5 failed in 3 files, all migrated above (`ListView.permissions`, both `htmlTier*-6598`); those 3 files plus `rowClickModifierPayloadForward-9462`, `renderer-copy-locale-25916`, `ObjectView.setupListChrome-12606` and `ObjectView.listPersonalized-28950` re-ran green (7 files, 53 passed). A wider local run (all of app-shell, console, plugin-detail, plugin-view) did not finish inside the box's hour, so the full suite is CI's 16 shards at this head. - Type-check: `components`, `plugin-grid` (round 1), `plugin-list`, `app-shell`, `i18n` (round 2) `type-check` exit 0; `ui` `type-check:e2e` exit 0 (round 1). - i18n: `check:i18n-keys`, `check:i18n-drift`, `check:i18n-dead-keys` exit 0. - Derived gates (`dispatch-gates.mjs --commands`): 74 derived at the round-2 tree, 74 run, each exit 0; `--ran` reconciliation: 74 run, 0 NOT-MEASURED, 0 UNRUN. - `overlap-check --branch=HEAD --pr=35643,35691,35708`: clean against origin/main and each (shared files with #35708: the 11 locale packs, merges cleanly). </details> --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CXPqjy7g6EGFoAkYrr <!-- signed: repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a457b51 commit 598a34d

46 files changed

Lines changed: 767 additions & 237 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/35663-list-left-edge.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/components': patch
3+
'@object-ui/plugin-grid': patch
4+
'@object-ui/plugin-list': patch
5+
'@object-ui/app-shell': patch
6+
'@object-ui/i18n': patch
7+
---
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
fix(list): the list page lines up on one 16px left edge; the checkbox column is 40px at any width; no row numbers
13+
14+
The list page drew five different left edges, and on a list with more columns than fit, the selection column was squeezed to the checkbox's own 16px, flush against the left of the page. Now the page bar's object icon, the view bar's view icon, the header's select-all box, every row's checkbox and the footer's record count all start 16px in, and the selection column is 40px (16px in, the 16px box, 8px before the first column) on a list that scrolls sideways, on one that fits, and after scrolling sideways and back. The view bar's last text trigger ends 16px in, where the page bar's button ends.
15+
16+
The grid no longer draws row numbers unless a host asks for them (`showRowNumbers`): each row's leading cell is its checkbox, shown at rest rather than on hover. This applies to every grid, the list page, related lists and the designers' grids among them. The list page's Options menu no longer offers a 行号 (Row numbers) switch, the 「已个性化」 (Personalized) marker no longer names row numbers, and `ListView` drops its `defaultRowNumbers` host prop; the `list.rowNumbers` and `console.objectView.personalizedParts.rowNumbers` keys leave every language pack.
17+
18+
A non-selectable grid with a row click drew a hover 「打开 ›」 (Open) button in its row-number cell; with row numbers off by default that button now appears only where a host opts into row numbers. Clicking the row, and Cmd/Ctrl-clicking it, still open the record.
19+
20+
Removed from `@object-ui/plugin-list`'s exports:
21+
- `ListViewProps.defaultRowNumbers`: `<ListView defaultRowNumbers={…}>` → delete the prop. Row numbers are off by default; a grid host that wants them passes `showRowNumbers` to `ObjectGrid`.
22+
- `'rowNumbers'` in `ListPersonalizationPart`: an `onPersonalizationChange` handler or a label map keyed on it → drop that entry; the list no longer reports it. A grid whose authored columns all fail to resolve now says it renders "NO data columns" in its console diagnostic, since it no longer draws a row-number column.

‎content/docs/ui/views.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ metadata is read-only. What you author (`sort`, filters, columns, `rowHeight`,
625625
- While a user's list differs from the view, a **Personalized** marker sits beside the list
626626
title (an icon alone on a phone). Opening it names what differs: filters, search, sort,
627627
grouping, column layout, hidden fields, density, and the Display panel's layout, row
628-
color, row numbers and inline editing. Its **Reset to view** is the one way back: it
628+
color and inline editing. Its **Reset to view** is the one way back: it
629629
drops the active view's stored state and cached search, and removes the list's `uf_*`
630630
parameters from the address bar, so the list is the view's own again after a reload too.
631631
Pinned views, favorites, how records open and a "View all" link's `filter[...]` scope are

‎docs/qa/platform-checklist/areas/records-forms.json‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@
615615
"title": "List-view capability matrix: filter, search, sort, pagination, saved views, inline edit, export, visualization switcher, bulk/row actions, conditional formatting",
616616
"since": "v15",
617617
"status": "active",
618-
"revision": 11,
618+
"revision": 12,
619619
"priority": "P1",
620620
"surface": "browser",
621621
"personas": [
@@ -655,7 +655,8 @@
655655
"open the visualization switcher on All Tasks; enumerate the offered types; switch through each",
656656
"on bulk_actions, select rows that are NOT done and run showcase_mark_done (per-record) — its visible gate, has(record.done) && record.done != true, judges each selected row, so a done row in the selection drops Mark Done from the selection actions the page bar shows (since #35554 the list page has no bottom bulk bar), or, over a mixed selection, the confirm reports the done rows not eligible and skipped (QA run #27438); either way the dispatch count stops matching the selection — and showcase_recalc_selection (aggregate — ONE dispatch: an api-type action, which the console sends through the action door, POST /api/v1/actions/showcase_task/showcase_recalc_selection with body {params:{_selectedIds:[…]}}; the server forwards those params flat to the action's own target /api/v1/apps/showcase/recalc in-process, buildApiActionRequest in packages/runtime/src/action-execution.ts, so the browser's network log shows the door request and no /recalc request); on legacy_row_actions confirm both named row actions resolve to live menu entries",
657657
"on Field Zoo, confirm the conditionalFormatting row highlight applies to Specimen — Full (f_lookup set) and not Specimen — Minimal",
658-
"at 1280×800 on a zh-CN session, read the list frame on All Tasks, then on its kanban view: a 44px page bar with the object's icon and name on the left and ⋮ (description, import, favorite) and 「+ 新建」 on the right; a 40px view bar with ONE switcher trigger reading type icon → view name → record count → caret on the left and 「筛选」「排序」「选项」 plus the search icon on the right; no condition row height while no condition is set; on the grid a 32px header and 33px rows at 13px; and, on a view whose columns declare a `summary`, each total under its own column with 「计数 N」 leftmost and no doubled colon. The kanban view draws the same two bars (objectstack#35548; the count beside the view name returns, after objectstack#34603 removed it)"
658+
"at 1280×800 on a zh-CN session, read the list frame on All Tasks, then on its kanban view: a 44px page bar with the object's icon and name on the left and ⋮ (description, import, favorite) and 「+ 新建」 on the right; a 40px view bar with ONE switcher trigger reading type icon → view name → record count → caret on the left and 「筛选」「排序」「选项」 plus the search icon on the right; no condition row height while no condition is set; on the grid a 32px header and 33px rows at 13px; and, on a view whose columns declare a `summary`, each total under its own column with 「计数 N」 leftmost and no doubled colon. The kanban view draws the same two bars (objectstack#35548; the count beside the view name returns, after objectstack#34603 removed it)",
659+
"at 1280×800 with the sidebar open, read the left edges of the list page on All Tasks (a list whose columns fit) and on a list that scrolls sideways (stage one by showing every field of showcase_task through 选项 → 字段): the page bar's object icon, the view bar's view icon, the header's select-all box, each row's checkbox and the footer's record count each start 16px from the main area's left; the selection column is 40px on both lists and stays 40px, pinned at the left, after scrolling to the far right and back; no row shows a number and each row's checkbox shows without a hover; the view bar's last trigger label and the page bar's 「+ 新建」 end 16px from the right; at 375 wide no leading item sits closer than 12px to the left (objectstack#35663)"
659660
],
660661
"acceptance": [
661662
{
@@ -723,6 +724,12 @@
723724
"oracle": "dom",
724725
"verify": "read getBoundingClientRect and the computed font size of each part at 1280×800 zh-CN (the geometry and order halves are pinned by ui/e2e/list-frame-geometry-35548.spec.ts over the real class strings; the kanban half by ui/packages/plugin-list/src/__tests__/ListView.viewBarLeading-35548.test.tsx); the summary half needs a view whose columns declare `summary`, which task.view.ts does not, so stage one in the showcase's customization pair as negative[0] does",
725726
"evidence": "light and dark screenshots of the grid and the kanban, plus the measured heights"
727+
},
728+
{
729+
"clause": "the list page has one left edge: page-bar icon, view-bar icon, select-all box, row checkboxes and footer count each at 16px (±1) from the main area on a list that fits and on one that scrolls sideways; the selection column is 40px on both and keeps its width and its left pin after a sideways scroll and back, with no gap between frozen cells; no row numbers; every row checkbox visible at rest; at 375 no leading item closer than 12px",
730+
"oracle": "dom",
731+
"verify": "read getBoundingClientRect of each item from the main area's left at 1280×800 on both lists, and the computed opacity of the row checkboxes with the pointer off the table (pinned by ui/e2e/list-left-edge-35663.spec.ts over the real ObjectGrid, PageHeader and view-bar classes)",
732+
"evidence": "screenshots of both lists at rest and scrolled, plus the measured edges"
726733
}
727734
],
728735
"negative": [
@@ -812,6 +819,12 @@
812819
"date": "2026-11-19",
813820
"change": "steps[4] and acceptance[3] (clause and verify) follow #35554: a list view that declares no `pagination` has no pager and loads its next window as it scrolls (top=50, then top=50&skip=50), and only a view that declares `pagination` pages; the paging variant now walks both. steps[8] names where the bulk actions are offered now — the page bar, while rows are selected — instead of the retired bottom bulk bar. Read at base e01b8bed (after #35548)",
814821
"ref": "#35554"
822+
},
823+
{
824+
"revision": 12,
825+
"date": "2026-11-19",
826+
"change": "steps[11] and its acceptance clause added: the list page's left edge (objectstack#35663, epic #35547). The page bar's icon, the view bar's icon, the select-all box, every row's checkbox and the footer's count share one 16px line, the selection column is 40px at any width and under a sideways scroll, and the grid draws no row numbers (each row's checkbox shows at rest). No earlier clause changed",
827+
"ref": "#35663"
815828
}
816829
]
817830
},

0 commit comments

Comments
 (0)