Skip to content

fix: create centralized Pagination component #10911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 92 commits into from
Closed

Conversation

Parkreiner
Copy link
Member

@Parkreiner Parkreiner commented Nov 27, 2023

Changes made

  • Creates general-purpose PaginationWrapper component that:
    • Centralizes a lot of pagination view concerns that were split across several different components throughout the codebase
    • Adds the component to the Users and Audits tables
    • Is designed for easy interfacing with usePaginatedQuery
    • Handles auto-scrolling the user to the top of a table when the page changes (doing it in the least aggressive way possible, with tests in place to help verify that things run when they're supposed to)
    • Has updated logic for generating labels for the tops of each table (numbers are now always correct – workspaces table labels are still using the older system, though)
  • Updates the return type for usePaginatedQuery to make generating table labels easier
  • Updates the renderComponent test utility so that it can safely re-render without any risks of throwing out the previous render state

Notes

  • Messed up and didn't make this PR by stacking from feat: add usePaginatedQuery hook #10803; the PR looks bigger than it actually is. Will get things resolved before opening things up for review
  • A reminder: untangling the Workspaces table from its current implementation proved to be a little too much; had to defer switching that table over to a later sprint

@Parkreiner Parkreiner self-assigned this Nov 27, 2023
@Parkreiner Parkreiner closed this Nov 30, 2023
@Parkreiner Parkreiner deleted the mes/pagination-2.5 branch November 30, 2023 23:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant