From 212dcef071c549863eb57645396f9c09dcc571ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Wed, 15 Jul 2026 10:55:14 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20add=20pagination=20and?= =?UTF-8?q?=20request=20audit=20plan=20-=20add=20pagination=20audit=20as?= =?UTF-8?q?=20Priority=202=20in=20frontend-next-steps=20-=20add=20paginati?= =?UTF-8?q?on=20and=20request=20rules=20to=20navigation-patterns.md=20-=20?= =?UTF-8?q?add=20server-side=20pagination=20note=20to=20README=20UI=20patt?= =?UTF-8?q?erns=20-=20renumber=20subsequent=20priorities=20in=20frontend-n?= =?UTF-8?q?ext-steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/frontend-next-steps.md | 34 +++++++++++++++++++++++++++++++++- docs/navigation-patterns.md | 7 +++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5f8ec4..812ce06 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ Dashboard and table summaries must use the same role scope as the related page. - Short create/edit/filter work uses `SidePanel`. - Destructive actions use confirm dialogs. - Data-heavy views use `DataToolbar`, `DataTableFrame`, `.data-table`, and `TableRowActions`. +- Large list pages should use server-side pagination/search/filtering when the backend supports it; client-side slicing is only acceptable for small or temporary datasets. - Date fields use the shared `DatePicker`; date-time flows pair it with an `HH:mm` input. - Closed disclosure sections should not mount or fetch hidden content. diff --git a/docs/frontend-next-steps.md b/docs/frontend-next-steps.md index 2f3638d..af35bf6 100644 --- a/docs/frontend-next-steps.md +++ b/docs/frontend-next-steps.md @@ -44,13 +44,43 @@ Audit checklist: ## Priority 2: README Update +## Priority 2: Pagination And Request Audit + +Audit list pages for pagination behavior and request shape. + +- Identify which pages use client-side pagination after fetching full lists. +- Identify which backend endpoints support server-side pagination, filtering, or search. +- Verify frontend requests use backend pagination where available. +- For pages that must stay client-side for now, document the reason and expected data size. +- Check that table pagination, search, filters, and sorting are consistent with the request model. +- Avoid claiming a page is paginated if it only slices already-fetched full data. + +Pages to check: + +- Courses list. +- Exams list. +- Admin users directory. +- Live monitor roster. +- Work log. +- Terms/settings lists if they grow beyond small configuration data. +- Detail sub-tables such as enrollments, results, attendance, sessions, and questions. + +Acceptance criteria: + +- Every list page is classified as server-paginated, client-paginated, or intentionally unpaginated. +- Request URLs and API helpers match the chosen pagination model. +- Large or growing datasets do not fetch all records unless explicitly accepted. +- UI pagination controls do not hide excessive network payloads. + +## Priority 3: README Update + - Update stack, scripts, and local setup notes. - Document role hierarchy and UI scope rules. - Document dashboard behavior and table action standards. - Link the active docs under `docs/`. - Keep build verification as `bun run build`. -## Priority 3: Docs Cleanup +## Priority 4: Docs Cleanup - Keep `docs/navigation-patterns.md` as the active interaction rulebook. - Keep `docs/ui-redesign-tokens.md` as the visual system reference. @@ -96,11 +126,13 @@ Audit checklist: - `/events/:id`: consider lazy-loading attendance if the route feels heavy. - Dashboard should avoid broad role-specific requests unless that role actually needs global scope. - Settings-dependent controls should share the cached settings request. +- Paginated tables should prefer server-side pagination when backend support exists. ## Acceptance Checklist - `bun run build` passes. - Role-based UI audit is complete for sidebar, routes, dashboard, and actions. +- Pagination and request audit is complete for list pages and large detail tables. - README is current with stack, scripts, roles, UI patterns, and docs links. - Docs reflect active rules and do not contradict current implementation. - No native `date` or `datetime-local` inputs remain where the shared `DatePicker` should be used. diff --git a/docs/navigation-patterns.md b/docs/navigation-patterns.md index 48c902d..44dc5fd 100644 --- a/docs/navigation-patterns.md +++ b/docs/navigation-patterns.md @@ -17,6 +17,13 @@ Role scope rules: Admin pages are action-oriented. Lists should use shared toolbar and table primitives, compact rows, sticky headers, fixed status/action columns, and pagination. +Pagination and request rules: + +- Do not treat client-side slicing as complete pagination for large datasets. +- If the backend endpoint supports pagination, filtering, search, or sorting, the API helper and page should use those request parameters. +- If a page intentionally fetches the full list and paginates in memory, document that the expected dataset is small or temporary. +- Search/filter/sort UI should match the request model: server-side controls for server-paginated lists, client-side controls only for accepted small lists. + Table action rules: - Row actions use `TableRowActions` with a centered three-dot trigger.