Skip to content

Add dismissal description help popovers

Lorenz van Herwaarden requested to merge dismissal-description-popover into master

What does this MR do and why?

This MR shows the extended description of each dismissal reason, but only when hovering over the reason itself and subsequently hovering over the help icon.

In addition, this MR also solves a bug where on narrow screens the dismissal reason dropdown would overflow the parent.

The feature is behind a feature flag dismissal_reason.

Related:

Screenshots or screen recordings

hover-dismissal-description

dismissal-description

before after
Screenshot_2023-04-06_at_09.17.49 Screenshot_2023-04-06_at_10.10.08

How to set up and validate locally

Prerequisites

  1. You'll need an EE license
  2. You'll need to have runners enabled (See $2408961 for setting up a runner)
  3. Import https://gitlab.com/gitlab-examples/security/security-reports
  4. Run a pipeline on master

Validate tests

yarn jest ee/spec/frontend/vulnerabilities/vulnerability_state_dropdown_spec.js

Validate popovers

  1. Enable feature flag: echo "Feature.enable(:dismissal_reason)" | rails c
  2. Go to the details page of a vulnerability in the security-reports project
  3. Click on the status dropdown
  4. Open dismissal reason nested dropdown by hovering over dismiss state
  5. Hover over any dismissal reason
  6. Validate that help icon is shown
  7. Hover over the help icon and validate that the popover is shown with the title of the reason and the description.

Validate dismissal reason dropdown not overflowing

  1. Go to the details page of a vulnerability in the security-reports project
  2. Make browser narrow (something like 400px e.g.)
  3. Click on the status dropdown
  4. Open dismissal reason nested dropdown by hovering over dismiss state
  5. Validate that is opened to the bottom instead of to the right/left

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lorenz van Herwaarden

Merge request reports