Skip to content

Wildcard Tooltip: Consolidate with `Popover` logic

Created by: umpox

Description

As part of https://github.com/sourcegraph/sourcegraph/issues/32362 and https://github.com/sourcegraph/sourcegraph/issues/34847 we worked to implement an accessible and improved Tooltip to use in our codebase.

Through this PR: https://github.com/sourcegraph/sourcegraph/pull/35870 we introduced a solution that uses Radix. This works well and helps us meet our accessibility objectives but, as discussed with @vovakulikov, we could also leverage our Popover component and positioning to avoid duplicating code, and to ensure our bundle is as slim as possible.

Acceptance criteria

  1. Tooltip uses our Popover positioning logic and/or the Popover component instead of the Radix implementation.
  2. Our Tooltip is still fully accessible, following WCAG 2.1 guidelines.
  3. The API is still developer-friendly and easy to implement.