refactor(public): retire track-cardinal stack, fold Archive/Cuts cards into ReleaseGallery (P11 W3 §4)

This commit is contained in:
daniel-c-harvey
2026-06-16 11:31:02 -04:00
parent d98ead97c3
commit ef6d21b94e
32 changed files with 70 additions and 1353 deletions
@@ -19,7 +19,6 @@ public partial class AlbumsView : ComponentBase, IDisposable
[Inject] public required IReleaseDataService ReleaseData { get; set; }
[Inject] public required PersistentComponentState PersistentState { get; set; }
[Inject] public required NavigationManager Navigation { get; set; }
// The medium whose releases this grid shows. Defaults to Cut for the /cuts route; other media
// can reuse this component by passing a different value. Drives both the fetch filter and the
@@ -34,8 +33,8 @@ public partial class AlbumsView : ComponentBase, IDisposable
protected override async Task OnInitializedAsync()
{
// Bridge the prerendered fetch across the prerender -> WASM seam (see TracksView). Without
// this, the WASM pass re-fetches and replays the card entrance animations.
// Bridge the prerendered fetch across the prerender -> WASM seam (see MediumBrowseBase).
// Without this, the WASM pass re-fetches and replays the card entrance animations.
_persistingSubscription = PersistentState.RegisterOnPersisting(PersistAlbums);
if (PersistentState.TryTakeFromJson<List<ReleaseDto>>(PersistKey, out var restored) && restored is not null)
@@ -59,8 +58,9 @@ public partial class AlbumsView : ComponentBase, IDisposable
return Task.CompletedTask;
}
private void OpenAlbum(ReleaseDto album)
=> Navigation.NavigateTo(ReleaseRoutes.DetailHref(album));
// Cut cards show track count where the shared card otherwise shows the artist.
private static string TrackCountLabel(ReleaseDto album)
=> $"{album.TrackCount} {(album.TrackCount == 1 ? "track" : "tracks")}";
public void Dispose() => _persistingSubscription.Dispose();
}