Persist audiobooks list/grid view mode per grouping#590
Conversation
|
@kevinheneveld Hey there! I appreciate the PR's however I do want to let you know that we're focusing on some foundational changes first and you'll need to rebase your PRs after those are merged, so you may not want to open too many at this time. |
|
Got it, sorry — opened #591 (a bug fix for automatic search matching music albums) before I saw this note. Happy to wait. I'll convert these to draft so they're out of your review queue until the foundational changes land, and I'll rebase them then. No rush from my end. |
a0b2fc2 to
9ca9299
Compare
|
Quick update — all five of my open PRs (#580, #585, #589, #590, #591) have been rebased onto canary (v0.4.1). #585, #589, #590, #591 are still drafted per your earlier note; #580 is the nzbget auth fix and is ready when you have time. Whenever the foundation phase feels open enough for the feature PRs again, happy to undraft any/all of them. No urgency. |
The audiobooks toolbar exposes a list/grid toggle, but the grouped view template only rendered a grid — toggling to list mode while grouped by author or series was silently ignored. The list template only existed inside the `groupBy === 'books'` branch. This adds a parallel list rendering for grouped collections: - Row per collection (cover thumb, name, book count) - Clicking a row navigates to the collection page (matches grid behavior) - Keyboard accessible (Enter / Space activate the row) CSS reuses the existing `.audiobooks-list` / `.audiobook-list-item` patterns; the row layout has its own three-column grid template (cover / name / count) since collection rows don't carry status badges or per-item actions. Tests added for both authors and series groupings in list mode. (cherry picked from commit 284cea4)
The view mode toggle's persistence was previously gated by scrollContainer being mounted, which only happens for groupBy === 'books'. So switching to list mode while grouped by author or series, then navigating away and back, would silently revert to grid. Switches to three localStorage keys (one per grouping: books, authors, series), reads the relevant key unconditionally on mount, and re-reads when groupBy changes — so each grouping can independently remember list vs grid. A one-time migration seeds all three keys from the legacy listenarr.viewMode value when first encountered, so existing users keep their preference. Persistence watch moved to top level so it's no longer gated by the scrollContainer guard. Closes #3 (cherry picked from commit a0b2fc2)
9ca9299 to
e9fd9f6
Compare
Summary
Implementation notes
Test plan
Closes kevinheneveld#3