Skip to content

Fix image filter tooltip

Samantha Ming requested to merge fix-image-filter-tooltip into master

What does this MR do and why?

This fixes a bug where the image filter's tooltip isn't displaying. See this for why it's happening > #376341 (comment 1197650875)

There's a bug, the tooltip for each dropdown item in the image filter is not showing. This is because <filter-item> already sets v-gl-tooltip, so the v-gl-tooltip.left.viewport="image" in ImageFilter is not being used because the FilterItem one is replacing it. We will either need to wrap it in a div.

Screenshots or screen recordings

Screenshot_2022-12-06_at_12.09.06_PM

fix-image-tooltip

How to set up and validate locally

  1. Enable the FF echo "Feature.enable(:refactor_vulnerability_filters)" | rails c
  2. Security & Compliance > Vulnerability report > Operational vulnerabilities tab
  3. Hovering over an item in the image filter will display the tooltip
  4. Repeat the same steps with the FF off echo "Feature.disable(:refactor_vulnerability_filters)" | rails c

Alternatively, you can mock the date like this:

  1. Select the image div like this so you have access to it:

image

  1. And paste this into the console to replace the images data:
$vm0.images = ['some long image name 1', 'some long image name 2', 'some long image name 3 sooooooo looooonnnnnng very loooooonnnng']

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 Samantha Ming

Merge request reports