S019: settings pages redesign: navigation rail with sliding pill and search, cards of rows that stack when narrow, search through every row, colour section with live scheme preview and scheme swatches, limit and unavailable rows, shared chips/slider/stepper, selftest tap

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-11 23:21:48 -06:00
commit c0bfe16595
2 changed files with 1466 additions and 653 deletions

View file

@ -207,7 +207,21 @@ Slow 1.8; stiffness ÷ factor²); `theme::animation_time` drives egui's own anim
- `card(ui, |ui| ...)`: `surface_container`, radius `L`; rows inside get hairlines between them (not above the first).
- `row(ui, title, description, |ui| control)`, `switch_row`, `link_row(ui, title, description) -> clicked` (whole
row is the button, chevron at the end), `section(ui, title)` (group title in `primary`, above a card).
- `text_field`, `number`, `page_column`, `glyph(toolbar key) -> icon`.
- `text_field`, `number` (stepper: − value +, fixed width so rows line up), `page_column`, `glyph(toolbar key) -> icon`.
- Rows (S019): `icon_row` / `icon_link_row` (leading icon), `wide_row` (control under the text, for chips and
lists), `limited_row` (partial engine support: a tertiary info line under the description), `unavailable_row`
(engine can't: reason + "Not available" label). A row remembers its control's width and moves the control under
the text when it doesn't fit beside 220 pt of text (`request_discard`, no flicker). `highlight_rows(ctx, query)`
tints and counts matching rows (settings search). `chip`, `choice_chips` (one of many), `toggle_chips` (any of),
`input_chip` (label + ×), `slider` (M3 Expressive, moved from Customize).
**Settings** (S019, `src/ui/pages/settings.rs`). Rail 264 pt (title, search pill, 48 pt entries, sliding
`secondary_container` pill); under 760 pt page width an 88 pt icon rail (56×32 pill, short label under) with the
search pill above the content. Content column 760 pt; header = Headline title, sub-pages get a back button and the
section name above. Search draws every section unseen (`UiBuilder::invisible`, own id salt) to count matching rows,
then shows only sections with matches, rows highlighted; `nacre://settings/?search=<words>` opens it. Appearance:
scheme preview (mini browser in the live roles + key colours), palette swatches built per preset with the current
mode/style/contrast (cached), custom colour = hex field + picker.
**Shapes** (`ui::paint`): `cookie(painter, center, radius, lobes, rotation, fill, stroke)`,
`cookie_image(painter, texture, center, radius, lobes, rotation)` (artwork in a cookie), `cookie_points`,

View file

@ -114,6 +114,22 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
- Not seen: place suggestions (network + typing; parse tested only), Upload dialog, slider drag, Escape; pointer
shots partly follow the user's real mouse in visible runs. Shortcut editing still lives in the old sub-page.
## S019 — Settings pages redesign (2026-11-12)
- Done: settings.rs rewritten: navigation rail with icons, sliding selected pill and search pill (icon rail under
760 pt); every section and sub-page as titled cards of rows; search covers every row (unseen pass), highlights
matches, empty state, `?search=` link. Appearance: live scheme preview, preset swatches as schemes, custom colour
picker + hex, style chips, contrast slider snapping to M3 levels. Limits: Freeze tabs, Save data, DNT = limited
rows; third-party cookies, Widevine = "Not available". New tab sub-page = Customize link + shortcut editor.
- Widgets (reusable): icon_row, icon_link_row, wide_row, limited_row, unavailable_row, highlight_rows, chip,
choice_chips, toggle_chips, input_chip, slider, stepper `number` (DESIGN.md "Widgets", "Settings"). Selftest `tap`.
- Shots: target/smoke/s019-v (visible, compact rail) and s019-w (hidden 1280×1100, wide rail): <section>-dark/light
for general appearance toolbar performance privacy adblock passwords downloads media about profiles search spell
keys import newtab permissions lists managers discord, search(-empty)-dark/light, narrow-dark/light.
- Verified: 51 unit tests (+stepper); settings.txt exit 0 visible and hidden; settings-write.txt (fresh home) wrote
startup Restore, privacy mode on, lock after 30, palette fallback #006A6A. S008's stores script doesn't exist yet.
- Not seen: page scrolled below the fold (no scroll command), hover/press in shots, colour picker popup, key capture;
backgrounds/chrome smoke not rerun after moving chip/slider out of customize.rs (same code, it compiles).
## Later
- Reader mode, split view, translate, real gamepad rumble (D-002: not planned for now).
- Packaging and first release (D-001: plan when the user asks).