Consistency audit (sizes, radii, spacing) #933

Open
opened 2026-11-04 14:00:30 +00:00 by kayg · 1 comment
Owner

kayg 11-04: "Do that consistency audit to see where things like text sizes, UI size, corner radius, etc. differ, and fix them if they should be consistent, and document it if we decided them to be different."

Method. A throwaway Playwright script (kept outside the repo) opened every mockup route (199 routes from the tests, README and review page, at 1440×900 and 390×844, light) and, on each app's routes, clicked every ⋯ / Share / Add / Insert / Style / Filter / Search trigger once. For every visible element it read the computed font size, weight and line height, control height, radius (and the container's radius and inset), padding, gap, border, shadow and blur, and icon size. Transforms are ignored (offsetWidth). 1 327 snapshots of the mockup at 14a017b3 (the review/calendar-2 tip when I started), and 54 of prod: origin/dev @ 6be86ba0 built, served by the e2e dev-user server (backend binary of 11-03). Related work not repeated: #911 (type scale), #892 (radius sweep, PageToolbar), #912 (prod primitives plan).

Result in one line. Radii and the type scale mostly hold (2 480 of 2 516 tints near a container edge are concentric). The real drift was in packages/ui (13.5 / 12.5 / 11.5 literals), five leftover raw sizes, three one-off layouts (Calendar sidebar group label, AI header height, task title), and wide variance in gaps, weights and field heights that no decision covers yet.

Mockup commits on review/calendar-2: 8e3dd868, de7ef933, a4061c78, c2aa894d, 3a39cfb1, 8e4fd04e. Docs: docs/design/consistency.md (PR below).

1. Text (mockup, desktop; phone adds 17 body and 34 large title)

Size found (px) Where (routes) Verdict
11, 12, 13, 14, 15, 17, 22, 28, 34 the scale (--fs-*, 17 = note body / phone row) on scale
13.5 bar "kind" label, Calendar Today/Week/Month capsule, list filter, toast, menus, bar toast (57 routes) fixed: packages/ui uses --text-ui (14)
12.5 bar count fixed: --text-label (12)
11.5 menu hints, quick-date tiles fixed: --text-label (12)
14.5 embed names, unavailable note embed (9 routes) fixed: --fs-ui
13 / 15 / 10 raw (calc(n * type-px)) embeds, note embeds, tables, blocks fixed: --fs-small, --fs-body, --fs-micro (no visual change except 10 → 11)
11 / 12 raw px Money Reports chart labels fixed: --fs-micro, --fs-caption
21 (browser default h2) Calendar sidebar "Your calendars", "Connected" (it was bigger than the sidebar title; see shot) fixed: group label, --fs-small / --fw-group like every other sidebar
30 an open task's title fixed: --fs-hero (28), the item-title size; the note title stays 30
10.5 quick-date row of the task menu documented (must fit a fifth of the menu)
30 / 23 / 19 / 21 note title, subtitle, heading, h4 (and a note shown as content) documented (note scale, ADR 0037)
9–10.9, 13.3, 13.7, 15.2, 17.5, 21.8, 42–47 avatar initials, rupee mark, PDF badge, key caps (scale with their container) documented
16 AI chat reading text, table cells on a phone, inputs documented; chat 16 vs body 15 is open for kayg
16 (TreeLines), html-mails standalone test page, other people's markup documented

Weights: 13 px text is drawn in 13 different weights (400 … 680), 14 px in 12. #911 left row-level weights for a follow-up; not touched here (follow-up: weights). Line heights: 1.4 dominates (≈80 %); others (1, 1.08–1.6) are chips, rows and headings, not audited one by one.

2. Controls (mockup, desktop heights; phone pills are all 44)

Role Heights found Verdict
Top-right toolbar (PageToolbar) 32 in 6 apps, 40 in AI fixed: AI header pills are 32 (shots)
Phone pills (back, ⋯, search, profile) 44 everywhere (1 000+ elements) consistent
.ib icon button 30 (pane tools), 36 (list / Money / note tools), 26 (note margin) documented (tools sit in rows of 28–34; no decision to merge them, open)
Pill inside a Toolbar 30 / 34 / 36 (Mail, AI, Calendar) follows its toolbar; documented
Fields 32 (list filter), 38, 40 (forms), 44 (field inside a 44 row) documented, no written decision; flagged
Rows sidebar 28, list 34–40, thumbs 65, phone 44 / 58 documented (Money 44 / 52 is a decision, the rest is content-driven)
Segmented / tabs 30 / 32 / 34 desktop, 44 phone documented
Switch 25 (md), 20 (sm) consistent
Icons in pills, toolbars, bars 20 desktop, 22 phone (≈ 5 000 icons) consistent; the dock tier 18 is documented
Icons outside that 24 on contact action tiles (62 px tiles), phone 21 / 21.6 on a few search and check buttons flagged; #930 is fixing the Mail pill, the rest left to that lane

