Adds count badge for package other versions tab
What does this MR do and why?
Adds count badge for package details other versions tab so that it is easy for users to know how many versions exist.
Screenshots or screen recordings
With 0 other versions
With other versions
How to set up and validate locally
- Follow instructions to publish new packages
- Publish more than 20 packages with same name & different versions, as mentioned in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-create-a-list-of-packages-artificially
-
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, 25, project: p, name: p.name)
- Creates 25 npm packages - Add this line if above fails during the creation of the files
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
-
- Visit package registry list page for groups & projects.
- Visit the package detail page
- Confirm the badge is visible on
Other versions
tab - When there are no other versions confirm the badge displays
0
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.
Related to #374295 (closed)
Edited by Rahul Chanila