Skip to content

Fix overflow and scrolling issues in dialogs and menus#5

Open
Skyminers wants to merge 2 commits into
mainfrom
claude/fix-image-overlap-windows-8718k
Open

Fix overflow and scrolling issues in dialogs and menus#5
Skyminers wants to merge 2 commits into
mainfrom
claude/fix-image-overlap-windows-8718k

Conversation

@Skyminers

Copy link
Copy Markdown
Owner

Summary

This PR addresses overflow and scrolling issues across multiple components to improve layout stability and prevent content from being cut off on smaller viewports.

Key Changes

  • QuickMenu: Updated max-height constraints to use min(400px, 70vh) for the container and min(350px, 60vh) for the items list to prevent overflow on smaller screens. Added overflow: hidden to content containers to prevent text wrapping issues.
  • ClipboardListItem: Added overflow: hidden to the list item container and capped image preview height to fit within the item's vertical padding using Math.min(imagePreviewMaxHeight, itemHeight - 16).
  • AddSnippetDialog & SnippetDialog: Added max-h-[85vh] overflow-y-auto classes to DialogContent to enable scrolling for tall content on smaller viewports.
  • SemanticToggle: Added max-h-[70vh] overflow-y-auto classes to the dropdown panel to constrain height and enable scrolling.
  • StatusBar: Added overflow-hidden flex-shrink-0 to the right-side shortcuts container to prevent layout shift.
  • SnippetListItem: Added overflow: hidden to the list item container for consistent overflow handling.

Implementation Details

  • Used CSS min() function to responsively constrain heights based on viewport size while maintaining maximum dimensions
  • Applied overflow: hidden strategically to prevent content overflow and maintain layout integrity
  • Enabled vertical scrolling (overflow-y-auto) on dialog and panel components to handle content that exceeds viewport height
  • Ensured flex containers use flex-shrink-0 where needed to prevent unintended size reduction

https://claude.ai/code/session_01YMRy1F3CptEToJhvkHyCwr

claude added 2 commits March 27, 2026 02:46
The image preview maxHeight (default 80px) matched the full item height
(IMAGE_ITEM_HEIGHT=80px), leaving no room for padding and causing the
image to overflow and visually cover adjacent items on Windows.

Two fixes:
- Add overflow:hidden on <li> to clip any content exceeding item bounds
- Cap effective image preview height to itemHeight-16px for proper spacing

https://claude.ai/code/session_01YMRy1F3CptEToJhvkHyCwr
- SnippetListItem: add overflow:hidden on <li> to prevent content
  bleeding in virtual scroll (same pattern as ClipboardListItem fix)
- QuickMenu: use viewport-aware maxHeight (min(400px, 70vh)) for small
  windows; add overflow:hidden on image content containers
- SnippetDialog & AddSnippetDialog: add max-h-[85vh] overflow-y-auto
  to prevent dialogs from exceeding viewport on small screens
- SemanticToggle: add max-h-[70vh] overflow-y-auto on popup panel
- StatusBar: add overflow-hidden on shortcut hints to prevent overflow
  on narrow windows

https://claude.ai/code/session_01YMRy1F3CptEToJhvkHyCwr
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