DependencyTrack / DependencyTrack/frontend

Improve interaction between hierarchical project view and tag filtering

Open
#419 3 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Vue
Stars
171
Forks
250
Avg merge
11h 12m
Merged PRs (30d)
82

Description

### Current Behavior

When working with a nested project structure in which a project `a` has a child `b` with a tag `mytag`:
![tree](https://user-images.githubusercontent.com/237537/219424966-0869597e-f0d6-4db2-a289-6cfa47d6c20e.png)
clicking the `mytag` link from `b`'s project page:
![project page](https://user-images.githubusercontent.com/237537/219425207-7528911d-bbab-4750-94c8-ef04186549e9.png)
navigates to the project view and ends up showing an empty list:
![tag filtered project list](https://user-images.githubusercontent.com/237537/219426056-c4bbacd8-9537-45da-8025-ff9aad9bfdd0.png)
I found this to be surprising and it took me a while to realize what happened.

The reason this behavior is that the filtering for the tag is applied at the root level only in the hierarchical view. Manually switching back to flat project view will show all projects with the tag.

### Proposed Behavior

What I would have expected to happen for the hierarchical view would be for a pruned tree to be shown with all projects having the tag being visible regardless of their depth in the tree. This would also show parents of tagged projects without the tag themselves.

A simpler alternative or intermediary solution might be to default disable (or enforce) the show flat project view option for tag queries instead of default enabling it. This would be similar to how a search enforces the flat view right now.

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/frontend/issues) for whether this enhancement was already requested

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.