1.9 KiB
1.9 KiB
BanGUI — Task List
This document breaks the entire BanGUI project into development stages, ordered so that each stage builds on the previous one. Every task is described in prose with enough detail for a developer to begin work. References point to the relevant documentation.
Reference: Docs/Refactoring.md for full analysis of each issue.
Open Issues
Worldmap list pagination (new)
-
Status: done
-
Goal: Add paging controls to the WorldMap companion bans table (map page) so it matches Dashboard ban-list behavior and supports country drilldown without rendering / scrolling huge result sets.
-
Implement in
frontend/src/pages/MapPage.tsxusing the dashboard pattern fromfrontend/src/components/BanTable.tsx:- Add local state:
page(start 1),pageSize(e.g., 100). - Derive
visibleBansfromuseMemo+selectedCountry, then computepageBansusingslice((page-1)*pageSize, page*pageSize). - Compute
totalPages = Math.max(1, Math.ceil(visibleBans.length / pageSize)),hasPrev,hasNext. - Render a footer row below Table with total, page, prev/next buttons (use icons
ChevronLeftRegular,ChevronRightRegular, or existing style). - Wire buttons to
setPage(page - 1)/setPage(page + 1), disabled by bounds. - Reset
pageto 1 whenevervisibleBansfilter changes: onrange,originFilter,selectedCountry, or when data refreshes.
- Add local state:
-
UX details:
- Keep existing “no bans found” row behavior.
- Keep summary info bar and total line consistent; show current slice counts in message as needed.
- Ensure paged data is used for
TableBodymapping.
-
Optional follow-ups:
- Allow page-size selector if needed (25/50/100), updating
totalPagesand reset to page 1 on change. - Add tests in
frontend/src/pages/__tests__/MapPage.test.tsxfor paging behavior (initial page, next/prev, filtering reset). - Add documentation in
Docs/Web-Design.mdif there is a worldmap data table UI guideline.
- Allow page-size selector if needed (25/50/100), updating