refactor: extract ViewModeToggle + query-param search #170

Merged
REDCODE merged 12 commits from feature/view-mode-toggle into develop 2026-08-20 15:10:36 +00:00
Collaborator

Part of #155 (area C), closes #163.

Summary

  • Extracted the masonry/grid toggle (duplicated in Albums, AlbumDetail, CosplayerDetail) into a shared ViewModeToggle component.
  • Replaced the hand-rolled ParseSearchQuery URL parsing (in Albums and Cosplayers) with [SupplyParameterFromQuery(Name = "search")].

Changes

  • New Components/Shared/ViewModeToggle.razor (ViewMode + ViewModeChanged + optional Class).
  • Albums.razor, AlbumDetail.razor, CosplayerDetail.razor — use ViewModeToggle; removed per-page SetMasonry/SetGrid + button markup.
  • Albums.razor, Cosplayers.razorsearchQuery is now a [SupplyParameterFromQuery] property; removed ParseSearchQuery and its navigationManager inject.

Testing

  • dotnet build MilkyShots.sln passes.
Part of #155 (area C), closes #163. ## Summary - Extracted the masonry/grid toggle (duplicated in `Albums`, `AlbumDetail`, `CosplayerDetail`) into a shared `ViewModeToggle` component. - Replaced the hand-rolled `ParseSearchQuery` URL parsing (in `Albums` and `Cosplayers`) with `[SupplyParameterFromQuery(Name = "search")]`. ## Changes - New `Components/Shared/ViewModeToggle.razor` (`ViewMode` + `ViewModeChanged` + optional `Class`). - `Albums.razor`, `AlbumDetail.razor`, `CosplayerDetail.razor` — use `ViewModeToggle`; removed per-page `SetMasonry`/`SetGrid` + button markup. - `Albums.razor`, `Cosplayers.razor` — `searchQuery` is now a `[SupplyParameterFromQuery]` property; removed `ParseSearchQuery` and its `navigationManager` inject. ## Testing - `dotnet build MilkyShots.sln` passes.
Ai_Agent added 4 commits 2026-08-17 19:56:23 +00:00
REDCODE added 1 commit 2026-08-18 14:44:59 +00:00
REDCODE marked the pull request as ready for review 2026-08-18 14:45:17 +00:00
REDCODE added 1 commit 2026-08-19 00:37:12 +00:00
REDCODE added 1 commit 2026-08-20 14:08:49 +00:00
REDCODE added 3 commits 2026-08-20 14:49:40 +00:00
REDCODE added 2 commits 2026-08-20 14:58:50 +00:00
REDCODE merged commit ffe37fec87 into develop 2026-08-20 15:10:36 +00:00
REDCODE deleted branch feature/view-mode-toggle 2026-08-20 15:10:37 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MilkyShots/MilkyShots#170