fix: keep layout usable at high webview zoom and narrow widths - #14
Open
gmcky wants to merge 4 commits into
Open
fix: keep layout usable at high webview zoom and narrow widths#14gmcky wants to merge 4 commits into
gmcky wants to merge 4 commits into
Conversation
Collaborator
|
I will test that on linux asap |
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.
At high webview zoom / narrow window widths the main layout broke: the header
title and controls overflowed, the language dropdown clipped at the viewport
edge, and long output tokens pushed past the pane.
What changed
min-w-0+shrink-0guards; title truncates and hidesunder 800px; Translate button collapses to icon-only under 600px.
createPortaltodocument.bodywithposition: fixed; position is recomputed onresize / scroll / visualViewport, flips above the button when space below
is tight, and clamps
maxHeightto the viewport. Click-outside accountsfor the portaled menu.
min-w-0; dropped the JS textarea auto-resizein favor of flex sizing so the counters stay visible.
break-words/overflow-wrap: anywhereso long tokens wrapinstead of overflowing.
minimum window size the header/toolbar overlapped and the language
selectors slid off-screen; 200% was unreadable at that size anyway.
Testing done
Tested on Windows 11:
@noxygalaxy could you sanity-check the visuals on Linux? I only have a
Windows machine to test on rn, so I'd like to confirm the tiling / resize
behavior and the portaled dropdown positioning hold up under a tiling WM
before this is merged. If anything looks off, just let me know and I'll
patch it up.
Verify