Improve container registry image tags bulk-deletion to consider unselectable items

What does this MR do and why?

Improve registry-list component's bulk-deletion feature to consider unselectable items.

Applies feature to container image tags when user does not have permission to delete tags.

Similar to /dashboard/todos Select all behaviour,

  • hide Delete selected button unless Select all checkbox is selected
  • adds a selected item count text next to the Select all checkbox.

Remove unused props from registry-list component & its usages.

Changelog: changed

References

Screenshots or screen recordings

Guest Admin Developer
172.16.123.1_3000_kalcifer_registry-test_container_registry_42__1_ 172.16.123.1_3000_kalcifer_registry-test_container_registry_42__3_ 172.16.123.1_3000_kalcifer_registry-test_container_registry_42__5_

As a Developer user, when none of the tags can be deleted the list page will look similar to the Guest view:

Screenshot_2025-07-25_at_1.34.28_pm

Package registry

before after
Screenshot_2025-07-25_at_3.32.45_pm Screenshot_2025-07-25_at_3.30.46_pm

Package registry versions

before after
Screenshot_2025-07-25_at_3.32.35_pm Screenshot_2025-07-25_at_3.31.25_pm

How to set up and validate locally

  1. Set up the container registry in your GDK https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
  2. Enable metadata database
  3. Push a couple of images to the container registry of your choice; ensure the docker images have tags
$ docker login registry.test:5000
$ docker tag alpine:latest registry.test:5000/root/flight:tag1
$ docker push registry.test:5000/root/flight:tag1
$ docker tag alpine:latest registry.test:5000/root/flight:tag2
$ docker push registry.test:5000/root/flight:tag2
  1. Visit Project > Settings > Packages and registries, Expand Container registry section
  2. In Protected container image tags section, Create container registry tag immutable rule for tag1.
  3. Visit `Project > Deploy > Container registry, click the repository, confirm that immutable tag cannot be deleted & is not selected as part of bulk-delete.

This change affects package registry list page as well as package registry versions list tab in the package registry detail page.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #553945 (closed)

Edited by Rahul Chanila

Merge request reports

Loading