fleet icon indicating copy to clipboard operation
fleet copied to clipboard

GitOps mode tooltip not centered on label (centers across label + input + helptext)

Open Brajim20 opened this issue 7 months ago • 3 comments

Fleet versions

  • Discovered: 4.85.0-rc
  • Reproduced: 4.84.0-rc

Web browser and operating system: Chrome on macOS


💥 Actual behavior

The GitOps-mode tooltip displayed by GitOpsModeTooltipWrapper is not centered on the field's label. Because the wrapper encloses the label, input field, and helptext as a single unit, the tooltip's anchor is calculated as the geometric center of all three elements — which results in the tooltip appearing somewhere between the input and the helptext rather than at the label, where users expect it.

Image Image Image Image Image

🛠️ To fix

Tooltip should point at the middle of the checkbox.

🧑‍💻 Steps to reproduce

These steps:

  • [x] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  • [ ] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
  1. Enable GitOps mode on the instance.
  2. Navigate to any settings page that uses GitOpsModeTooltipWrapper (e.g., Settings → Organization → SMTP).
  3. Hover over a disabled field's label.
  4. Observe that the tooltip is positioned at the center of the label + input + helptext cluster instead of being centered on the label.

🕯️ More info (optional)

TODO

Brajim20 avatar Apr 28 '26 19:04 Brajim20

@RachelElysia / @marko-lisica For this one, we can anchor the GitOps tooltip to the field's label/checkbox row (so the arrow always points at the label, regardless of help-text or tooltip length). But there's a side effect. The tooltip would trigger on hover of the full-width label/control row, but not on the input box or help-text line below it.

We could anchor the tooltip to the label/checkbox row. Arrow points exactly at the label, contained to GitOpsModeTooltipWrapper, and we wouldn't need any changes to the shared TooltipWrapper. Hovering the input box/help-text no longer shows a tooltip (top row still does, full-width).

Or, we could preserve hovering anywhere on the field (input + help-text included) while still pointing at the label. We'd need to live-measure the label and feed react-tooltip a position override, plus thread it through the shared TooltipWrapper. This would be pretty fragile (scroll/resize) and more code.

So, which way do we want to go here?

cdcme avatar Jun 18 '26 14:06 cdcme

Tested the remainder of the findings for this issue. RTR ✅

Brajim20 avatar Jun 27 '26 02:06 Brajim20

Tooltip finds its place, Guiding users with grace, Fleet's clarity case.

fleet-release avatar Jul 15 '26 18:07 fleet-release