hypothesis / hypothesis/frontend-shared

Remove overflow handling from Popover

Open
#2,016 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

For historical reasons, the `Popover` component sets `overflow-y-auto overflow-x-hidden` to the outermost element. These were required for the first use case of the Popover, the `Select` dropdown.

This has been okeyish until we have had the need to support adding an arrow to the popover, where we had to conditionally set those only for Popovers without arrow, and use `overflow-visible` for Popover with arrow (see https://github.com/hypothesis/frontend-shared/pull/2014 for details).

This presents a not so obvious difference in the Popover behavior when using an arrow vs not using it.

We should change this so that the Popover always sets `overflow-visible` (to overwrite the default styles of `[popover]`), and consumers override this behavior if needed, like in the case of the Select.

This has the risk of introducing a regression, so it would be good to test that the places where we are currently using Popover keep working as expected.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.