refactor(slint): promote multi-select bulk bar to a shared primitive

Extract PlaylistView's inline bulk action bar into a shared
MultiSelectBar primitive driven by a [BulkAction] model (id / label /
danger / needs-selection) emitting action(id). PlaylistView now declares
its two actions (Select all, Remove) as data; the Favorites tracks tab
will reuse the same bar with its larger action set instead of copying
it. Same visual (count label + bordered/hover buttons, ADR-008).

cc
This commit is contained in:
vicrodh committed 2026-05-26 21:30:21 -06:00
1 parent 610c6c1f79
commit d531f60c9c
3 files changed
+97 -59

No files matched your search

+8
View File
@@ -27,6 +27,14 @@ export struct AlbumCardItem {
plain-year: string, // "1973" — bare year for the list-row YEAR column
}
// One button in the shared multi-select bulk bar (MultiSelectBar).
export struct BulkAction {
id: string, // emitted verbatim via MultiSelectBar.action(id)
label: string, // already-translated button label
danger: bool, // red-bordered destructive button (e.g. Remove)
needs-selection: bool, // dimmed + disabled while nothing is selected
}
export struct DiscoverSection {
title: string,
// Discover endpoint path this section maps to (e.g. "/discover/newReleases").