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 eebb893
Browse filesBrowse the repository at this point in the historyBrowse files
feat(list): a line between columns, 36px default rows and header, and 「+ Add calculation」 always shown in the footer (#36048) (#36069)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuDWLrm1NrVxDWXCHsUrtL24)_Fixes#36048
repo:objectstack#1 · os-sales · session_01L6bhgVphzAHrHnMrSMZGYb
Clause-②: no (no export, prop or key added; one existing i18n value
changes its wording)
Metadata-protocol: none
## 维护者速读
- 列表页(比如「客户」)的表格:列与列之间多了一条和横线一样浅的竖线;默认行高和表头从 32 变成
36;底部一行里没选统计的列一直显示浅色的「+ 添加统计」,不用鼠标移上去。
- 这是列表页重做专题的观感改进(对照 Attio 的第 5、7、8 条)。
- 只改样子,不动数据和统计的存储;包里带的视图和没有权限的人仍然看不到入口。撤回这个 PR 即恢复原样。
- 无。
## What changes
| Item | Where | Before → after |
|---|---|---|
| Column lines | `OBJECT_GRID_TABLE_DENSITY` in
`ui/packages/plugin-grid/src/ObjectGrid.tsx` | none → a 1px inset shadow
on the right edge (`inset-shadow-[-1px_0_0_0]` in `border/50`, the row
lines' colour and weight) on every header, body and footer cell but the
last one |
| Default row | `rowHeightCellClass`, `compact` arm, same file | `h-8`
(32px) → `h-9` (36px); `short`, `medium`, `tall`, `extra_tall` unchanged
|
| Header | `OBJECT_GRID_TABLE_DENSITY` | `[&_thead_th]:h-8` → `h-9`
(36px) |
| Footer entry | `SummaryCellPicker` in
`ui/packages/plugin-grid/src/objectGridSummaryPicker.tsx` | hint
`opacity-0` until hover/focus → always shown, faint
(`text-muted-foreground/70`), a `Plus` icon before it, darker on
hover/focus |
| Entry text | `grid.summary.calculate` in the 11 locale packs + the
plugin's English default in `useColumnSummary.ts` | 「计算」/ Calculate →
「添加统计」/ Add calculation (zh-Hant 新增統計, ja 集計を追加, ko 계산 추가, de Berechnung
hinzufügen, fr Ajouter un calcul, es Añadir cálculo, pt-BR Adicionar
cálculo, ru Добавить расчёт, ar إضافة حساب) |
- The row-height menu has three densities (Compact / Standard /
Spacious). A view with no `rowHeight` lands on Compact, which is the
card's "default", so Compact is the density that moves to 36. Standard
(44) and Spacious (56) are unchanged. The seat's claim records this
reading.
- The frozen column draws no divider at rest today (#35548: a scroll
shadow, none at rest). With this PR its edge is an ordinary column line
at rest and keeps the shadow on top of the line once the rows scroll
sideways under it.
- **Why a shadow, not a border (L1-b S1, 7062990450).** The first head
(`b5445c21`) drew the line as `border-r`. The table collapses its
borders, and a collapsed border belongs to the table, not the cell:
measured on 商机 at 900px wide, scrolled 120px sideways, the frozen
checkbox and name columns lost their lines (the scrolling columns' lines
did not paint over the frozen cells). An inset shadow is the cell's own,
so the sticky cells carry it with them, and Tailwind composes it with
`FROZEN_EDGE_SHADOW` in one `box-shadow` (both layers read back in the
browser while scrolled). It also takes no width, so the column widths do
not move.
- The footer row stays 32px, as the claim states.
- Who sees the entry is unchanged: the menu is wired only where the host
passes `onColumnSummaryPick` (a reader who may change the view; #35933
keeps it off views a read-only package ships). Without it an empty
footer cell still draws nothing.
- Every embedded `object-grid` follows the new default. Related-list
body tables use their own `BODY_TABLE_DENSITY` and are not touched; the
phone list draws cards.
## Tests
- `ui/e2e/list-frame-geometry-35548.spec.ts` (Playwright, compiled
Tailwind against the real class sources, with the app's `--color-border`
in the theme so both lines resolve to a real colour): header 36 and rows
36 (was 32 / 33), first row top still ≤ 168; new case: the header, body
(the leading checkbox cell included) and footer cells carry exactly one
inset shadow, `-1px 0px 0px 0px`, in the row line's computed colour, and
no right border; the last cell of each carries none. 8/8 pass.
- Ablation at `0a1f7470`: with the column-line entry deleted from
`OBJECT_GRID_TABLE_DENSITY` (`scripts/ablation-replace.mjs`, mutation
landed anchor 1 → 0), the new case goes red (`header: one column line`),
the other 7 pass; restored, blob equals HEAD and `git diff HEAD` empty.
- `rowHeightOffSpecBoundary.test.tsx`: the `compact` copy now carries
`h-9`; it still differs from `short` by its leading, so all five
densities keep their own copy.
- `footerCalculationPicker-35702.test.tsx`: the hint reads 「Add
calculation」 and carries no `opacity-0` at rest; a reader without
`onPick` sees no 「Add calculation」 in the footer.
## Acceptance notes
- In the browser the footer row measures 32.5px on a view that offers
the menu (the picker button's own `h-8` plus the row's line) and 32 on
one that does not; main measures the same, so this PR leaves it.
- Overlap: #36045 (in-cell editors), #36024 (phone list, same e2e file)
and #36054 also edit `ObjectGrid.tsx`; `overlap-check.mjs` reads all of
them as merging cleanly at this head. The seat's landing order puts this
PR after #36024 and #36045; this PR merges main and moves the pins then.
- #36045 pins its in-cell inputs at `h-8`; in the 36px row an edit
measured 36 on main + this PR (below). Re-measure after #36045 lands.
## Verification
Read first, by risk: (1) `OBJECT_GRID_TABLE_DENSITY` — it reaches every
cell of every `object-grid`; (2) the `compact` arm of
`rowHeightCellClass`; (3) `SummaryCellPicker`'s hint.
Two-minute check: open the 客户 list, add a personal view (switcher → 添加视图
→ 我的视图), and the footer shows 「+ 添加统计」 under every column with a line
between columns.
<details><summary>Browser readings (app-crm, 1440×900, zh-CN, light and
dark)</summary>
Booted `objectstack dev --ui --seed-admin` from this branch (readings
re-taken at `0a1f7470`) with the console built, then again with the
three source files and the locale packs at `origin/main` (`8145424b`)
for the "before" set. Measured with `getBoundingClientRect` /
`getComputedStyle` in Chromium.
| Reading | main | this PR |
|---|---|---|
| Header row height | 32 | 36 |
| Data row height (Compact, the default) | 32 | 36 |
| Standard, then back to Compact | — | 44, then 36 |
| Double-click 年营收 to edit (editor focused) | — | rows stay 36 |
| Column line (a body cell's right border) | 0px | 1px, same colour as
the row line (light and dark) |
| Footer, a personal view | 「计算」 on hover only | 「+ 添加统计」 in all four
columns; clicking one opens the calculation menu (合计 … 无) |
| Footer, the package's 所有记录 view | 「3 条记录」 only | 「3 条记录」 only (no
entry) |
| 商机 at 900×700, scrolled 120px sideways (frozen checkbox + name) | — |
at `b5445c21` (border): the frozen columns' lines gone; at `0a1f7470`
(inset shadow): both frozen lines stay, the name column's edge also
carries `FROZEN_EDGE_SHADOW`, nothing paints over the frozen cells
(light and dark) |
Screenshots (before / after, light and dark, package view and personal
view, the open footer menu, an edit in progress) are kept with the
card's evidence for the reviewer (`build-seat1/36048/`).
</details>
<details><summary>Local gates</summary>
- `pnpm --filter @object-ui/plugin-grid type-check`: pass.
- `vitest run packages/i18n/ + the two plugin-grid files above`: Test
Files 107 passed (107), Tests 1998 passed, 13 skipped.
- `playwright test e2e/list-frame-geometry-35548.spec.ts
--project=chromium` at `0a1f7470`: 8 passed.
- `overlap-check.mjs --branch=HEAD`: VERDICT clean (main and 6 PR
heads).
- NOT MEASURED locally: the full `packages/plugin-grid/` vitest run
(over the foreground limit here); CI's Test Core runs it.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgVphzAHrHnMrSMZGYb
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgVphzAHrHnMrSMZGYb)_
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgVphzAHrHnMrSMZGYb -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
feat(plugin-grid): a list draws a line between columns, its default rows and header are 36px tall, and the footer shows 「+ Add calculation」 at rest
7
+
8
+
Clause-②: no
9
+
Metadata-protocol: none
10
+
11
+
- A line of the same colour and weight as the row lines now runs between columns in the header, the rows and the footer row, with none after the last cell. The last frozen column keeps its scroll shadow on top of its line.
12
+
- The default row height (`compact`, the density a view without `rowHeight` gets, shown as Compact in the row-height menu) is 36px instead of 32px, and the header is 36px too. The Standard and Spacious densities are unchanged.
13
+
- In a list whose reader may change the view, every footer cell without a calculation shows a faint 「+ Add calculation」 at all times instead of only on hover. A reader who may not change the view still sees only the calculations already set. The `grid.summary.calculate` text changes in every language pack to match.
test('a line between columns in the header, the rows and the footer, the row lines\' colour and weight, none after the last cell (objectstack#36048)',async({ page })=>{
0 commit comments