Fix overflow and scrolling issues in dialogs and menus#5
Open
Skyminers wants to merge 2 commits into
Open
Conversation
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
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
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
min(400px, 70vh)for the container andmin(350px, 60vh)for the items list to prevent overflow on smaller screens. Addedoverflow: hiddento content containers to prevent text wrapping issues.overflow: hiddento the list item container and capped image preview height to fit within the item's vertical padding usingMath.min(imagePreviewMaxHeight, itemHeight - 16).max-h-[85vh] overflow-y-autoclasses to DialogContent to enable scrolling for tall content on smaller viewports.max-h-[70vh] overflow-y-autoclasses to the dropdown panel to constrain height and enable scrolling.overflow-hidden flex-shrink-0to the right-side shortcuts container to prevent layout shift.overflow: hiddento the list item container for consistent overflow handling.Implementation Details
min()function to responsively constrain heights based on viewport size while maintaining maximum dimensionsoverflow: hiddenstrategically to prevent content overflow and maintain layout integrityoverflow-y-auto) on dialog and panel components to handle content that exceeds viewport heightflex-shrink-0where needed to prevent unintended size reductionhttps://claude.ai/code/session_01YMRy1F3CptEToJhvkHyCwr