Adds page URL params for packages list pagination
What does this MR do and why?
Adds page URL params for packages list pagination
- Uses
persisted_pagination
component (added in !127750 (merged)) to render pagination instead ofregistry-list
- Refactor
package_search
to usepersisted_search
- Emit sorting object from
persisted_search
- Hides pagination during delete mutation
- Adds tests
Reference MR: Adds page URL params for container image tags l... (!127958 - merged)
Screenshots or screen recordings
Before | After |
---|---|
Pagination is not persisted in the URL | Screen_Recording_2023-08-30_at_5.23.55_pm |
How to set up and validate locally
-
rails c
- Open the rails console -
p = Project.find(1)
- Find one of your GDK projects. Project id can be found on the project home page -
FactoryBot.create_list(:npm_package, 50, project: p, name: p.name)
- Creates 50 npm packages - Add this line if above fails during the creation
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
- Visit package registry for project/group. Make sure, search, sorting, & pagination works
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 #416929 (closed) Known issue #423516 (closed)
Edited by Rahul Chanila