3. Radii

The #892 sweep holds: pills --r-pill, tints --r-select 12, cards --r-card 14, sheets and panes 22, panels 26, chips 6, controls 8. 2 480 of 2 516 controls near a container edge are concentric; the 36 left are in one-off widgets (the review "Mockup" switcher, a few Money and Settings buttons), not touched. Nested cards (a card inside a 14 card with 8–12 px inset, e.g. Contacts groups, Money Ready card) keep 14 (current rule: only tints are concentric, cards are not). Documented; kayg to confirm.

4. Gaps, shadows, borders

What Found Verdict
Flex/grid gap 8, 10 (2 832), 2, 4, 6, 1, 12, 7, 14, 3, 18, 22, 5, 16, 9 (15 values) against the scale 4 / 8 / 12 / 16 / 24 / 32 not fixed: a gap sweep changes layouts everywhere; follow-up (a lane per app)
Glass blur 20 / sat 1.8 (float), 20 / 1.4 (panes), 18 (page, a user setting), 28 / 1.6 (paper, input, toolbar glass), 2 / 5 / 9 strips documented
Box shadows floats, frames, pages, key caps, thumbs: all from --shadow-* or one-off ring shadows documented
Borders 1 px (1 345), 2 px rings (231) consistent

5. Prod (origin/dev, 13 routes × 2 + interactions; little data, so rows and notes are thin)

Found in prod Covered by #912 PR
Off-scale text 11.5, 12.5, 13.5, 18, 21, 23 (Settings section title h2.sec), phone 16; no --fs-* scale PR 9 (type sizes)
Tint radii 8, 8.8, 9, 10, 11, 12 for rows, tiles, fields; frame 18 / 20 (mockup 22) PR 4 (tints and radii)
Pill / .ib icons 15, 16, 17 (mockup: one 20 / 22) PR 3 (icon / round buttons)
Heights: .ib 28, rows 32–34, fields 32, tabs 30 / 34 PR 3, 5, 6
Gaps 10 / 8 / 2 / 4 / 12 / 16 / 1 / 6 PR 10 (spacing)
Blur: frame 32, float 24 (mockup 20 / 28) PR 11 (glass)
Shadows PR 11
packages/ui literals fixed here reach prod when it takes the package (13.5 → 14, 12.5 → 12, 11.5 → 12) note on PR 9

Posted to #912 as a comment.

Left open (needs kayg)

  1. AI chat text: 16 or --fs-body 15?
  2. Field heights (32 / 38 / 40 / 44) and .ib 30 vs 36: merge or keep?
  3. Gap scale sweep and weights sweep: start them as lanes?
