Adds keyset pagination to package assets table
What does this MR do and why?
- Uses
GlKeysetPagination
, that means page numbers cannot be displayed. - Disables pagination while loading
- Page size is set to 20.
- provides
prevText
andnextText
props with translatable strings.
Screenshots or screen recordings
Before | After (< 20 assets) | After (first page) | After (middle page) | After (last page) |
---|---|---|---|---|
How to set up and validate locally
- Use the following command
for i in {1..125}; do curl --header "PRIVATE-TOKEN: <TOKEN>" --upload-file $PWD/<filename> "http://172.16.123.1:3000/api/v4/projects/<project-id>/packages/generic/<package-name>/<version>/<filename>$i"; done
to upload 125 package files.- Replace token, project-id, package-name, version, filename
- Visit package registry detail page via groups & projects package list page.
- Confirm the package assets with pagination is visible.
- Confirm page size is 20 & pagination works as expected.
- Confirm features delete assets, bulk deletion of assets work as expected.
- Confirm that if there are less than 20 package files, pagination is not displayed.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #353820 (closed)
Edited by Rahul Chanila