Skip to content

[Feature] Refactor pagination across multiple list pages to use URL query parameters instead of local state #1221

@bcExpt1123

Description

@bcExpt1123

Summary

Refactor pagination across multiple list pages to use URL query parameters instead of local state. This includes making pagination state (e.g., page number and optionally page size) part of the URL so that navigation (especially back/forward behavior) restores the correct list state automatically.

The affected routes include:

  • leaderboard/oss-contributions
  • leaderboard/discoveries
  • watchlist/miners
  • watchlist/repositories
  • watchlist/bounties
  • watchlist/prs
  • watchlist/issues
  • bounties
  • repositories
  • onboard/languages

The solution should be modular, reusable, and support multiple independent paginations on the same page without conflicts.

Motivation

Currently, pagination is managed via local component state, which causes poor user experience when navigating between list and detail pages. When users return to a list page (e.g., via browser back), they lose their previous pagination context and are reset to the default page.

By moving pagination state to URL query parameters:

  • Users can reliably return to the exact page they were viewing
  • Pagination becomes shareable via URL
  • Browser navigation (back/forward) behaves intuitively
  • Deep linking to specific pages is enabled

Additionally, a modular query-based pagination system ensures:

  • Reusability across different pages
  • Support for multiple paginated components on the same page without collisions
  • Flexibility to handle both dynamic and fixed page sizes
  • Automatic rendering of the correct page based on URL parameters on initial load

This improves both usability and maintainability of pagination across the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions