Add common FilterDropdown component to vulnerability report
What does this MR do and why?
We are refactoring the filters on the vulnerability report. Each filter needs a label, a GlDropdown
with header text, and the same text format in the dropdown's button. Additionally, most of our filters show a plain and simple dropdown list, and only a few filters need special rendering.
@dpisek
pointed out in the reviews of the refactored filters that there's a lot of repeated code between them. This MR introduces a FilterDropdown
component that takes the common stuff mentioned above and puts them into one reusable component that all the filters can use. The severity filter has also been modified to use it.
How to set up and validate locally
- Enable the
refactor_vulnerability_filters
feature flag. - Go to any vulnerability report.
- Verify that the severity filter uses the
FilterDropdown
component:
- Verify that the severity filter works properly.
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 #383346 (closed)