fix(booth): put the blur toggle on every item kind, and make it look like a control
The operator asked "no UI option to blur/unblur?" and was right twice over. MISSING ENTIRELY ON TWO OF THREE BRANCHES. booth.html renders docs, media and everything-else through separate <figure> blocks. The toggle went into the media branch only, so inline docs -- the branch that puts readable text straight on the page, the one that needs blur most -- had no control at all, and `other` files only got a caption row if they happened to carry a caption. This is the SECOND time this feature shipped having patched some branches and not others; the blurred class itself had the same gap one commit ago. So the toggle is now a single Jinja macro called from all three sites, which makes "patched two of three" impossible rather than merely unlikely, and test_every_item_kind_gets_exactly_one_blur_toggle counts toggles against figures across mixed kinds so a fourth branch cannot quietly skip it. INVISIBLE WHERE IT DID RENDER. v1 was a bare `◌` at 0.78rem in --muted with no border, no label and no hover affordance. It now reads `◌ blur` / `◉ blurred` with a border, matching the other per-item controls. A control nobody can find is a control that is not there. Docs get it in the doc bar beside ⤢ ⬇ ✕, with stopPropagation so submitting it does not collapse the <details> it lives inside. Verified live on all three kinds: 3 figures, 3 toggles, and the POST round trip blurs and un-blurs. 167 tests pass.
This commit is contained in:
@@ -52,7 +52,17 @@ booth blur <name> <file>... # hide from a glance
|
||||
booth unblur <name> <file>...
|
||||
```
|
||||
|
||||
Or the ◌ / ◉ toggle in each item's caption row on the booth page.
|
||||
Or the **`◌ blur` / `◉ blurred`** button on every item in the booth page —
|
||||
in the caption row for images, video, audio and plain files, and in the doc bar
|
||||
beside ⤢ ⬇ ✕ for inline docs.
|
||||
|
||||
⚠ The toggle is emitted by ONE Jinja macro (`blurtoggle`) called from all three
|
||||
item branches. booth.html renders docs, media and everything-else through
|
||||
separate `<figure>` blocks, and this feature was twice shipped having patched
|
||||
only some of them — first the blur class, then the toggle itself. Add a fourth
|
||||
branch and you must call the macro from it;
|
||||
`test_every_item_kind_gets_exactly_one_blur_toggle` counts toggles against
|
||||
figures across mixed kinds and will fail if you don't.
|
||||
|
||||
- **State** is `.blurred` in the booth dir — one booth-relative item path per
|
||||
line, the same filesystem-is-the-state idiom as `.pins` and `.forever`. An
|
||||
|
||||
Reference in New Issue
Block a user