Always show counts on the group dependency list

Why are we doing this work

We need to implement the frontend changes from this discussion.

Currently, the frontend will show the project or location path if the dependency exists on only one project or location. 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.

Screenshot_2024-06-11_at_4.52.17_PM

In this screenshot, setup.py should say 1 location and CS project with large SBOM should say 1 project.

This change does not need to be behind a feature flag.

Relevant links

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

Update DependencyProjectCount and DependenciesTable so that project and location counts are always shown and expandable regardless of how many items there are.

Verification steps

  1. Go to https://gitlab.com/groups/gitlab-org/govern/threat-insights-demos/verification-projects/verify-dependency-list-counts/-/dependencies
  2. Verify that in the Projects column it shows 1 project or 2 projects which opens a dropdown with all its projects when clicked.
  3. Verify that in the Location column it shows 1 location or 2 locations which opens a dropdown with all the locations when clicked.
Edited by Lorenz van Herwaarden