Add snippet metadata panel, duplicate, and immediate-load preview (M4.5)

This commit is contained in:
2026-06-06 23:54:59 +03:00
parent 3e89d9a531
commit 80bedd2a8d
13 changed files with 785 additions and 51 deletions
@@ -252,6 +252,29 @@ Not features to add later — the baseline every surface is built on.
---
## 7. Revealed actions & destructive affordances
How row/list actions appear, and how dangerous ones signal themselves. (Pairs with the
iconography contract, [arch 09 §5](09-visual-design.md).)
- **Reveal-on-hover is a per-surface choice, not a default.** Hiding a control until hover
cuts clutter in a **dense, repeated** list the user inevitably traverses (the snippet-row
delete) — there, arrival is guaranteed, so discoverability isn't lost. But a **rare or
load-bearing** action must stay **always-visible**, or it becomes effectively unreachable
(NN/g #6 — recognition over recall; a feature you can't see you can't use). Decide per
surface; when in doubt, show it.
- **A hover-revealed control must also reveal on keyboard focus.** Gate visibility on
`:hover` **and** `:focus-within`/`:focus-visible`, never hover alone — otherwise the
action is mouse-only and invisible to keyboard users (WCAG 2.1.1). The snippet row reveals
its delete on `.item:hover` _and_ `.delete:focus-visible`.
- **Destructive controls signal danger on hover _and_ focus.** A delete/remove affordance
reddens to `--support-error` on both `:hover` and `:focus-visible` — not colour-by-mouse
only — so the warning reaches keyboard users at parity. Colour is a _reinforcement_ here,
never the sole signal: the control still carries its label/`aria-label` and the
consequential ones still route through a confirm dialog (§4).
---
## Do / Don't
**Do**