-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix Album context menu moves behind adjacent album entries #4
base: master
Are you sure you want to change the base?
Conversation
Hi, I attempted to replace the Dropdown component with a Popup containing a Menu, following the idea that Dropdown doesn’t natively support rendering the menu in a portal. Here’s what I tried:
However, despite these changes, I encountered issues. The main problem was a large white box surrounding the Remove menu item, which I couldn’t resolve. Additionally, aligning the Popup properly was tricky, and I couldn’t get the behavior I wanted. Sad for that. |
Description
This PR addresses the implementation of a context menu for the
Card
component, as discussed in Issue 1673. The new functionality allows users to interact with the card via a dropdown menu that appears upon hover, improving usability and accessibility.Changes Made
Added Context Menu Functionality:
ReactDOM.createPortal
to render the dropdown menu outside the card’s DOM hierarchy for better positioning.Dynamic Menu Positioning:
MutationObserver
andResizeObserver
for dynamic adjustments to the menu's position.Styling Adjustments:
Screenshots
Before Changes:
After Changes: