Wildcard: [Experimental] Add wildcard popover (custom tether calc)
Created by: vovakulikov
Context
This PR is based on https://github.com/sourcegraph/sourcegraph/pull/29488 and implements a new Popover component with context-specific API and tether sub-module for floating panels position calculation (instead of using 3 party lib like floating-ui).
@floating-ui
Sidenote about Problems that I've got in the code insights drill down popover
- Determine available space and set this as a max-size max-height to popup element. Here we need to point out that
@floating-ui
has a special setting/plugin for it but this doesn't work really well if we need a floating panel with auto-placement and sizing at the same time. - Flipping isn't perfect as well. TLDR; with size, shift, flip plugins at least in code insights popovers this logic picks non-optimal sizes/sides of popover elements.
Todo
-
Add tether calculation sub-package (our own implementation of popover position logic) -
Re-create Popover component with new api and new tether package -
Write examples -
Write documentation and migration guide