From 7efd263b6e9d11705ab75bc9394376b7d0f9af17 Mon Sep 17 00:00:00 2001 From: astar76 Date: Wed, 11 Nov 2026 23:21:48 -0600 Subject: [PATCH] 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 --- CLAUDE.md | 1 + Plans/04 UI redesign/S019-ui-settings.md | 12 +- Plans/INDEX.md | 2 +- .../fonts/MaterialSymbolsOutlined-Nacre.ttf | Bin 66844 -> 70052 bytes docs/DESIGN.md | 16 +- docs/PROGRESS.md | 16 + src/selftest.rs | 28 +- src/ui/icons.rs | 18 + src/ui/pages/customize.rs | 79 +- src/ui/pages/settings.rs | 1396 ++++++++++------- src/ui/widgets.rs | 372 ++++- tests/smoke/settings-write.txt | 32 + tests/smoke/settings.txt | 152 ++ tools/icons.txt | 9 + 14 files changed, 1473 insertions(+), 660 deletions(-) create mode 100644 tests/smoke/settings-write.txt create mode 100644 tests/smoke/settings.txt diff --git a/CLAUDE.md b/CLAUDE.md index c5edc1c..d663596 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,6 +69,7 @@ Never modify: `~/Documents/Apps/Nacre` (the original Python Nacre, reference onl | `nacre://gallery` + `SMOKE_SIZE=1400x2800 tools/smoke.sh tests/smoke/gallery.txt` | every design token and widget, dark and light (+ new tab and settings shots); read the PNGs | now (S015) | | `SMOKE_SIZE=1400x1200 tools/smoke.sh tests/smoke/newtab.txt` | new tab page dark/light, nothing playing and a video playing, weather failed state, tall/narrow/phone widths (offline); `tests/smoke/newtab-weather.txt` shoots the real weather card (needs internet); read the PNGs | now (S017) | | `SMOKE_SIZE=1400x900 tools/smoke.sh tests/smoke/backgrounds.txt` | every new tab background with the pointer, Customize panel dark/light, image + blur, GIF frames; `perf-*-a/b.json` `frames` (median/max draw ms, `drawn` count) per background at Lots/Fast, hidden tab, still, Motion off. Selftest `pointer x y`, `customize`; `@PAGESDIR@` = path of tests/smoke/pages | now (S018) | +| `tools/smoke.sh tests/smoke/settings.txt` (+ `SMOKE_SIZE=1280x1100`) | every settings section and sub-page dark and light, search results (`nacre://settings/?search=…`), narrow width; `settings-write.txt` (hidden, `SMOKE_SIZE=1280x1100`, fresh outdir) taps controls with selftest `tap x y`, then check `home/.config/nacre-servo/Default/settings.json` (expected values in its header) | now (S019) | | `python tools/icons.py` | rebuilds the icon font subset and `src/ui/icons.rs` from `tools/icons.txt` (needs fontTools and Arch's ttf-material-symbols-variable) | now (S015) | | appimagetool, wine + Inno Setup, VM "Windows 10" | packaging and Windows checks | see the user's global CLAUDE.md "Building" | diff --git a/Plans/04 UI redesign/S019-ui-settings.md b/Plans/04 UI redesign/S019-ui-settings.md index 9551742..0feda84 100644 --- a/Plans/04 UI redesign/S019-ui-settings.md +++ b/Plans/04 UI redesign/S019-ui-settings.md @@ -13,12 +13,12 @@ Redo every settings section in the new system: navigation rail, large rounded ca - `src/ui/pages/settings.rs` (whole) ## Steps -- [ ] Navigation rail/sidebar with section icons and the selected-pill indicator; search box -- [ ] Sections as cards of rows; consistent row anatomy (title, subtitle, control) -- [ ] Colour/theme section: seed source, palette swatches, custom colour, live preview using S015's scheme -- [ ] Partial and engine-limit settings keep their label/reason, styled consistently -- [ ] Every settings section screenshot light/dark; check by eye; check a sample of controls still writes settings (stores smoke script from S008) -- [ ] PROGRESS entry, INDEX line, commit `S019: …` and push +- [x] Navigation rail/sidebar with section icons and the selected-pill indicator; search box +- [x] Sections as cards of rows; consistent row anatomy (title, subtitle, control) +- [x] Colour/theme section: seed source, palette swatches, custom colour, live preview using S015's scheme +- [x] Partial and engine-limit settings keep their label/reason, styled consistently +- [x] Every settings section screenshot light/dark; check by eye; check a sample of controls still writes settings (stores smoke script from S008) +- [x] PROGRESS entry, INDEX line, commit `S019: …` and push ## End criteria - Stores smoke scripts green. diff --git a/Plans/INDEX.md b/Plans/INDEX.md index b105c87..0b7003c 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -29,6 +29,6 @@ Tracker: https://claude.ai/artifact/9AD7fPfwJ4ASFzVTJGKU4h - [x] [S016 — Chrome and menus redesign](04%20UI%20redesign/S016-ui-chrome.md) · Opus medium - [x] [S017 — New tab page: elements](04%20UI%20redesign/S017-ntp-elements.md) · Opus medium - [x] [S018 — New tab page: backgrounds and Customize](04%20UI%20redesign/S018-ntp-backgrounds.md) · Opus medium -- [ ] [S019 — Settings pages redesign](04%20UI%20redesign/S019-ui-settings.md) · Opus medium +- [x] [S019 — Settings pages redesign](04%20UI%20redesign/S019-ui-settings.md) · Opus medium - [ ] [S020 — Other pages and dialogs redesign](04%20UI%20redesign/S020-ui-pages.md) · Sonnet high - [ ] [S021 — Phase 4 review with the user](04%20UI%20redesign/S021-phase4-review.md) · Sonnet medium · 🧑 diff --git a/assets/fonts/MaterialSymbolsOutlined-Nacre.ttf b/assets/fonts/MaterialSymbolsOutlined-Nacre.ttf index 9310b320d3c2ec69f7a548239efa8358e3e83727..c808b6a75aa4e76dc6f0ab3dbf1844e9e3347cf9 100644 GIT binary patch delta 4860 zcmbQ!#j<2E%LFl@oF5Df3|byxjzJ7U4E_uZxhfMiF|fZ}&A^Z+ z!N9;^lAN1ZkWuvN6$1lv0s{lfv$V3rqAPQ@J!N3X^I>3M=t)m3E?{6_5MW@)`M|)y zz>%I)na0{}*2TcUxq^WqK_I;>u}DI!FOY#D?*;?IqEi{Ei7943#8Ma-7k|fs%pD92%n}9p#U%{P42%p6ITt|k1x2X^8EieR3=A9| z3=9nHAQ=Xx`}_RMZw1Hm+kE96F@9Tf}# zlOHe@P7Y=k;l9Mcz^K3oa)`p@B4$lVt49HkG9I0HboSBh$3l-~A1gmrd%X1V>c=}K zA7GK3e4N=#c*2V*FJ``&_hR9TwJ$cm*!E(_i*u8CSR}P)zufS0)5~2iFT8y4^3lsD zFTcN1e5LVf&1>`5g|BbF;dt-${@VK+AA~7~~Zg807ioIT;w_zRIi1Gs*SKY0F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Eyfg!Y zJeNER1B2X0c{#bCa@}&;vJd6NWiwB3Y#EXBHQhHc5C(<9IPBx9IYH%Ic{?*ab|F?<^0BF#xW#Fkbd3y;Ouo!ASz*~&*>7^K@5va+M=0uT|AlD^w4ueo#|YvsMdND^i=GwpZd!Qc#?Vc@jCGy<1^!%$^TLyT;QspykL{yGod@e8NxS3{6r>-x{Fzh z?G)!1ua~Hh_$ygoFL_ofOzNn#h4eHTW|>-1E}Qf5_lSB_UMSMF7wt-MnCpz?i{UX^dE_to3g z?`h;{{M0Phe696Zd%5;2oi)1ldKLO52Gb1djAV?KnlzjIG3_xA)HGje!DdloDQKl; zb;Fv?+Sa8`A9 zTy7`b4|#m>wDg?owb-ZEXP>Y5W|xAu%$wOuqj)#}Y?5Q&EZ==eVDsxa1+tq(ck3{2 Up1DVgbMwYyOw618PY1gJ08Z{IdH?_b diff --git a/docs/DESIGN.md b/docs/DESIGN.md index bdf41c8..afe9713 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -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=` 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`, diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 9b7a0c4..06e5715 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -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):
-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). diff --git a/src/selftest.rs b/src/selftest.rs index 7013c20..d0a24b0 100644 --- a/src/selftest.rs +++ b/src/selftest.rs @@ -19,6 +19,8 @@ //! js