Skip to content

Always show project count for group dependency list

What does this MR do and why?

Related #467085

This MR changes the behavior of the project cell on the group dependency table. Instead of only showing the project count (and its dropdown) when there are multiple project and otherwise the project name which links to the project path, it will now always show the project count which will open the dropdown containing all projects when clicked.

There is an exception when the group limit is reached. In this case the the link shows a popover when clicked with information about the group limit, instead of the dropdown. Here as well, the text shows the amount of projects.

We're doing this because:

It's not possible to get both the project / location path and the counts in a performant manner, so we've decided to always show the counts even if there is only 1.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
1-before 1-after
2-before 2-after
3-before 3-after

How to set up and validate locally

  1. Create a new group
  2. Import https://gitlab.com/gitlab-examples/security/security-reports project in this new group
  3. Import https://gitlab.com/lorenzvanherwaarden/security-reports-with-few-dependencies/ project in this new group (same as project above but with less dependencies)
  4. Run a pipeline on both projects
  5. Go to http://gdk.test:3000/groups/<your-group-name>/-/dependencies
  6. Scroll through dependencies and check the Project column. It should contain rows with 2 projects and 1 project. For both, when you click a dropdown should appear with the list of the projects(s) where these dependencies appear.

If you want to test the edge-case where the group limit is reached, change belowGroupLimit at dependency_project_count.vue#L126 to false.

Edited by Lorenz van Herwaarden

Merge request reports