layouts
All repositories: gitoria
6.5 KB
# layouts mission 006 — tap sizes in the shared theme — DONE (not merged, not deployed, not pushed)Branch w6-tap-sizes (from 3d4f8e1). Commit: see `git log -1` of the branch (hash in the LOG line).## What changed- `theme/theme.hl`: new layout token `layoutTap = 2.75rem` (44 px). `button, .button` minWidth + minHeight = layoutTap (was minHeight 2.25rem); inputs/selects/textareasminHeight layoutTap + fontSize 1rem (16 px); checkbox/radio 1.25rem, their wrapping `label` is a flex row of layoutTap; `summary` min 44; links that ARE the item(`li > a:first-child`, `.links a`, `.row > a`, `.crumbs a`) are inline-flex 44; component rules: pagination + md-editor toolbar buttons min 44, file(s)-upload`label.choose` 44. Desktop denser ON PURPOSE: one `@media (min-width: 60rem)` block (buttons 2.25rem) + the shells' own desktop rules.- `theme/shell/*`: header icon buttons / user toggle / sidebar close 2.5rem → layoutTap (negative margins −.625rem keep the 24 px glyph flush with the column);brand `lineHeight` 44 (ellipsis kept); header search input 44 (desktop 2.25rem); main-menu / sidebar nav / user-menu items 44 (desktop header menu 2.25rem);list-first/three-pane list links and `a.back` 44.- Showcase (own code): accent-switcher swatches/reset 44; the `readme`/crumb paragraphs get class `links`; mail-demo crumb `a.back`.- docs/design-rules.md: section "Tap size".- Tests: `tests/taps-audit.mjs` (the in-page audit, shared), `tests/taps.mjs` (standalone: 22 pages × open states at 390, lists offenders),`tests/browser.mjs`: +33 checks "390 <page> <state>: N tap targets, none under 44 px, no field under 16 px, nothing wider than the screen" (9 pages × closed /sidebar / user menu / search open) and the server wait raised to 400 s (loaded machine); the old css-string check now includes `min-width:var(--layout-tap)`.## Numbers (390 px, real headless Chrome, DOM, 82 audits = 22 pages + their open states)Audit = every visible a[href], button, summary, select, textarea, input, [role=button|tab|menuitem], label.choose; checkbox/radio measured by the bigger of control/label;`pointer-events:none` skipped (the pagination "…" gap); links inside a sentence counted separately ("inline").| | old theme (3d4f8e1) | new ||---|---|---|| tap targets < 44 px (non-inline), all 82 audits | **1358** | **0** || of those on the 22 closed pages (list below) | 210 | 0 || inline-in-sentence links < 44 (exempt) | 72 | 16 || elements wider than 390 / scrollWidth ≠ 390 / inputs < 16 px | 0 / 0 / 0 | 0 / 0 / 0 |Per page, closed state (taps<44 / all targets): `/` 6/56→0, `/elements` 23/61→0, `/components` 4/50→0, `/shells` 4/43→0, `/docs` 16/52→0, month-view 7/43→0, date-picker 8/48→0,range-picker 7/45→0, pagination 11/48→0, md-editor 29/94→0, code-editor 5/41→0, file-upload 6/43→0, modal 7/47→0, comments 29/122→0, files-upload 6/43→0,content-first 12/24→0, content-first/movie 7/19→0, list-first 3/13→0, list-first/trip 3/13→0, three-pane 4/20→0, three-pane/m2 9/25→0, search/modal 4/41→0; scrollWidth 390 everywhere.Raw: /media/STORAGE/claude-scratch/atlas/L2/taps-before.txt, taps-after.txt (per page and per open state, with sizes: old header icons 40×40, brand 158×26.4, buttons 36, nav links 38.4).The 16 remaining inline ones: md-editor 2, comments 1, home 1 … links inside paragraphs (exempt, WCAG 2.5.8); counted, not hidden.Gates: old layouts gate **99/0** → new **132 passed, 0 failed** (99 + 33 new). New code against the OLD theme/components (3d4f8e1's theme/ + components/, new tests): **98 passed,34 failed** — all 33 new tap checks FAIL (e.g. "390 /elements: 61 tap targets, none under 44 px … menu-toggle 40×40, brand 26.4 …") + the stylesheet-string check. `node theme/check-theme.mjs .` 0 problems before and after(it scans app code for colours/borders/radii; it has no size check — the size check lives in the browser gate, because a size is only known from the DOM).## Overrides that become redundant (apps NOT edited; the re-copy is the next mission)gitoria `components/styles.hl` (all measured against the new theme):- 21–23 `html button, html .button { minHeight 2.75rem }` — redundant (theme: min 44). Note: gitoria's rule also keeps 44 on desktop; without it buttons are 2.25rem at ≥ 60rem (the theme's deliberate density) — delete unless gitoria wants 44 on desktop.- 24–27 `html application-header > button, html user-menu > button, html app-sidebar > button.sidebar-close { width/height 2.75rem }` — redundant for those three selectors; **`html ident-menu > button.ident-toggle` stays** (the app's own component) — the selector must remain in a trimmed rule.- 28–29 `html application-header > a.brand { lineHeight 2.75rem }` — redundant (theme has the same line-height).- 30–31 `html input, html select { minHeight 2.75rem }` — redundant. 32–34 `html input, select, textarea { fontSize 1rem }` — redundant.- 35–37 `html main-menu a, html user-menu > nav a, html user-menu > nav button { display flex; alignItems center; minHeight 2.75rem }` — redundant.- NOT redundant (app's own markup): 42, 56 (ident-toggle margin; should become −.625rem like the theme's user toggle), 66–68 ident-selector parts, 121, 130, 191, 196, 204, 222, 234–235, 243, 248, 262, 265 (own components/lists).tracker `components/styles.hl`: it carries **no** override of the theme's sizes — nothing becomes redundant. BUT the new theme's `minWidth: 2.75rem` on every `button` hits tracker's own small buttons at re-copy(they set width but not minWidth): `button.checkicon` 205 (2rem, minHeight 0 → becomes 44 wide, 32 high), `button.mv` 300 (2.4rem → 44), `button.chip` 294, `button.sortbtn` 282, `button.showall` 159 (padding .15rem → 44 high),`button.follow` 117, `ident-menu > button.ident-toggle` 58 (2.5rem, minHeight 0 → 44 × 40). The re-copy mission must set these to 44 deliberately (ident-toggle → 2.75rem) or give them `minWidth = '0'` + a reason.## What is left / caveats- Looked at no PNGs (cannot); layout checked through numbers: gate 1280 checks (header flush with the column to 1 px) still pass, no sideways scroll at 390.- `li > a:first-child` also makes a link at the start of a prose list item a 44 px inline-flex line (taller line) — accepted: a list item that starts with a link is a tap row. A link inside a sentence stays small.- `.row > a`, `.links a`, `.crumbs a` are opt-in classes; apps with other link rows must add one of them.- Desktop (≥ 60rem) buttons/menu links 2.25rem are deliberate; icon buttons stay 44 everywhere (header is 52 px).- No Hybriel gap hit. Ports used: 8760–8764 only; nothing of mine listens (ss checked).
Branches
Latest commits
- 02aa74aasync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre
- 268b1c87sync components.hybriel 6b0936a: the 'edited' foldable drops the theme's border and marginmre
- c51d039fsync components.hybriel 8d79ff7: bubble hugs its content, quiet 'edited' label; gate checksmre
- f4ad7eecsync components 9a: shared Icon (icons/icons.hl), md-editor toolbar icons + single focus ring (components f4-icons ba96735)mre
- db258c11sync-components: copy icons/icons.hl + README (F4); testsmre
- badc1879md-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
- 867a8375md-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
- 5d8d2c67tests: wait for hydration before real clicks after a navigation (H2)mre
- 99db79f0re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- 30353f60tests: e2e-md-showcase Chrome range from LAYOUTS_GATE_CHROME_MD, default unchangedmre
- 16a7878cre-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- 6af559e8docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 5599cf56deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- 0bcc6294Mission 011: e2e-197, brief, report, LOGmre
- 137303c5MainMenu marks the current page from the route (hybriel#197, server-rendered); current prop/item.current stay as fallback; tracker demo drops current; gate: SSR marker; docsmre
- 9325b403Re-vendor Hybriel to master 7f13a82f (hl:web batch 2: #190 #193 #197 #194 named regions); plugins whole, bin/hybriel static build (git-ignored)mre
- b31dc74dusage: calendar (theme 76f99f6-era ContentFirst, user menu, ☰ menu) and tracker (theme 76f99f6, modal + pagination current, own current marker until hybriel#197) rowsmre
- 8a3d5d40Mission 010: brief, report, LOG, STATUSmre
- a56abf1fSync components to components.hybriel 3794c59 (MdEditor real-key fixes); showcase real-key check on the md-editor pagemre
- 76f99f64E2E in lisbeth's Chrome for the menu's current page (mission 009): tests/e2e-menu-current.mjs, reportmre