kayg 11-04: "Do that consistency audit to see where things like text sizes, UI size, corner radius, etc. differ, and fix them if they should be consistent, and document it if we decided them to be different." **Method.** A throwaway Playwright script (kept outside the repo) opened every mockup route (199 routes from the tests, README and review page, at 1440×900 and 390×844, light) and, on each app's routes, clicked every ⋯ / Share / Add / Insert / Style / Filter / Search trigger once. For every visible element it read the computed font size, weight and line height, control height, radius (and the container's radius and inset), padding, gap, border, shadow and blur, and icon size. Transforms are ignored (`offsetWidth`). 1 327 snapshots of the mockup at `14a017b3` (the `review/calendar-2` tip when I started), and 54 of prod: `origin/dev` @ `6be86ba0` built, served by the e2e dev-user server (backend binary of 11-03). Related work not repeated: #911 (type scale), #892 (radius sweep, PageToolbar), #912 (prod primitives plan). **Result in one line.** Radii and the type scale mostly hold (2 480 of 2 516 tints near a container edge are concentric). The real drift was in `packages/ui` (13.5 / 12.5 / 11.5 literals), five leftover raw sizes, three one-off layouts (Calendar sidebar group label, AI header height, task title), and wide variance in gaps, weights and field heights that no decision covers yet. Mockup commits on `review/calendar-2`: `8e3dd868`, `de7ef933`, `a4061c78`, `c2aa894d`, `3a39cfb1`, `8e4fd04e`. Docs: `docs/design/consistency.md` (PR below). ## 1. Text (mockup, desktop; phone adds 17 body and 34 large title) | Size found (px) | Where (routes) | Verdict | |---|---|---| | 11, 12, 13, 14, 15, 17, 22, 28, 34 | the scale (`--fs-*`, 17 = note body / phone row) | on scale | | 13.5 | bar "kind" label, Calendar Today/Week/Month capsule, list filter, toast, menus, bar toast (57 routes) | **fixed**: `packages/ui` uses `--text-ui` (14) | | 12.5 | bar count | **fixed**: `--text-label` (12) | | 11.5 | menu hints, quick-date tiles | **fixed**: `--text-label` (12) | | 14.5 | embed names, unavailable note embed (9 routes) | **fixed**: `--fs-ui` | | 13 / 15 / 10 raw (`calc(n * type-px)`) | embeds, note embeds, tables, blocks | **fixed**: `--fs-small`, `--fs-body`, `--fs-micro` (no visual change except 10 → 11) | | 11 / 12 raw px | Money Reports chart labels | **fixed**: `--fs-micro`, `--fs-caption` | | 21 (browser default h2) | Calendar sidebar "Your calendars", "Connected" (it was bigger than the sidebar title; see shot) | **fixed**: group label, `--fs-small` / `--fw-group` like every other sidebar | | 30 | an open task's title | **fixed**: `--fs-hero` (28), the item-title size; the note title stays 30 | | 10.5 | quick-date row of the task menu | documented (must fit a fifth of the menu) | | 30 / 23 / 19 / 21 | note title, subtitle, heading, h4 (and a note shown as content) | documented (note scale, ADR 0037) | | 9–10.9, 13.3, 13.7, 15.2, 17.5, 21.8, 42–47 | avatar initials, rupee mark, PDF badge, key caps (scale with their container) | documented | | 16 | AI chat reading text, table cells on a phone, inputs | documented; **chat 16 vs body 15 is open for kayg** | | 16 (TreeLines), html-mails | standalone test page, other people's markup | documented | Weights: 13 px text is drawn in 13 different weights (400 … 680), 14 px in 12. #911 left row-level weights for a follow-up; not touched here (**follow-up: weights**). Line heights: 1.4 dominates (≈80 %); others (1, 1.08–1.6) are chips, rows and headings, not audited one by one. ## 2. Controls (mockup, desktop heights; phone pills are all 44) | Role | Heights found | Verdict | |---|---|---| | Top-right toolbar (PageToolbar) | 32 in 6 apps, **40 in AI** | **fixed**: AI header pills are 32 (shots) | | Phone pills (back, ⋯, search, profile) | 44 everywhere (1 000+ elements) | consistent | | `.ib` icon button | 30 (pane tools), 36 (list / Money / note tools), 26 (note margin) | documented (tools sit in rows of 28–34; no decision to merge them, **open**) | | Pill inside a Toolbar | 30 / 34 / 36 (Mail, AI, Calendar) | follows its toolbar; documented | | Fields | 32 (list filter), 38, 40 (forms), 44 (field inside a 44 row) | documented, **no written decision**; flagged | | Rows | sidebar 28, list 34–40, thumbs 65, phone 44 / 58 | documented (Money 44 / 52 is a decision, the rest is content-driven) | | Segmented / tabs | 30 / 32 / 34 desktop, 44 phone | documented | | Switch | 25 (md), 20 (sm) | consistent | | Icons in pills, toolbars, bars | 20 desktop, 22 phone (≈ 5 000 icons) | consistent; the dock tier 18 is documented | | Icons outside that | 24 on contact action tiles (62 px tiles), phone 21 / 21.6 on a few search and check buttons | **flagged**; #930 is fixing the Mail pill, the rest left to that lane | ## 3. Radii The #892 sweep holds: pills `--r-pill`, tints `--r-select` 12, cards `--r-card` 14, sheets and panes 22, panels 26, chips 6, controls 8. 2 480 of 2 516 controls near a container edge are concentric; the 36 left are in one-off widgets (the review "Mockup" switcher, a few Money and Settings buttons), not touched. Nested cards (a card inside a 14 card with 8–12 px inset, e.g. Contacts groups, Money Ready card) keep 14 (current rule: only tints are concentric, cards are not). Documented; **kayg to confirm**. ## 4. Gaps, shadows, borders | What | Found | Verdict | |---|---|---| | Flex/grid gap | 8, 10 (2 832), 2, 4, 6, 1, 12, 7, 14, 3, 18, 22, 5, 16, 9 (15 values) against the scale 4 / 8 / 12 / 16 / 24 / 32 | **not fixed**: a gap sweep changes layouts everywhere; **follow-up** (a lane per app) | | Glass blur | 20 / sat 1.8 (float), 20 / 1.4 (panes), 18 (page, a user setting), 28 / 1.6 (paper, input, toolbar glass), 2 / 5 / 9 strips | documented | | Box shadows | floats, frames, pages, key caps, thumbs: all from `--shadow-*` or one-off ring shadows | documented | | Borders | 1 px (1 345), 2 px rings (231) | consistent | ## 5. Prod (`origin/dev`, 13 routes × 2 + interactions; little data, so rows and notes are thin) | Found in prod | Covered by #912 PR | |---|---| | Off-scale text 11.5, 12.5, 13.5, 18, 21, 23 (Settings section title `h2.sec`), phone 16; no `--fs-*` scale | PR 9 (type sizes) | | Tint radii 8, 8.8, 9, 10, 11, 12 for rows, tiles, fields; frame 18 / 20 (mockup 22) | PR 4 (tints and radii) | | Pill / `.ib` icons 15, 16, 17 (mockup: one 20 / 22) | PR 3 (icon / round buttons) | | Heights: `.ib` 28, rows 32–34, fields 32, tabs 30 / 34 | PR 3, 5, 6 | | Gaps 10 / 8 / 2 / 4 / 12 / 16 / 1 / 6 | PR 10 (spacing) | | Blur: frame 32, float 24 (mockup 20 / 28) | PR 11 (glass) | | Shadows | PR 11 | | `packages/ui` literals fixed here reach prod when it takes the package (13.5 → 14, 12.5 → 12, 11.5 → 12) | note on PR 9 | Posted to #912 as a comment. ## Left open (needs kayg) 1. AI chat text: 16 or `--fs-body` 15? 2. Field heights (32 / 38 / 40 / 44) and `.ib` 30 vs 36: merge or keep? 3. Gap scale sweep and weights sweep: start them as lanes?
Author
Owner

