Skip to content

Refactor card details dropdown to use DropdownMenu component - #2144

Merged
MusabShakeel576 merged 1 commit into
qafrom
claude/kind-shannon-8zdw8x
Jun 14, 2026
Merged

Refactor card details dropdown to use DropdownMenu component#2144
MusabShakeel576 merged 1 commit into
qafrom
claude/kind-shannon-8zdw8x

Conversation

@MusabShakeel576

Copy link
Copy Markdown
Contributor

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

  • Imported and integrated DropdownMenu, DropdownMenuContent, and DropdownMenuItem components from @/components/ui/dropdown-menu
  • Added useSafeAreaInsets hook to properly handle safe area insets for the dropdown positioning
  • Removed manual dropdown state management logic including the useEffect hook that handled outside click detection
  • Replaced custom View-based dropdown structure with the DropdownMenu component structure
  • Updated dropdown trigger button to use DropdownMenuTrigger wrapper
  • Converted dropdown menu items (PIN and Freeze/Unfreeze actions) to use DropdownMenuItem components
  • Configured dropdown content with proper alignment (align="end"), offset, and insets for correct positioning

Implementation Details

  • The dropdown now leverages the built-in onOpenChange callback from DropdownMenu instead of manual state management
  • Safe area insets are properly applied to prevent the dropdown from being obscured by notches or system UI
  • Menu items maintain their visual styling and hover states through className props
  • The ManagePinModal trigger is now wrapped in a DropdownMenuItem for consistent behavior

https://claude.ai/code/session_01EQ1VUeY2NyNkPANuzfn5Sc

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
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored Jun 14, 2026 8:05am
solid-app-staging Ignored Ignored Jun 14, 2026 8:05am

Request Review

@MusabShakeel576
MusabShakeel576 merged commit 3db0107 into qa Jun 14, 2026
5 checks passed
@MusabShakeel576
MusabShakeel576 deleted the claude/kind-shannon-8zdw8x branch June 14, 2026 08:07
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.

2 participants