Skip to content

feat: paginate starred questions pages#555

Merged
geoffrey-wu merged 1 commit into
qbreader:mainfrom
btfcookies:feat/paginate-starred-questions
Jul 12, 2026
Merged

feat: paginate starred questions pages#555
geoffrey-wu merged 1 commit into
qbreader:mainfrom
btfcookies:feat/paginate-starred-questions

Conversation

@btfcookies

Copy link
Copy Markdown
Contributor

Resolves #552

Summary

  • Add a shared renderPagination helper (client/scripts/utilities/pagination.js) that renders a Bootstrap pagination nav (first/prev/page numbers/next/last, windowed to avoid huge lists) and wires up click handling via a callback — mirrors the pagination UX already used on the DB search page.
  • Rework the starred tossups and starred bonuses pages to render 20 items per page instead of the full list at once, using the new helper. Card rendering, star/unstar listeners, and pagination controls are re-rendered per page change; clicking a new page scrolls back to the top of the list.
  • Add an empty-state message ("You have no starred tossups/bonuses.") when the list is empty.
  • Existing behavior is preserved: "Clear Starred" and the TXT/CSV/JSON downloads still operate on the entire starred list, not just the visible page.

Testing

I was not able to test this locally since only users with accounts can star questions.
npx semistandard passes on all changed or added files
npm run webpack builds cleanly

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@geoffrey-wu geoffrey-wu merged commit b0fa35f into qbreader:main Jul 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paginate starred question pages

2 participants