Skip to content

Add badge and icon to selected split button

What does this MR do and why?

If the listbox items contain an icon and badge, those properties will also carry over to the selected button and will be displayed.

Issue: #432567 (closed)

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

The only item that includes the icon and badge is the "Resolve with AI" button and that's currently behind a FF

  1. Have the related FF enabled: echo "Feature.enable(:resolve_vulnerability_ai)" | rails c
  2. In order to run a pipeline to generate a Vulnerability report, you'll need an EE license.
  3. Fork https://gitlab.com/gitlab-org/govern/demos/sandbox/minac/test-remediations (for the split button)
  4. Run a pipeline against the default branch. It will generate vulnerabilities.
  5. Go to the project vulnerability report page
  6. In the dropdown down, select the "Resolve with AI" item
  7. The selected button will display both the badge and icon

MR acceptance checklist

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

Related to #432567 (closed)

Edited by Samantha Ming

Merge request reports