Skip to content

Move image filter truncation and tooltip code from FilterItem to ImageFilter component

On the vulnerability report operation tab, there is an image filter:

ksnip_20221110-145838

The dropdown items need to be truncated with a tooltip that shows the entire name:

ksnip_20221110-150100

When this filter was created, the truncation/tooltip code was added to the common FilterItem component, which is used for the dropdown items across all the filters. However, only the image filter needs the truncation/tooltip, so rather than have it in FilterItem, we should move it directly inside ImageFilter instead.

Implementation Plan

  • Remove truncation/tooltip code from FilterItem.
  • Move truncation/tooltip code to ImageFilter.

Verification Steps

  • Go to a project's vulnerability report and click on the Operational vulnerabilities tab at the top.
  • Verify that for the Image filter dropdown, each dropdown item will show a tooltip to the left when hovered over.
Edited by Daniel Tian