Cosplayers page: sorting, pagination, and infinite scroll #86

Closed
opened 2026-07-11 11:07:02 +00:00 by Ai_Agent · 0 comments
Collaborator

Objective

Convert the Cosplayers listing page from loading all records at once to infinite scroll with server-side pagination, and add search/sort controls.

Dependencies

  • Depends on #84 (pagination DTO sort parameters) — must be merged first
  • Supersedes #54 (Person list endpoint pagination) — will close it via PR

Current Problem

PersonController.GetAll loads ALL people into memory via PersonRepository.GetAllVisible() which calls .ToList() then filters client-side. No pagination, no search, no sorting.

Sort Options

Field Query param value SQL OrderBy
Name name p.Name
Created created p.CreatedAt
Album Count albums p.Albums.Count

Default: name ASC (alphabetical).

  • Text input filters cosplayers by name substring
  • Live filtering as user types

UI

  • Convert to infinite scroll (JS intersection observer, matching Albums page pattern)
  • Add search/sort toolbar (reusing SortFilterBar.razor from the Albums PR)

Backend Changes

  • IPersonRepository / PersonRepository — add SearchQuery method with sort/search/pagination, push access-level filtering to SQL where possible
  • PersonController.GetAll — accept PersonSearchParametersDto, return paginated results
  • PersonService.GetAllAsync — accept page, pageSize, search, sortBy, sortAsc

Closes

## Objective Convert the Cosplayers listing page from loading all records at once to infinite scroll with server-side pagination, and add search/sort controls. ## Dependencies - Depends on **#84** (pagination DTO sort parameters) — must be merged first - Supersedes **#54** (Person list endpoint pagination) — will close it via PR ## Current Problem `PersonController.GetAll` loads ALL people into memory via `PersonRepository.GetAllVisible()` which calls `.ToList()` then filters client-side. No pagination, no search, no sorting. ## Sort Options | Field | Query param value | SQL OrderBy | |---|---|---| | Name | `name` | `p.Name` | | Created | `created` | `p.CreatedAt` | | Album Count | `albums` | `p.Albums.Count` | Default: `name` ASC (alphabetical). ## Search - Text input filters cosplayers by name substring - Live filtering as user types ## UI - Convert to infinite scroll (JS intersection observer, matching Albums page pattern) - Add search/sort toolbar (reusing `SortFilterBar.razor` from the Albums PR) ## Backend Changes - `IPersonRepository` / `PersonRepository` — add `SearchQuery` method with sort/search/pagination, push access-level filtering to SQL where possible - `PersonController.GetAll` — accept `PersonSearchParametersDto`, return paginated results - `PersonService.GetAllAsync` — accept `page`, `pageSize`, `search`, `sortBy`, `sortAsc` ## Closes - Closes #54
Ai_Agent added the AI Gen label 2026-07-11 11:07:02 +00:00
REDCODE added the enhancement label 2026-07-11 11:07:52 +00:00
REDCODE added this to the v1.0 - Initial Release milestone 2026-07-11 11:08:02 +00:00
Ai_Agent added the area:backendarea:frontendpage:cosplayers labels 2026-07-12 17:44:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MilkyShots/MilkyShots#86