Skip to content

Fleet UI: Some of many tooltip updates to react-tooltip 5.x#42830

Merged
RachelElysia merged 7 commits intomainfrom
38179-tooltip-updates
Apr 2, 2026
Merged

Fleet UI: Some of many tooltip updates to react-tooltip 5.x#42830
RachelElysia merged 7 commits intomainfrom
38179-tooltip-updates

Conversation

@RachelElysia
Copy link
Copy Markdown
Member

@RachelElysia RachelElysia commented Apr 1, 2026

Issue

Closes #38179

Description

  • Update a bunch of tooltips (~21 instances)
  • Was timeboxing to a 2 but really did about 1.5 days of this. Used Claude code to try to update 70 instances but it only caught like 30 >.< Then spent all the time updating the code correctly while testing.
  • A lot of tests needed updates because the 250ms delay needs a async await to see the tooltip
  • Removed 2 unused old components

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

@RachelElysia RachelElysia requested a review from a team as a code owner April 1, 2026 18:17
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@RachelElysia RachelElysia marked this pull request as draft April 1, 2026 18:17
import React from "react";
import { uniqueId } from "lodash";
import ReactTooltip from "react-tooltip";
import { PlacesType } from "react-tooltip-5";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

!isExistingPolicy || isAnyPlatformSelected
}
>
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

data-tip-disable={disableForm}
className="autofill-tooltip-wrapper"
>
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

// definitions for the selection row for some reason when we dont really need it.
import React from "react";
import { CellProps, Column } from "react-table";
import ReactTooltip from "react-tooltip";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

data-for="live-query-button"
// Tooltip shows when live queries are globally disabled
data-tip-disable={!isLiveQueryDisabled}
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

data-tip
data-for={tooltipId}
>
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image Image
  • tested


import Icon from "components/Icon";
import { COLORS } from "styles/var/colors";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

Note: Had to update styling to use gap instead of left margin because the left margin was making the tooltip slightly offcentered


import ReactTooltip from "react-tooltip";
import { COLORS } from "styles/var/colors";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

@RachelElysia RachelElysia Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated so the undetermined tooltips are 8px above the text, but the pills which have the dark ovals around them have tooltips that are 12 px above the text

@@ -1,53 +1,51 @@
import React from "react";
import { PlacesType } from "react-tooltip-5";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image Image
  • tested

Note: icon wasn't aligning vertically centered without CSS using the new tooltip on the host details page so I added a stylesheet for this component

import React from "react";
import ReactTooltip from "react-tooltip";
import { COLORS } from "styles/var/colors";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

This required a CSS change to ensure empty cell didn't italicize the tooltip

  • tested

backgroundColor={COLORS["tooltip-bg"]}
id="search-tooltip"
data-html
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image Image
  • tested

Note: Had to update strings to <br/> in better spots since TooltipWrapper has a max width larger than the previous ReactTooltip


import Spinner from "components/Spinner";
import { COLORS } from "styles/var/colors";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

id={tooltipId}
data-html
>
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested as I don't have a host with OS Settings in my dev environment
Please test thank you!

  • tested

Where to find this instance:

Image

import { DEFAULT_EMPTY_CELL_VALUE } from "utilities/constants";
import Icon from "components/Icon";
import NotSupported from "components/NotSupported";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

@RachelElysia RachelElysia Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

Note: text was higher than tooltip without CSS align-items: center;, also able to remove tooltip css

import ReactTooltip from "react-tooltip";
import { COLORS } from "styles/var/colors";
import Icon from "components/Icon";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer rendered in the UI as of 4.84 with the new ReportCard's card UI -- I don't know why the dev didn't remove this when updating the UI, so I'm going to keep it with an update.

>
{displayConfig.displayText}
</Button>
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

Note: Also updated this so the failed button looks similar to the update button when hovered (see screenshot)

</span>
<br />
<span
<TooltipWrapper
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image
  • tested

import TextCell from "components/TableContainer/DataTable/TextCell";
import { uniqueId } from "lodash";
import ReactTooltip from "react-tooltip";
import TooltipWrapper from "components/TooltipWrapper";
Copy link
Copy Markdown
Member Author

@RachelElysia RachelElysia Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't test this since I couldn't get VPP in my dev environment

Please test manually <3

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdcme - I was able to test this once I got unblocked attaching my VPP token (apparently I didn't know how to read a secondary nested menu as a menu)

  • tested
Screenshot 2026-04-02 at 11 57 23 AM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 Ok great,ty!

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 78.43137% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.80%. Comparing base (2af049d) to head (5942a7c).
⚠️ Report is 68 commits behind head on main.

Files with missing lines Patch % Lines
...ataTable/LiveQueryIssueCell/LiveQueryIssueCell.tsx 0.00% 4 Missing ⚠️
...ons/components/IntegrationForm/IntegrationForm.tsx 0.00% 2 Missing ⚠️
...mponents/SaveNewPolicyModal/SaveNewPolicyModal.tsx 33.33% 1 Missing and 1 partial ⚠️
...tables/VulnerabilitiesCell/VulnerabilitiesCell.tsx 85.71% 1 Missing ⚠️
.../hosts/details/HostDetailsPage/HostDetailsPage.tsx 0.00% 1 Missing ⚠️
...atesCard/UpdateSoftwareItem/UpdateSoftwareItem.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #42830   +/-   ##
=======================================
  Coverage   66.80%   66.80%           
=======================================
  Files        2537     2540    +3     
  Lines      203683   203707   +24     
  Branches     9254     9265   +11     
=======================================
+ Hits       136062   136085   +23     
- Misses      55297    55299    +2     
+ Partials    12324    12323    -1     
Flag Coverage Δ
frontend 54.78% <78.43%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RachelElysia RachelElysia marked this pull request as ready for review April 2, 2026 14:15
@RachelElysia RachelElysia merged commit 226df92 into main Apr 2, 2026
18 of 19 checks passed
@RachelElysia RachelElysia deleted the 38179-tooltip-updates branch April 2, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltip: Inconsistent styles

3 participants