Settings module: Session, Desktop and Panel tabs; the module manager moves in
CI / test (push) Failing after 15s
CI / test (push) Failing after 15s
- The settings popup gets a tab bar, split by where things live: Session (the switches), Desktop
(what is drawn on the desktop: the wallpaper list under a "Wallpaper" heading) and Panel (what
the module manager showed: modules in the panel to remove, modules to add, Browse...).
Left/Right or 1/2/3 switch tabs; it reopens on the tab it was left on. Modules can't be placed
on the desktop yet (every wasm module lives in the panel; the desktop card is built in), so
the Desktop tab has no module section until they can.
- The standalone module-manager module and its world are removed; the settings module imports
`modules`. Saved panels listing "module-manager" get the settings module in its place.
- DesktopShell::open_settings(SettingsTab) opens the settings module on a tab (loading it into the
panel if needed), for the panel menu and "System settings" entries; the wasm picker
("Modules..." in the panel menu) is open_settings(Panel).
- Tests: the native picker test drives the Panel tab, the wallpaper and switch tests go through
the tabs, an open_settings test; the wasm and host-wasm module tests use the settings module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgxf6exeYrDGcy4WW3
This commit is contained in:
20 files changed
+316
-917
No files matched your search
@@ -177,8 +177,8 @@ test "launcher module reads the host catalog, filters on typed keys and launches
|
||||
}
|
||||
|
||||
///|
|
||||
test "module manager lists host modules and asks to load, unload and browse" {
|
||||
let p = load_module("module-manager")
|
||||
test "the settings module's Panel tab lists host modules and asks to load, unload and browse" {
|
||||
let p = load_module("session-settings")
|
||||
assert_true(p.imports().contains("modules"))
|
||||
let av = Table::new()
|
||||
av.str("moon-disc")
|
||||
@@ -194,6 +194,7 @@ test "module manager lists host modules and asks to load, unload and browse" {
|
||||
li.end_row()
|
||||
publish(Instances, li)
|
||||
assert_true(p.on_event(false, PointerDown(1, 1)))
|
||||
assert_true(p.on_event(true, KeyDown("3"))) // the Panel tab
|
||||
match p.popup() {
|
||||
None => fail("popup should be open")
|
||||
Some(ps) => {
|
||||
@@ -202,10 +203,10 @@ test "module manager lists host modules and asks to load, unload and browse" {
|
||||
assert_true(ts.contains("Moon Phase (disc)"))
|
||||
}
|
||||
}
|
||||
// rows: header(24) loaded(28) header(24) available(28) browse(28)
|
||||
ignore(p.on_event(true, PointerDown(20, 4 + 24 + 3)))
|
||||
ignore(p.on_event(true, PointerDown(20, 4 + 24 + 28 + 24 + 3)))
|
||||
ignore(p.on_event(true, PointerDown(20, 4 + 24 + 28 + 24 + 28 + 3)))
|
||||
// Below the tab bar (40), rows of 28: heading, loaded, heading, available, browse.
|
||||
ignore(p.on_event(true, PointerDown(20, 40 + 28 + 3)))
|
||||
ignore(p.on_event(true, PointerDown(20, 40 + 3 * 28 + 3)))
|
||||
ignore(p.on_event(true, PointerDown(20, 40 + 4 * 28 + 3)))
|
||||
assert_eq(drain(), [UnloadInstance("w1"), LoadModule("/m/moon-disc.wasm"), Browse])
|
||||
p.unload()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user