Allow to use Popup
as a generic Popover
(do not hard-code orientation)
#11299
Labels
Popup
as a generic Popover
(do not hard-code orientation)
#11299
Problem
We would like to use the
Popup
component in inverse orientation for LSP-RetroLab integration, see jupyter-lsp/jupyterlab-lsp#690. Linking @jtpio's graphic:this is due to different placement in RetroLab (in JupyterLab the indicator is in statusbar and it makes sense for the popup to show above, but in RetroLab it is in the toolbar area and it does not fit if it is opening above).
Currently the placement is hardcoded by
privilege: 'forceAbove'
in:jupyterlab/packages/statusbar/src/components/hover.tsx
Lines 144 to 164 in d48e0c0
Proposed Solution
The
Popup
should either:above
as default, but not be forced to display above if it does not fit, orbelow
, orPopup
suggest that it should go up, it could instead inherit from a newPopover
which would not have placement restriction.Which one of a/b/c would you recommend?
Additional context
Analogous
Popover
component of other frameworks usually allows for any placement:The text was updated successfully, but these errors were encountered: