Skip to content

fix: keep layout usable at high webview zoom and narrow widths - #14

Open
gmcky wants to merge 4 commits into
MoonMonet:mainfrom
gmcky:fix/zoom-layout
Open

fix: keep layout usable at high webview zoom and narrow widths#14
gmcky wants to merge 4 commits into
MoonMonet:mainfrom
gmcky:fix/zoom-layout

Conversation

@gmcky

@gmcky gmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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

  • Header/toolbar: min-w-0 + shrink-0 guards; title truncates and hides
    under 800px; Translate button collapses to icon-only under 600px.
  • LanguageSelector: dropdown now renders through createPortal to
    document.body with position: fixed; position is recomputed on
    resize / scroll / visualViewport, flips above the button when space below
    is tight, and clamps maxHeight to the viewport. Click-outside accounts
    for the portaled menu.
  • Panes: fixed row layout with min-w-0; dropped the JS textarea auto-resize
    in favor of flex sizing so the counters stay visible.
  • Output: break-words / overflow-wrap: anywhere so long tokens wrap
    instead of overflowing.
  • Interface scale: capped max zoom at 170% (was 200%). Past ~170% on the
    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:

  • Default window size
  • Fullscreen at 1080p and 1440p
  • High webview zoom + manually narrowed widths

@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

  • Windows: header, dropdown, counters stay in viewport at high zoom
  • Windows: Translate collapses to icon under 600px, title hides under 800px
  • Dropdown flips up near the bottom edge
  • Windows: max scale (170%) on minimum window keeps layout intact
  • Linux / tiling WM: layout, resize, dropdown position confirmed (@noxygalaxy)

@noxygalaxy

Copy link
Copy Markdown
Collaborator

I will test that on linux asap

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