Fix registry-list deselecting items after select all
What does this MR do and why?
From comment, fixes these issues:
-
Once all the packages are selected it's impossible to deselect a couple. As soon as I deselect one, they all get deselected:
Expected to deselect a few that perhaps I didn't want to delete.
-
the lines between seem to double and that's why the divider looks thicker (compared to non-selected).
Screenshots or screen recordings
the lines between seem to double and that's why the divider looks thicker (compared to non-selected).
deselect images and add indeterminate state
How to set up and validate locally
- Publish few 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, 10, project: p, name: p.name)
- Creates 10 npm packages -
Add this line if above fails during the creation of files
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
-
- View projects package list page.
- Add fix to add highlighting when selected
- Replace line with
<list-item data-testid="package-row" :selected="selected" v-bind="$attrs">
- Replace line with
- Make sure above issues (double margin & deselecting after select all unselects all items) are fixed.
- Since this is a shared component, this can be tested on the container registry image tags page as well. Steps:
4. Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
- Add a few images with tags by following https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-add-images-with-tags-quickly-to-the-registry
- Visit the tags page where bulk deletion pattern exists & behaviour works the same way.
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)