Skip to main content

max / audiofiles

Take Tag's constructors instead of writing the struct out quasicoherent 436bc223 added Tag::hint, and these were two of the bare struct literals it had to visit. Tag::removable now covers the shape detail.rs wanted, and the toolbar chip was always expressible as Tag::chip().tone().latched().
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session
https://claude.ai/code/session_0136sbU8F6i9WrcvA3wn4Lgk
Author: Max Johnson <me@maxj.phd> · 2026-08-29 17:51 UTC
Signed with PGP, not checked
Commit: 3906a2fad3f3f0b2c6e3809758efb1b3d690b266
Parent: bb54a48
3 files changed, +29 insertions, -31 deletions
M Cargo.lock +16 -16
@@ -7556,22 +7556,6 @@
7556 7556 "winnow 1.0.4",
7557 7557 ]
7558 7558
7559 - [[patch.unused]]
7560 - name = "kberg"
7561 - version = "0.1.0"
7562 -
7563 - [[patch.unused]]
7564 - name = "ops-status"
7565 - version = "0.1.0"
7566 -
7567 - [[patch.unused]]
7568 - name = "painhours"
7569 - version = "0.1.0"
7570 -
7571 - [[patch.unused]]
7572 - name = "quasi-type"
7573 - version = "0.1.2"
7574 -
7575 7559 [[patch.unused]]
7576 7560 name = "quasi-axum"
7577 7561 version = "0.79.0"
@@ -7599,3 +7583,19 @@
7599 7583 [[patch.unused]]
7600 7584 name = "quasi-webview"
7601 7585 version = "0.79.0"
7586 +
7587 + [[patch.unused]]
7588 + name = "quasi-type"
7589 + version = "0.1.3"
7590 +
7591 + [[patch.unused]]
7592 + name = "kberg"
7593 + version = "0.1.0"
7594 +
7595 + [[patch.unused]]
7596 + name = "ops-status"
7597 + version = "0.1.0"
7598 +
7599 + [[patch.unused]]
7600 + name = "painhours"
7601 + version = "0.1.0"
@@ -331,13 +331,13 @@
331 331 body = body.with(Node::text("No tags"));
332 332 } else {
333 333 for tagged in &sample.tags {
334 - body = body.with(Node::Token(Tag {
335 - kind: quasi_router::layout::Token::Chip { removable: true },
336 - label: format!("{} ({})", tagged.name, tagged.source.as_str()),
337 - tone: tone_of(&tagged.source),
338 - latched: false,
339 - action: Some(Action::post(format!("/detail/tags/{}/remove", tagged.name))),
340 - }));
334 + body = body.with(Node::Token(
335 + Tag::removable(
336 + format!("{} ({})", tagged.name, tagged.source.as_str()),
337 + Action::post(format!("/detail/tags/{}/remove", tagged.name)),
338 + )
339 + .tone(tone_of(&tagged.source)),
340 + ));
341 341 }
342 342 }
343 343
@@ -568,20 +568,18 @@
568 568 /// reaching them is navigation rather than something the host arranges.
569 569 fn panels(bar: Slot, state: &Panels<'_>) -> Slot {
570 570 use quasi_router::Tag;
571 - use quasi_router::layout::Token;
572 571
573 572 let showing = state.bar.showing();
574 573 let mut bar = bar;
575 574
576 575 for panel in Panel::ALL {
577 576 let on = showing.contains(&panel);
578 - let mut chip = Tag {
579 - kind: Token::Chip { removable: false },
580 - label: panel.label().to_owned(),
581 - tone: if on { Tone::Info } else { Tone::Neutral },
582 - latched: on,
583 - action: Some(Action::post(format!("/panels/{}", panel.as_str()))),
584 - };
577 + let mut chip = Tag::chip(
578 + panel.label(),
579 + Action::post(format!("/panels/{}", panel.as_str())),
580 + )
581 + .tone(if on { Tone::Info } else { Tone::Neutral })
582 + .latched(on);
585 583 // How many filters are on, on the chip that toggles the filter panel.
586 584 // The shipped toggle takes an `Option<usize>` badge for this and nothing
587 585 // else does, so it is the one toggle carrying a count.