-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add client-side pagination #2327
Conversation
4cde12b
to
e78d06d
Compare
Add client-side pagination to all list pages via the `ListPageLayout` container. Update the `children` prop to expect a function so we can use the render props pattern to allow the `ListPageLayout` component to handle all of the pagination logic required. Consuming pages pass their raw resources to `ListPageLayout` and it passes back the correct slice for the current pagination settings which the consumer then formats / renders as needed. Although we're still loading and storing the full list of resources from the API this does have significant performance benefits in the client, especially with larger number of resources. Notably, this addresses freezing reported by a number of users on the PipelineRuns and TaskRuns pages with busy clusters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: briangleeson The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
#2324
Add client-side pagination to all list pages via the
ListPageLayout
container. Update the
children
prop to expect a function so we canuse the render props pattern to allow the
ListPageLayout
componentto handle all of the pagination logic required.
Consuming pages pass their raw resources to
ListPageLayout
and itpasses back the correct slice for the current pagination settings
which the consumer then formats / renders as needed.
Although we're still loading and storing the full list of resources
from the API this does have significant performance benefits in the
client, especially with larger number of resources. Notably, this
addresses freezing reported by a number of users on the PipelineRuns
and TaskRuns pages with busy clusters.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
See the contribution guide
for more details.