Skip to content

2RP Resources: scroll the grid into view when changing pages #7

Description

@peteromallet

Context

On /2rp, the Resources (Forge) and Art sections now use an in-flow numbered pager (src/pages/Resources/ResourcePagination.tsx). When you click a page number, the grid above updates in place but the viewport does not move. If you're parked down at the pager, the page change happens above your eyeline, so it can read as "nothing happened."

The page buttons themselves work correctly on the first click — verified in-browser (clicking 2 → 1 → 17 each changed the page on a single click, ellipsis collapses correctly). This is purely a "make the change visible" enhancement, not a bug.

Proposal

On page change, smooth-scroll the top of the resource grid (or the section heading) back into view so the new page is immediately visible.

Scope

  • src/pages/Resources/index.tsx — the Forge/Resources grid + ResourcePagination
  • src/pages/Resources/ArtGallery/ArtGallerySection.tsx — the Art grid + ResourcePagination

Acceptance

  • Clicking any page number / prev / next scrolls the grid top into view (respecting prefers-reduced-motion).
  • No scroll jump when the pager is already above the fold.

Filed as a follow-up to the 2RP pagination/sort/filter work (in-flow numbered pagination, newest-first "All" sort, URL-param removal, and the click-eating fixed hover-pager fix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions