Opening Settings unrolled its tabs in the window's sidebar and nothing
said they would fold again; only opening another page (the gateway)
put them away. The open page's row now carries a quiet disclosure
chevron, as a Mac sidebar's: turned to its list while the list shows
(down for the pages above, up for Settings, whose list opens above its
row), and clicking the row or the chevron again folds the list and
unfolds it, the page staying open on its tab. A list folded stays
folded, per page, until it is opened again (localStorage
magpie.navFolded). The same holds for Usage, Library and Plugins.
The chevron is muted, turns in 200ms on the strong ease-out, and
doesn't move under prefers-reduced-motion. aria-expanded says the
state; Enter on the focused row toggles it too.
The chevron and the fold live in navicons.js (navFoldRows, navFold),
imported with the first list; app.js keeps 123 bytes (navList shared
with navMine, the two rows' clicks asking navFold first), with the
budgets raised by that and the reason in core_budget_test.go.
Run (mote):
- nav-sub-fold.test.cjs (new), chromium + webkit, en zh zh-TW ja de:
red on the old code (12 of 12, "Settings' row shows a disclosure
chevron"), green 12 of 12 on this change.
- After rebasing on origin/main 38a90a34c: nav-sub-fold,
nav-sub-unroll and i18n-keys: pass 38, fail 0; TestCoreScriptBudget
ok; go vet ./..., GOOS=windows go vet ./..., GOOS=linux go vet
-tags nogui ./..., go build ./... ok; gofmt -l clean.
- 45 GUI files the change can reach (nav-*, sidebar/side-*,
settings-*, menu-scroll, click-scroll, i18n, gui-*, text-size,
plugin-panels, ...): all pass except menu-scroll's scrollable
dropdowns (#6532), nav-timeout (#5425) and settings-groups'
warm-ups and check-in (#6597), which fail the same 5 tests on clean
origin/main 38a90a34c (pass 8 fail 31 on both).
Not tried: the whole GUI suite (mote and mica were both loaded by other
sessions' suites), and the real app on Linux WebKitGTK and Windows.