S013: lint, checks noted

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-25 01:05:59 -06:00
commit 5ae8fd90e7

View file

@ -46,7 +46,7 @@ Not done: a Content-Length smaller than the real body, on a server without range
## S013 — Controls, dialogs and toasts (2026-11-25)
Done: `crates/app/src/ui/{widgets/,field,menu,dialog,toast,gallery}`; `medlar --gallery` shows every control.
Verified: `nice cargo test -j 2 -p medlar --test widgets` green (23: hover, press, keyboard, focus return, popups inside the window); shots of every control seen in light or dark and at 480×360; hover or press seen on a sample (buttons, icon buttons, group, segments, chips, range, menu).
Verified: `nice cargo test -j 2 -p medlar --test widgets` green (23: hover, press, keyboard, focus return, popups inside the window); shots of every control seen in light or dark, hovered, and at 480×360; press seen on buttons, group, chips.
All take `(ui, &Theme, …)`; the theme is `app.theme.clone()`. The caller keeps every value.
- `widgets`: `Button::new(text)` / `Button::icon(icon, name)` `.with_icon .kind(Kind) .size(Size) .danger .enabled .busy .toggle(on) .tip .keys .width .show`; `group(name, [(icon, text)], &mut chosen)`, `segmented(…same…)`, `tabs(name, &[Tab], &mut chosen)`, `split(icon, text, more, open) -> (main, arrow)`, `Fab{icon,text,name,keys}`, `fab_menu(ctx, t, id, corner, (name, close), &mut open, items)`, `toolbar(ctx, t, id, bottom middle, open, add)`.
- `Choice::new(label)` `.enabled .busy .error .mixed` then `.switch/.checkbox(&mut on)` or `.radio(on)`; `Chip::new(text).icon .filter(on) .closable .error`; `Slider::new(name, range, step).show_value(&fn)`, `range(slider, &mut low, &mut high)`; `tip`, `waiting`, `spinner`, `ring`, `feel`, `line`.
@ -54,7 +54,7 @@ All take `(ui, &Theme, …)`; the theme is `app.theme.clone()`. The caller keeps
- `menu`: `Item::new(text, action) .icon .keys .checked .danger .enabled`, `Item::sub`, `Item::line`; `menu::below(ui, t, &response, || items)`, `menu::context(…)` give back the action. `menu::is_open`, `any_open`.
- `dialog`: `Dialog::new(id, title, main)` `.body .width(size::DIALOG_*) .enabled .busy`, `Dialog::confirm(…, danger)`; `.show(ctx, t, open, content) -> Option<Answer>` every frame, the caller sets `open`. `sheet(ctx, t, id, title, open, content) -> close?`. View shortcuts wait while `dialog::any_open` or `menu::any_open`.
- `toast`: `Toasts<A>` `.info .error .action .undo`, `.show(ctx, t, bottom) -> Option<A>`.
Not done: menus close without a fade; tooltips show on hover only, not on keyboard focus; screen readers untested. Gallery words are not in the catalogue (builders only).
Not done: menus close without a fade; tooltips show on hover only, not on keyboard focus; screen readers untested. Gallery words are not in the catalogue (builders only). Hidden release run of `--gallery`: 4 pages and a menu by real clicks, idle 5 s = 0.00 % CPU. The debug build opened no window in `tools/hidden.sh` (nested niri drops the connection, no panic; also without `--gallery`); the release build does. Cause not found.
## Later
-