Add dismissal reason explanation tooltips to findings modal
Summary
When dismissing a finding in the vulnerability finding modal, a dismissal reason can be provided. Similar to the vulnerability details page, we want to show the description of each dismissal reason in a tooltip that appears when hovering that reason.
note: in the vulnerability details page this was done in a nested GlDropdown, while here it will need to be done in the GlCollapsibleListbox
Screenshots
Implementation plan
- add
dismissal_descriptions
entry to object returned indef js_pipeline_tabs_data
inapp/helpers/projects/pipeline_helper.rb
which returns the dismissal descriptions defined below in json format - add
def dismissal_descriptions
toapp/helpers/projects/pipeline_helper.rb
which returns the translated descriptions - update
ee/spec/helpers/ee/projects/pipeline_helper_spec.rb
accordingly
- parse dismissal_descriptions in
app/assets/javascripts/pipelines/pipeline_details_bundle.js
from dataset and pass as prop to route with path/security
- provide dismissal descriptions in
PipelineSecurityDashboard
- inject dismissal descriptions in dismissal reason listbox component
- use slot for listbox item to show item and HelpPopover (see
vulnerability_state_dropdown.vue
for similar implementation) - update specs accordingly
Verification steps
- Go to a pipeline security tab, like e.g.: https://gitlab.com/gitlab-examples/security/security-reports/-/pipelines/997014916/security
- Select the "More info" info icon of a non-dismissed finding
- Click Dismiss vulnerability in the modal
- Hover, click, or tab to the Help popover next to the Dismiss as label
- Validate it opens a popover with the descriptions of all dismissal reasons
Edited by Lorenz van Herwaarden