fix(web): History's head row overflows the viewport on phones — .section-head has no flex-wrap #285
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 while measuring #280 (head-row unification) in headless chromium. Pre-existing, not caused by #280 — but #280 makes it ~10px worse, so recording it with numbers rather than letting it disappear.
What happens
.section-head(shell.css) is a flex row with noflex-wrap, unlike its card-level counterpart.card-head(cards.css), which hasflex-wrap: wrap. History's head row is the only one that carries two controls: two<label class="field runs-filter">selects, each pinned tomin-width: 180px(runs.css).At a 390px viewport the page content box is 366px, and
h2+ 180 + 180 + gaps cannot fit. The<h2>shrinks to its min-content column (~14px —overflow-wrap: anywhere) and the row still overflows, so the History page scrolls horizontally.Measured (chromium, 390×844, real Source Serif 4,
.pageat its production width)document.scrollWidthThe extra 10.39px is exactly one
.section-headgap(0.65rem):SectionHeadalways renders the.spacerthat does the right-aligning, so the row has two gaps (h2 | spacer | action) where the oldjustify-content: space-betweenmarkup had one. Everywhere else that is invisible — the spacer just absorbs 0.65rem less free space, and every other page head measured a 0.00px delta on height, edges and the gap below the row. It only shows up on the one row that has no free space to give.The
<h2>is squeezed to the same width in both revisions, so this is not a heading-metrics problem: it is two 180px min-widths in a row that cannot wrap.Suggested fix
Give
.section-headtheflex-wrap: wrapits card-level twin already has, so the controls drop to their own line instead of pushing the page sideways. Worth deciding at the same time whether the filters should go full-width on a phone (this is a phone-first app; two 180px selects side by side are cramped even when they do fit).Deliberately not done inside #280: that issue's brief puts "any spacing/visual redesign" out of scope, and wrapping visibly changes History's phone layout — a call for a maintainer, not for the refactor that happened to measure it.