Repository navigation
Commit d96c878
feat(list): no Actions column on the list page; a selection swaps the page bar; lists load as they scroll (#35637)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgEV9LRY8FfTWS7J6T3MwsSL)_
Fixes #35554
repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 列表页不再有「操作」列,行尾也没有悬停 ⋮;勾选后页面栏换成「商机 / 已选 N 条」+「取消」+ 前两个操作,其余进 ⋮。
- 右键菜单与 ⋮ 同一组操作,「删除」放最后、分隔线后、红色;整个勾选格可点,Shift 连选。
- 没声明 `pagination` 的表格视图改为滚动加载(每次 50),总数显示在视图名旁(服务器总数),点进记录再返回会回到原位置;声明了
`pagination` 的视图照旧翻页。
- 不在列表页的表格(相关列表、页面块、记录抽屉)保留操作列和底部批量栏作为兜底。
## What changes
**No Actions column on the list page; the selection swaps the page bar**
(items 1–3)
- `plugin-grid/src/listPageBarSlot.ts` (new): a small external store.
The page bar registers a slot element and the scope it speaks for (its
page column); a grid whose root sits inside that scope portals its
selection UI into the slot and reports `selecting`. Rendered by
`app-shell/src/views/objectViewPageHeader.tsx`, which shows a selection
face 「对象名 / 已选 N 条」 in the 44px bar while rows are ticked and hides the
regular `PageHeader`. No change to `ObjectView.tsx`.
- `plugin-grid/src/components/SelectionPageBar.tsx` (new): count,
Cancel, the actions for the selection. One record ⇒ that row's own
actions (the same plan its menu resolves); two or more ⇒ the bulk
actions. The first two are buttons, in declared order (the object's
`list_item` actions are sorted by `order` when assembled; with no
`order`, the first two as declared), the rest behind "⋮"; Delete is
never a button. With every loaded row ticked and more matching, it
offers 「已选当前加载的 N 条。」 + 「选择全部 M 条」 (the existing select-all-matching
fan-out and its 5000 cap).
- `ObjectGrid.tsx`: inside a page-bar scope the grid draws no `_actions`
column (`objectGridActionsColumn.tsx` `drawRowControls`) and no bottom
`BulkActionBar`. **Fallback, as ruled:** a grid in no page bar's scope
(related lists, page blocks, the record drawer, any host without the
Console header) keeps its Actions column and its bottom bulk bar
unchanged.
**Context menu** (item 4) — `RowActionMenu.tsx` / `RowContextMenu.tsx` /
`BulkActionBar.tsx`: Delete is the last item, after a separator, in
`text-destructive`; a selection's menu closes with its destructive bulk
actions the same way (`orderSelectionMenuItems`).
**Checkbox cell and Shift** (item 5) — `components/.../data-table.tsx`:
the whole leading cell already toggled the row; Shift+click now extends
from the last toggled row over the rows between (multiple selection
only).
**Scroll loading and the count** (item 6) —
`plugin-list/src/ListView.tsx` (paging/count plumbing only) +
`plugin-grid/src/objectGridInfiniteLoad.ts` (new):
- A grid list whose view declares no `pagination` (spec `pagination` is
optional with no default, so its presence is the declaration) draws no
pager. It loads 50 rows, and the next 50 (`$top=50&$skip=50`) when the
table's scroll box comes within 320px of its end; a box with no height
(hidden, not laid out) asks for nothing.
- The count beside the view name is the server's `total` of matching
rows (not the rows loaded): the view switcher's count from #35548, fed
through `toolbarLeading`'s `recordCount`, which under scroll loading is
the find's total.
- Coming back: the scroll position and the rows held are kept in
`sessionStorage` per list address; on return the list reads those
windows back and restores the position once they are drawn.
- Re-reading held windows (the return above, and a refresh after a write
with several windows loaded) is one request per 50-row window, in
parallel — never one read of every held row: a host caps a read's `$top`
(`OS_DATA_MAX_PAGE_SIZE`) and refuses a read over it with 400
`MAX_RECORDS_EXCEEDED` (L1 M1).
- A view that declares `pagination` keeps its pager exactly as before.
Footer totals stay server-computed over every matching row.
**i18n** — new keys in all 11 packs: `grid.selectedCount` (plural
family), `grid.selectedAllLoaded` (plural family),
`grid.selectAllTotal`. zh-Hant regenerated from zh-Hans.
## Tests
New
- `plugin-grid/src/__tests__/listPageBarSlot-35554.test.tsx` (7): no
`_actions` column in a page-bar scope + CONTROL with none; one row
selected exposes the record's first two actions, the rest in ⋮, no
bottom bar; two rows show the bulk actions and Cancel restores; CONTROL
bottom bar without a page bar; Shift range; right-click Delete last
after the separator.
-
`plugin-list/src/__tests__/ListView.infiniteRereadPageCap-35554.test.tsx`
(2): a data source that refuses `$top` over one window, as a capped host
does; coming back to a kept position over 110 rows, and a refresh with
three windows held, each re-read as `$skip` 0 / 50 / 100 with `$top` 50
and all 120 rows back.
- `ui/e2e/list-no-actions-column-35554.spec.ts` (16, Chromium): the real
`ObjectViewPageHeader`, view-bar switcher, `ListView`, `ObjectGrid` and
zh-Hans pack bundled from source, 120 rows paged by `$skip`/`$top`, at
1280×800 and 1167×762 — no column / no hover control and the last column
fully visible; 「已选 2 条」 with nothing floating over the rows; one vs two
selected expose different actions; right-click ends with separator +
「删除」; no pager, scroll loads to 100, switcher count 120, 「选择全部 120 条」;
remount lands with 商机 60 in view; declared `pagination` still pages;
light/dark screenshots.
Migrated (behaviour changed by this card)
- `plugin-grid/src/__tests__/phoneCardRowActions-29150.test.tsx`,
`rowContextMenu-28434.test.tsx` — expected item order: Delete moves from
second to last.
-
`app-shell/src/views/ObjectView.bulkWiredHeaderDuplicate-12462.test.tsx`
— reads the selection's actions from the page bar (exposed buttons + ⋮)
instead of `bulk-actions-bar`; Clear → Cancel. Same assertions on which
actions are carried.
- `app-shell/src/views/ObjectView.inviteOutcome-27797.test.tsx`,
`ObjectView.listOnlyRecordPage-33219.test.tsx` — open the row's menu by
right-click (the row has no ⋮ on the list page); same items asserted.
- `plugin-list/src/__tests__/ListView.calendarDateWindow-12081.test.tsx`
— the paged-grid CONTROL now declares `pagination: {}` (a grid without
it loads as it scrolls).
- `ui/e2e/live/action-modal.spec.ts`, `list-row-action-cel.spec.ts`,
`screen-flow.spec.ts` (Live E2E UI) — open the row's menu by
right-clicking the first row instead of its ⋮; same items asserted.
Retired: none.
## Acceptance notes
- Checklist items edited
(`docs/qa/platform-checklist/areas/records-forms.json`):
`records-forms.list-view-capabilities` rev 11 (steps[4], acceptance[3]
clause + verify: scroll loading vs a declared pager; steps[8]: bulk
actions in the page bar), `records-forms.bulk-select-all-matching` rev
10 (steps[0–2], acceptance[0]: the page bar's 「选择全部 M 条」 offer),
`records-forms.v18-semantic-defaults` rev 8 (acceptance[1]: "first
window").
- Exposed actions: one record exposes its declared `list_item` actions
first, then the built-in Edit when there is room; Delete is never
exposed. Bulk exposes the first two non-destructive bulk actions.
- Locales other than en / zh-Hans / zh-Hant reuse their "on this page"
wording for 「已选当前加载的 N 条」.
- Twenty (AGPL) was used as a reference for structure and sizes only; no
code was read or copied.
## Verification
- vitest after merging `origin/main` (e01b8be): plugin-grid +
plugin-list + i18n + components table renderers 6641 (6628 passed, 13
skipped, 0 failed); app-shell list/page-header files 1781/1781; other
packages' tests that pin the changed testids or mount `ListView` (194
files) 4529 (4517 passed, 12 skipped, 0 failed); `pnpm --dir ui exec
vitest run scripts/` 5094 (5092 passed, 2 skipped).
- After the M1 fix (2a4b0b4): `packages/plugin-list` 1890/1890 (178
files); Playwright `e2e/list-no-actions-column-35554.spec.ts` 16/16. CI
green on 2a4b0b4 (Test UI 16 shards, Test Core, Build & E2E UI, Live
E2E UI, Type Check UI, TypeScript Type Check, Lint & Repo Gates;
mergeable clean).
- Ablations (`scripts/ablation-replace.mjs`, restored to the HEAD blob
each time): `drawRowControls` forced `true` ⇒ the no-column pin goes
red; the page-bar slot forced `null` ⇒ 4 selection pins go red; the
multi-window re-read forced back to one `$top = rows held` read ⇒ both
re-read pins go red.
- `tsc` for plugin-grid, plugin-list, app-shell and `tsconfig.e2e.json`;
`check:test-source-alias`, `check:platform-checklist --changed-from
origin/main`, `check:nul-bytes`, and the 48 other `dispatch-gates
--commands` lines, all exit 0; `overlap-check --branch=HEAD` clean
against main and #35634 / #35622.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6CZL84qjxXbtxcXE8rW
<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6Cb8qTxAVaE2QKwquQU -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7088465 commit d96c878
38 files changed
Lines changed: 2037 additions & 141 deletions
File tree
- .changeset
- docs/qa/platform-checklist/areas
- ui
- e2e
- live
- packages
- app-shell/src/views
- components/src/renderers/complex
- i18n/src/locales
- plugin-grid/src
- __tests__
- components
- plugin-list/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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
| 618 | + | |
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
| 652 | + | |
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
680 | | - | |
| 680 | + | |
681 | 681 | | |
682 | | - | |
| 682 | + | |
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
809 | 815 | | |
810 | 816 | | |
811 | 817 | | |
| |||
3747 | 3753 | | |
3748 | 3754 | | |
3749 | 3755 | | |
3750 | | - | |
| 3756 | + | |
3751 | 3757 | | |
3752 | 3758 | | |
3753 | 3759 | | |
| |||
3765 | 3771 | | |
3766 | 3772 | | |
3767 | 3773 | | |
3768 | | - | |
3769 | | - | |
3770 | | - | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
3771 | 3777 | | |
3772 | 3778 | | |
3773 | 3779 | | |
| |||
3776 | 3782 | | |
3777 | 3783 | | |
3778 | 3784 | | |
3779 | | - | |
| 3785 | + | |
3780 | 3786 | | |
3781 | | - | |
| 3787 | + | |
3782 | 3788 | | |
3783 | 3789 | | |
3784 | 3790 | | |
| |||
3884 | 3890 | | |
3885 | 3891 | | |
3886 | 3892 | | |
| 3893 | + | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
| 3897 | + | |
| 3898 | + | |
3887 | 3899 | | |
3888 | 3900 | | |
3889 | 3901 | | |
| |||
6404 | 6416 | | |
6405 | 6417 | | |
6406 | 6418 | | |
6407 | | - | |
| 6419 | + | |
6408 | 6420 | | |
6409 | 6421 | | |
6410 | 6422 | | |
| |||
6437 | 6449 | | |
6438 | 6450 | | |
6439 | 6451 | | |
6440 | | - | |
| 6452 | + | |
6441 | 6453 | | |
6442 | 6454 | | |
6443 | 6455 | | |
| |||
6511 | 6523 | | |
6512 | 6524 | | |
6513 | 6525 | | |
| 6526 | + | |
| 6527 | + | |
| 6528 | + | |
| 6529 | + | |
| 6530 | + | |
| 6531 | + | |
6514 | 6532 | | |
6515 | 6533 | | |
6516 | 6534 | | |
| |||
0 commit comments