Before / after (mockup 14a017b3 → 8e4fd04e, Chromium, light)

Calendar sidebar group labels (1440)

before after

AI header: toolbar and pills 40 → 32 (1440)

before after

Task title 30 → 28 (1440)

before after

Task title (390)

before after

Embeds, note embeds (1440; 14.5 → 14, 13 and 10 on tokens)

before after
## Before / after (mockup `14a017b3` → `8e4fd04e`, Chromium, light) **Calendar sidebar group labels (1440)** | before | after | |---|---| | ![](https://git.kayg.org/attachments/91b9c09d-1c62-48b7-9b37-ac404e622868) | ![](https://git.kayg.org/attachments/8cf55e0b-d8db-475e-8a2a-a1b4b920a862) | **AI header: toolbar and pills 40 → 32 (1440)** | before | after | |---|---| | ![](https://git.kayg.org/attachments/21c27e1f-ed8a-40da-bed2-2724b82b4ad6) | ![](https://git.kayg.org/attachments/d6de40e0-bd50-4cbf-8f2f-00988be7aeee) | **Task title 30 → 28 (1440)** | before | after | |---|---| | ![](https://git.kayg.org/attachments/84ffab13-3cbb-4d7f-9e61-67e47ffd18f6) | ![](https://git.kayg.org/attachments/700031ea-1954-4ac7-88b0-daa99266c32f) | **Task title (390)** | before | after | |---|---| | ![](https://git.kayg.org/attachments/e40da1a6-dbe3-4bba-b724-e2ca413aa5cb) | ![](https://git.kayg.org/attachments/cc0c27c9-170a-4a24-85eb-d7195a5283dd) | **Embeds, note embeds (1440; 14.5 → 14, 13 and 10 on tokens)** | before | after | |---|---| | ![](https://git.kayg.org/attachments/ec04d8d6-fde1-403c-9279-b672130df4f0) | ![](https://git.kayg.org/attachments/b860dc1b-efd0-4f40-985d-893e79c7e9e6) |
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#933
No description provided.