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
- 42fefa4emodal: nest Style rules in the language's formmre
- 6fd953e3range-picker: nest Style rules in the language's formmre
- f661951ddate-picker: nest Style rules in the language's formmre
- 363577e6media-player: nest Style rules in the language's formmre
- 0b3fd8c9comments: nest Style rules in the language's formmre
- 67e043c8plugins/web/README.md from hybriel cb9e480dmre
- 519b56e9styles.hl: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- 29f63d01md-editor: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- 869f49c7files-upload: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- f60dab20month-view: Style in the language's form (nested like the View, one declaration per line, bare @media)mre
- 5b3c349aRe-vendor to Hybriel set day35 (cb9e480d): plugins core and web sources, README vendoring notemre
- 3449b117components: a startup error prints its message before exit 1 (hybriel#247)mre
- 59704ce1Merge branch 'n5b-pipes'mre
- 23b9164aMdEditor: a clipboard whose text is only the names or file:// paths of its files (a file manager copy) is about the files, as before; any other text wins (tickets#49); gate casesmre
- b0f1ec28MdEditor: a clipboard with text always pastes the text, also when a picture is on it too (a spreadsheet or office app), files on or off; a picture alone still goes to the files; real Ctrl+V gate tests/md-paste-files.mjs (tickets#49)mre
- ad4e929bMdEditor: pipe rows without a delimiter row are a table (first row = header, short rows padded, written back without an invented | --- | line) (notes#5)mre
- 4bd11128MdEditor: the Table button's empty table is written as a real pipe table (empty cells), so it survives the source switch, a save and a reload (notes#7)mre
- 7437e32bMdEditor draws its surface at once when claimed from server HTML: 1 ms mount animation, the first editor mounts all editors of the pagemre
- 5de0264cRe-vendor onto Hybriel master acaceaf3 (set-day27b): binary, lib and plugins; exit 1 on a startup fault; .gitignore binmre
- 79c77e7dMerge sb3-standby: components deploys through its standbymre