Refactor card details dropdown to use DropdownMenu component - #2144
Merged
Conversation
The desktop Manage dropdown rendered its menu as an absolutely-positioned view inside the sticky header. Trapped in the header's stacking context, the menu was painted beneath the card art, hiding the dropdown items. Replace the hand-rolled dropdown with the portal-based DropdownMenu (rendered at the root PortalHost), matching the existing TransactionDropdown pattern. Portal content paints above all page content, so the menu now appears over the card art. This also drops the manual outside-click handler in favor of the primitive's built-in dismiss behavior. https://claude.ai/code/session_01EQ1VUeY2NyNkPANuzfn5Sc
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaced the custom dropdown implementation in the DesktopHeader component with the reusable DropdownMenu component from the UI library, improving code maintainability and consistency.
Key Changes
DropdownMenu,DropdownMenuContent, andDropdownMenuItemcomponents from@/components/ui/dropdown-menuuseSafeAreaInsetshook to properly handle safe area insets for the dropdown positioninguseEffecthook that handled outside click detectionDropdownMenuTriggerwrapperDropdownMenuItemcomponentsalign="end"), offset, and insets for correct positioningImplementation Details
onOpenChangecallback from DropdownMenu instead of manual state managementhttps://claude.ai/code/session_01EQ1VUeY2NyNkPANuzfn5Sc