Skip to main content

max / audiofiles

Make the sidebar's body the declaration rather than a wrapper in front of it `body` answered a Slot by calling a declared shape that answered a Slot, which is a supplier the conversion itself wrote and which the census counts. It is the declaration now and `shell` does the read where it does the splice, the same way `settings` reaches trash's section. The rule wave 15 settled for a Response wrapper reads the same from this end: a wrapper that changes nothing but where the read happens should not exist.
Author: Max Johnson <me@maxj.phd> · 2026-09-04 21:45 UTC
Signed with PGP, not checked
Commit: 830868967f4c32014f278773eb9bdafc865b73bf
Parent: 20c65a6
2 files changed, +11 insertions, -10 deletions
@@ -175,7 +175,7 @@
175 175 const LAST_VAULT: &str = "Create another vault first, audiofiles needs at least one.";
176 176
177 177 /// What the sidebar draws, read off the app.
178 - struct Sidebar {
178 + pub(super) struct Sidebar {
179 179 /// The vaults, in the order the library answers them.
180 180 vaults: Vec<Vault>,
181 181 /// Whether there is only one, which is what deadens every Delete.
@@ -274,7 +274,7 @@
274 274 }
275 275
276 276 /// What the sidebar draws, read off the app.
277 - fn read(state: &Panels<'_>) -> Sidebar {
277 + pub(super) fn read(state: &Panels<'_>) -> Sidebar {
278 278 let vaults = state.library.vaults();
279 279 let collections = state.library.collections();
280 280 let tags = state.library.tags();
@@ -370,14 +370,15 @@
370 370 rows
371 371 }
372 372
373 - /// The sidebar, as a region something else holds.
374 - pub fn body(state: &Panels<'_>) -> quasi_router::Slot {
375 - side(&read(state))
376 - }
377 -
378 373 declare! {
379 - /// The sidebar: vaults, collections, and the tags you can filter by.
380 - shape side(sidebar: &Sidebar) -> Slot;
374 + /// The sidebar, as a region something else holds.
375 + ///
376 + /// `pub(super)` and taking the read rather than the app, which is the rule
377 + /// wave 15 settled from the other end: a wrapper in front of a declared
378 + /// shape that answers the same type is a supplier the conversion itself
379 + /// wrote, and the census counts it. `shell` does the read where it does the
380 + /// splice.
381 + pub(super) shape body(sidebar: &Sidebar) -> Slot;
381 382
382 383 region SIDE as Sidebar {
383 384 extend vaults(sidebar);
@@ -344,7 +344,7 @@
344 344
345 345 screen sidebar_content "audiofiles" {
346 346 include super::toolbar::body(state);
347 - include super::library::body(state) when window.sidebar;
347 + include super::library::body(&super::library::read(state)) when window.sidebar;
348 348 include super::files::body(state);
349 349
350 350 for moving in window.moving.iter() {