GitOps mode tooltip not centered on label (centers across label + input + helptext)
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.
🛠️ 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.
- Enable GitOps mode on the instance.
- Navigate to any settings page that uses
GitOpsModeTooltipWrapper(e.g., Settings → Organization → SMTP). - Hover over a disabled field's label.
- 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
@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?
Tested the remainder of the findings for this issue. RTR ✅
Tooltip finds its place, Guiding users with grace, Fleet's clarity case.