Spaces:
Running
The document is a page: fixed width, folding columns, real zoom
From the design update, the whole Bugs → document width / zoom group.
What was wrong
The sheet was width: 100%; max-width: 8.5in, so it was only a page when the
window was wide enough — at 1280px it squeezed to 680px and the measure changed
as you resized. Zoom scaled the type but not the page (a deliberate old choice,
noted in a comment that this patch removes), so zooming out gave you small text
on a full-size sheet. And nothing gave way as the window shrank: the document
was squeezed while both side columns kept their width.
What it does now
- The sheet keeps its width. It is a page, not a fluid column.
- The columns fold for it, in order: Pages sidebar first, then the comments
margin, and only a window narrower than the page itself scrolls sideways. - The sideways scroll lives in the editor column, never on the window — a
body-level horizontal scrollbar is what unsticks the header (an old bug worth
not re-opening). - Zoom magnifies the page: width, margins, height and type all take
--doc-zoom, so 80% is a genuinely smaller document and line breaks never
move at any zoom. - Folding is recomputed from the stored preference on every resize, so a
column folded away for space comes back on its own when the room does, while
one you closed by hand stays closed. Zooming re-fits too. - Below 980px (phones, tablets, split screens) the sheet stays fluid and
zoom is a text-size control again — reading a page never costs a sideways
scroll on a phone.
Verification
test/browser.js gains a guard covering all of it: the sheet holds its width at
1440 → 1280 → 1050, the sidebar folds before the comments, both return when the
window grows, sheet and type scale by the same factor, and an over-wide page
scrolls inside its column with no window-level overflow.
A/B checked against the pre-fix bundle, where it fails withthe sheet keeps its width at 1280 (680 vs 816). Full smoke and browser suites
pass.
Touches client/app.css and client/src/doc.js, as do the other PRs in this
batch — merged in order they should apply cleanly; later ones may want a rebase.