28 lines
1.7 KiB
Markdown
28 lines
1.7 KiB
Markdown
# Contract: Table + Server-Side Filters + Pagination
|
||
|
||
## Required Behavior
|
||
|
||
- Filters apply to the full query scope before pagination (not page-local filtering).
|
||
- Pagination state is controlled by URL query parameters.
|
||
- Changing a filter resets the page parameter to page `1`.
|
||
- UI shows a summary (`Showing X–Y of N`) and an explicit active page state in pagination controls.
|
||
- Canonical demo visual style uses a centered dot pager while preserving page semantics via URL parameters and accessible labels.
|
||
- Demo/base contract includes a `rows per page` control.
|
||
- Status badge columns should be centered when the column semantics are status-only values.
|
||
- Small modules (no internal scroll, no more than 2 actions) should place actions in the module header row.
|
||
- Shared table/filter controls should inherit the repository baseline component theme
|
||
(currently Vapor Soft / Vapor Night in the canonical demo/scaffold) rather than redefining
|
||
per-pattern primitives.
|
||
|
||
## Recommended Query Parameters
|
||
|
||
- `page` for single-list pages
|
||
- `per_page` when the page-size control is user-visible
|
||
- section-specific params (for example `active_page`, `chronology_page`) for multi-list pages
|
||
|
||
## Interaction Guardrails
|
||
|
||
- Same-page filter/pagination interactions should preserve user reading position (for example via module anchors such as `#table-filters` / `#table-list`).
|
||
- Table status badges should remain readable under the shared theme baseline (including tinted badge variants when a host project opts into a legacy or alternate visual preset).
|
||
- Dot pager interactions should remain keyboard accessible and expose page meaning via labels/`aria-current`, even if numbers are visually hidden.
|