Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover component for floating content next to a target element #16481

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

izmy
Copy link
Contributor

@izmy izmy commented Jan 20, 2025

Description

Previously, the dropdown could render outside the viewport, particularly on smaller screens. So I created a new Popover component to keep content within the viewport. The component monitors whether the content is visible and dynamically adjusts its position when necessary. I used the @floating-ui/react library for this functionality, which is already used for tooltips.

I also refactored the Dropdown component, then separated the Menu file, and created an example in the storybook.

Related Issue

Resolve #12939

Screenshots:

image

image image

@izmy izmy requested review from tomasklim and TomasBoda January 20, 2025 16:50
@izmy izmy self-assigned this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown can render outside of viewport
1 participant