Mobile: per-host status line forces horizontal page scroll at 320px #42
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the responsive-layout harness added for #13
(
make frontend-viewport-test). This is a real defect in the layout, not aharness artifact.
Symptom
At a 320px viewport the page scrolls horizontally:
documentElement.scrollWidthis 350 against a 320px layout viewport. Reproduced at every run, only at 320px —
667, 767, 768, 769, 844 and 1280 are clean.
Cause
.status-textinhostRowHTML()(src/main.js) carrieswhitespace-nowrap,and once a tick has populated it the content reads e.g.
min 167ms / med 167ms / avg 167ms / max 167ms. Measured at 320px that is 325pxof unbreakable text inside a 270px box, and since the element does not clip, the
overflow propagates all the way up to the document:
The
max-width: 768pxblock insrc/styles.csssets the info block towidth: 100%but never addresses this line, so the narrow layout inherits anowrap string sized for the 420px desktop column.
Suggested fix
Allow the status line to wrap (or shorten it) below the breakpoint. Any fix is
fine as long as
make frontend-viewport-testreportsno-horizontal-overflowpassing at 320x568 — the harness already asserts this and names the offending
element on failure.
Note for whoever picks this up
window.innerWidthis useless for detecting this. Under mobile emulation Chromelets
innerWidthgrow to the width of the overflowing content — it reports 350,matching the overflow exactly, so a check written as
scrollWidth <= innerWidthpasses while the page is visibly broken. Theharness compares against
Math.min(innerWidth, documentElement.clientWidth)instead.
Ref #13, #5, #2
Fixed in #50 (base
next).Dropped
whitespace-nowrapfrom.status-textand made eachlabel / value / separatorgroup its own unbreakable span, so the line wrapsonly between stats and never begins with a
/. At 320px it renders as tworight-aligned rows; in the 420px desktop column it still fits on one row, so
the wide layout is unchanged.
Verified with
make frontend-viewport-testin a throwaway clone with#44 merged on top (the harness is not
on
nextyet, and none of its files are in this branch). At 320x568,no-horizontal-overflowgoes FAIL (scrollWidth350 vs viewport 320) to PASS,and
nothing-past-viewport-edgewith it: 5/8 to 7/8 checks. 1280x800 stays7/7; 769x1024 and 844x390 are unchanged.
make checkgreen.The remaining 320px failure is
tap-targets-44px(#43), untouched here.