fix(settings): scrollable panel + close on Escape/backdrop - #23
Open
brettchien wants to merge 1 commit into
Open
fix(settings): scrollable panel + close on Escape/backdrop#23brettchien wants to merge 1 commit into
brettchien wants to merge 1 commit into
Conversation
…Escape/backdrop The config panel content could overflow the window with no way to scroll (#settings-view had no overflow set). A bare overflow-y:auto is not enough by itself though: the panel centers its card with justify-content:center, and centering a flex container whose content overflows leaves the start of the overflow unreachable by scroll (scrollTop can't go negative). Switch to justify-content:flex-start + margin:auto on the card — same centered look when it fits, but auto margins clamp to 0 instead of going negative, so an oversized card scrolls from the top instead of losing its start. Also closes the settings modal on Escape and on a backdrop click (outside the card), matching standard modal UX — neither existed before. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
#settings-viewhad nooverflow, so a config panel taller than the window had no way to scroll — content was just clipped by the parent'soverflow:hidden.overflow-y:auto: the panel centers.settings-cardwithjustify-content:center, and centering an overflowing flex container leaves the start of the overflow unreachable by scroll (scrollTopcan't go negative). Switched tojustify-content:flex-starton#settings-view+margin:autoon.settings-card— same centered look when content fits, but auto margins clamp to 0 instead of going negative, so an oversized card scrolls from the top.Scope:
#settings-view/.settings-cardCSS + the settings-close wiring insidepanel.jsonly. No other view touched.Test plan
node --test test/*.test.js— 137/137 pass (unaffected; these changes aren't in the unit-tested modules)Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com