refactor: extract shared components (C) — action toolbar, infinite-scroll, picker, state helpers, search #193

Merged
REDCODE merged 9 commits from feature/shared-components-c into develop 2026-08-21 03:18:53 +00:00
Collaborator

Closes the Area C (shared components) children of #155: #158, #159, #160, #161, #162.

Worked incrementally, one component per commit, pausing for testing after each. All five components tested by the user.

Completed

#158 — Extract shared multi-select action toolbar (e24e6cc, 98c3fd5)

New ResponsiveActionBar + ActionButton (+ ResponsiveActionVariant enum) render a desktop inline group and a mobile dropdown from a single button definition, preserving EventCallback semantics. Migrated AlbumDetail, Albums, CosplayerDetail, Cosplayers. Jobs intentionally left out (different responsive pattern). Later unified the select-all toggle across Albums/Cosplayers.

#159 — Unify infinite-scroll pagination (291eb61, 104193a)

New InfiniteScrollController<T> wraps PageBuffer<T> + the load-state machine (ReloadAsync/LoadNextAsync/LoadPreviousAsync). Migrated Home (dropped its hand-rolled buffer), AlbumGrid, CosplayerGrid.

#160 — Decompose AlbumAssetPicker duplicate templates (fe8c1d5)

Extracted the ~147-line duplicated picker-layout (sidebar + main) into a RenderFragment PickerLayout; Embedded/Modal now differ only in wrapper, loading gate, and footer. Net −144 lines.

#161 — Extract selection/confirm/visibility state helpers (abe446d, 9ccdfe5)

New MultiSelect<T>, DeleteConfirmation, VisibilityApplyState; SelectionRange updated to work with MultiSelect. Adopted MultiSelect in AlbumDetail/Albums/Cosplayers/CosplayerDetail/AlbumAssetPicker (grids' SelectedIds widened to IReadOnlyCollection<Guid>); DeleteConfirmation+VisibilityApplyState in AlbumDetail/CosplayerDetail/AlbumAssetPicker.
Partial: Cosplayers/Albums keep their original delete/visibility wiring (cascade/merge state); FolderBrowser/BrokenAssetList/AdminUsers/Settings/User not yet migrated — noted as follow-up.

#162 — Consolidate search/dropdown + debounce (90026a6, a5d32d7)

New PersonSearchDropdown component (search input + dropdown + version-guard + blur-close) and a single Debounce helper. Migrated the duplicated person-search in AlbumForm + LinkToCosplayerModal to PersonSearchDropdown; replaced the Timer-based search debounces in AlbumAssetPicker + FolderBrowser with Debounce.

Verification

  • dotnet build MilkStream.Client — 0 warnings, 0 errors.
  • All five components manually tested.

Frontend-only ⇒ review by REDCODE.

Closes the Area C (shared components) children of #155: #158, #159, #160, #161, #162. > Worked incrementally, one component per commit, pausing for testing after each. All five components tested by the user. ## Completed ### ✅ #158 — Extract shared multi-select action toolbar (`e24e6cc`, `98c3fd5`) New `ResponsiveActionBar` + `ActionButton` (+ `ResponsiveActionVariant` enum) render a desktop inline group and a mobile dropdown from a single button definition, preserving `EventCallback` semantics. Migrated `AlbumDetail`, `Albums`, `CosplayerDetail`, `Cosplayers`. `Jobs` intentionally left out (different responsive pattern). Later unified the select-all toggle across Albums/Cosplayers. ### ✅ #159 — Unify infinite-scroll pagination (`291eb61`, `104193a`) New `InfiniteScrollController<T>` wraps `PageBuffer<T>` + the load-state machine (`ReloadAsync`/`LoadNextAsync`/`LoadPreviousAsync`). Migrated `Home` (dropped its hand-rolled buffer), `AlbumGrid`, `CosplayerGrid`. ### ✅ #160 — Decompose AlbumAssetPicker duplicate templates (`fe8c1d5`) Extracted the ~147-line duplicated `picker-layout` (sidebar + main) into a `RenderFragment PickerLayout`; Embedded/Modal now differ only in wrapper, loading gate, and footer. Net −144 lines. ### ✅ #161 — Extract selection/confirm/visibility state helpers (`abe446d`, `9ccdfe5`) New `MultiSelect<T>`, `DeleteConfirmation`, `VisibilityApplyState`; `SelectionRange` updated to work with `MultiSelect`. Adopted `MultiSelect` in AlbumDetail/Albums/Cosplayers/CosplayerDetail/AlbumAssetPicker (grids' `SelectedIds` widened to `IReadOnlyCollection<Guid>`); `DeleteConfirmation`+`VisibilityApplyState` in AlbumDetail/CosplayerDetail/AlbumAssetPicker. **Partial**: Cosplayers/Albums keep their original delete/visibility wiring (cascade/merge state); FolderBrowser/BrokenAssetList/AdminUsers/Settings/User not yet migrated — noted as follow-up. ### ✅ #162 — Consolidate search/dropdown + debounce (`90026a6`, `a5d32d7`) New `PersonSearchDropdown` component (search input + dropdown + version-guard + blur-close) and a single `Debounce` helper. Migrated the duplicated person-search in `AlbumForm` + `LinkToCosplayerModal` to `PersonSearchDropdown`; replaced the Timer-based search debounces in `AlbumAssetPicker` + `FolderBrowser` with `Debounce`. ## Verification - `dotnet build MilkStream.Client` — 0 warnings, 0 errors. - All five components manually tested. Frontend-only ⇒ review by REDCODE.
Ai_Agent added 1 commit 2026-08-21 01:13:55 +00:00
REDCODE approved these changes 2026-08-21 01:20:55 +00:00
Ai_Agent added 2 commits 2026-08-21 01:25:32 +00:00
Ai_Agent added 1 commit 2026-08-21 01:46:00 +00:00
Ai_Agent added 2 commits 2026-08-21 02:08:15 +00:00
Ai_Agent added 1 commit 2026-08-21 02:15:37 +00:00
Ai_Agent added 2 commits 2026-08-21 02:24:04 +00:00
Ai_Agent marked the pull request as ready for review 2026-08-21 03:18:21 +00:00
Ai_Agent requested review from REDCODE 2026-08-21 03:18:25 +00:00
REDCODE merged commit 79fc81fabd into develop 2026-08-21 03:18:53 +00:00
REDCODE deleted branch feature/shared-components-c 2026-08-21 03:18:53 +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#193