components
All repositories: gitoria
4.6 KB
# F4 — MdEditor look: one focus ring, real icons, shared Icon componentBranch `f4-icons` (components, rebased on main 0d6863d = F3). Apps: `f4-icons` in tickets, notes, layouts (synced byte-verbatim from components f4-icons).## Done1. **Focus**: `md-editor article:focus, article:focus-visible, textarea:focus, textarea:focus-visible { outline: none }` (specificity 0,2,2 / 0,2,2 beats the theme's `:focus-visible` 0,1,0 and `textarea:focus` 0,1,1, no !important). The outer `md-editor:focus-within` ring is the only one.2. **`components/icons/icons.hl`** (+ README): `Icon { name = "link" }` -> `<icon-svg><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d=…></svg>`, stroke currentColor, `size` default 1.25em. Names: bold italic code link heading ul ol block undo redo file close (drawings of the old hand-written editor for link/ul/ol/code/block/undo/redo; bold/italic/heading/file/close new, same style). md-editor (11 toolbar buttons) and files-upload (the ✕ remove button, 2 places) import it. comments has no SVG/glyph icon to replace (its ♥ is a text glyph, left alone).3. Toolbar: every button = icon, `title` + `aria-label` with the shortcut, 44 px targets at 390 px, ONE scrolling row. The heading button shows the level the caret is in as a small number next to the icon (`data-level`, replaces the old `textContent = 'H2'`).4. Synced into tickets, notes, layouts; `icons/icons.hl icons/README.md` added to each `tools/sync-components.sh` FILES.## Dedupe finding: YES, Hybriel includes an imported module once per appEvidence (components demo server, served page `/__hl/` seed + module URLs):- `/md-editor` (importer of icons: md-editor only) and `/comments` (importers: md-editor AND files-upload, plus comments->md-editor): the seed has exactly ONE blueprint key `components/icons/icons.hl` in both; the module is ONE URL `/components/icons/icons.hl?v=…` (6831 bytes) with its `shapes` table once. The page fetches it once (gate check "the page fetches the icons module once").- What is NOT free: every `Icon` instance is serialised into the SSR seed (~0.4 KB: name, shape, size). Page size (components demo, raw / gzip): /md-editor 27011/4490 -> 49305/5957, /comments 61865/9202 -> 90653/10806. A thread with many readonly comment editors carries 11 icons each (their nav is hidden by CSS but still rendered) — watch that on a very long thread; a lazy toolbar for readonly would need a View-level `if` (hybriel#41 recreates DOM) and is F3/md-editor territory, not done.No Hybriel gap found, nothing to report to Anton/Arachne.## Gates (ports 8820-8849)- components: 497 passed, 0 failed (main with F3 = 492; +5 F4 checks). On OLD code (main before F3 + the new test file): 482 passed, **3 failed** (surface outline `solid/2px`, textarea `solid/2px`, toolbar buttons without svg) — the checks can fail.- tickets: browser 388 passed 0 failed (386 before + 2 new in-theme checks: focused surface and source textarea have no outline under tickets' theme, 10 icon buttons), events 52/0, check-theme 46 files 0 problems.- notes: browser 69/0 (same), check-theme 22 files 0 problems (+1 file: icons.hl).- layouts: check-theme 44 files 0 problems, browser 310/0 (same).- Note (honest): my first tickets runs were started with an unsplit `$E` in zsh, so the gate ran on its DEFAULT ports (8352/8353, Chrome 8620+) instead of my slot, for ~2 min (all failed on the clash "origin not registered"); nothing of those is left running. All reported runs use bash with exported env on 8820-8849.## Real-browser E2E (lisbeth Chrome, under the lock, one tab, about:blank tab reused and returned to about:blank)Script `s/e2e-look.mjs`: real mouse click into the editor, `Input.insertText`, source switch, real click into the textarea; measures computed outlines, svg buttons, button size, rows; screenshots. Tickets copy of the newest backup (dark theme; tickets has no light theme), components demo (`/comments`, light base look).Measured (390 and 1280): OLD tickets: focused surface `solid/2px` (double ring), source textarea `solid/2px`, 0 icon buttons. NEW: surface `none`, textarea `none`, frame `solid/2px`, 10/10 svg buttons, 44x44 at 390 px, one row, page not wider than 390.Screenshots (/media/STORAGE/claude-scratch/atlas/F4/s/shots/): tickets-old-{390,1280}-{focus-typed,source-focus}.png, tickets-new-…, light-comments-old-…, light-comments-new-… (and .json measurements). Seen: old = text buttons "B I <> Link H • List 1. List" cut off and an inner rectangle inside the ring; new = one rounded ring, icon row scrolling sideways at 390 px, clean in dark and light.## Commitscomponents: 96c9769 (Icon + toolbar + focus), ba96735 (README, gate checks). Apps: see `git log f4-icons` (sync-components + sync commit per app).
Branches
Latest commits
- 8d79ff79comments bubble hugs its content: a readonly md-editor surface gets no inline min-height (it beat the stylesheet's min-height 0); 'edited' is a quiet label beside the time, versions unframed; gate checksmre
- ef253fecreports/F4-icons.mdmre
- ba96735ficons: README, md-editor README note, gate checks for the single focus ring and toolbar iconsmre
- 96c97691icons: shared Icon component; md-editor toolbar and files-upload remove use it; no inner focus ring in md-editormre
- 0d6863d6reports/F3-mdvalue.mdmre
- d58ed98bMdEditor: an older text of the editor handed back is not an outside change (kept surface, written back); gate for itmre
- c2d0de59MdEditor: show a value that changes from outside (data-value observer), demo button and gatemre
- c4272fa3re-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
- 2e22618etests: cdp-blank/md-bg/md-keys-run Chrome range and base port from env (MDK_CHROME, MDK_PORT), defaults unchangedmre
- a5d2384bre-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
- 52902d23docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 022b943fdeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- d17f8543mission 012: re-vendor Hybriel master f9614007 (plugins), fixes comments push redraw; gate 480/0mre
- 5f95de05mission 012: re-vendor Hybriel ce6f2e0a (plugins), report: gate 478/2 on comments push redrawmre
- 3794c591mission 011: report, LOG, STATUS, md-keys-run widths, cdp-blank helpermre
- 77a93c16mission 011: gate hook for md-keys (480/0), flatten() runs one at a time (removeChild race), surface also built on first focus / pointer-down (background tab), md-bg test, README keysmre
- 3c906718mission 011: md-editor key tests (real keys) and fixes: nested p/ul flatten, bare br, link change, Ctrl+E, code block exit (WIP)mre
- 1442e583mission 010: report, LOG, STATUSmre
- 6f27ad31md-editor: phone toolbar row contained (inline-size) so it never widens a grid parentmre
- d702d76dmd-editor look: root class md-empty (a host .empty rule hit it), rows = surface height, one phone toolbar row with 44 px targets; comment form rows 3; gate 360/0mre