Skip to content

fix: create centralized Pagination component#10911

Closed
buenos-nachos wants to merge 92 commits into
mainfrom
mes/pagination-2.5
Closed

fix: create centralized Pagination component#10911
buenos-nachos wants to merge 92 commits into
mainfrom
mes/pagination-2.5

Conversation

@buenos-nachos
Copy link
Copy Markdown
Contributor

@buenos-nachos buenos-nachos 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

@buenos-nachos buenos-nachos self-assigned this Nov 27, 2023
@buenos-nachos buenos-nachos 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