Repository navigation
fix(website): wrap mobile navigation at enlarged text sizes - #3598
Conversation
The header grid gave the navigation only the space left beside the brand caption and social controls, so six links wrapped onto a second line in Greek, German, Spanish, Portuguese, Vietnamese and English at common desktop widths. - Size the navigation to its content and let the brand column absorb the remaining width; a container query hides the caption only when it no longer fits, replacing the fixed 851-1250px breakpoint. - Move the navigation to its own row at 1100px and below, before one line can no longer hold it in any edition. - On phones, lay the six links out as two rows of three content-sized columns, with a tighter gap below 340px.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] The PR appears safe to merge; the earlier phone navigation overflow is addressed. SummaryThis PR arranges phone navigation into three equal columns and lets long or enlarged labels wrap.
Reviews (3) · Last reviewed commit: "fix(website): wrap mobile navigation at ..." · Reviewed by Greptile |
rahul05ranjan
left a comment
There was a problem hiding this comment.
Reviewed the diff against the header markup in website/public/index.html (grid order brand / navigation / header-social matches the new column template at styles.css:233). Static review only - I did not launch a browser on my side, so the pixel-level Playwright numbers in the description I take on your evidence.
A few things I checked and like:
- Making the brand track minmax(0, 1fr) and sizing the nav to content is the right inversion. The caption is data-i18n-skip, so its width is identical in every edition while the nav width varies per locale - a container query (styles.css:238, :258) is genuinely the right tool here, unlike the old fixed 851-1250px viewport query which hid the caption in locales where it would have fit.
- The container-type: normal reset at styles.css:2917 is load-bearing and easy to miss: at <=1100px the brand sits in an auto track, and inline-size containment would size it as if empty, collapsing the column. Good that this didn't get lost.
- 640px as the phone-grid threshold matches the site's existing 640/641 breakpoint pair, so no new boundary is introduced there.
- The 40px min-height on the phone links (styles.css:2963) is a welcome touch-target improvement over the 24px desktop value.
Two nits and one edge worth noting:
- The comment above styles.css:2956 says 'three even columns', but repeat(3, auto) is content-sized, not even - your PR body says content-sized, which is accurate; the CSS comment is the odd one out. Also font-size: 0.9rem in that block restates the base .navigation value, so it is a no-op.
- The new 340px block sits 20px from the existing 360px breakpoint. Three sub-400px thresholds (340/360/400) feels like it could be consolidated, but it is not worth blocking on.
- Edge: removing flex-wrap from the desktop nav means that if the row genuinely cannot hold - e.g. a user with a large default font size, where rem-based text scales but the px media queries do not respond - the grid now overflows the header horizontally where it previously wrapped. Your 1100px breakpoint has reasonable margin at default settings, so this is an acceptable trade, just flagging that the old wrap behavior was also the only graceful-degradation path for font scaling.
# Conflicts: # website/public/assets/styles.css
|
Merged latest Why main's layout won: #3851 (merged today) fixed the same desktop/tablet wrap with a different header design. It gives the header an independent 1320px width, hides the caption below 1280px, and moves navigation to its own row at ≤1100px. It was verified in Chromium across 20 languages × 15 widths. Its rules overlap this PR's desktop/tablet rules: the grid columns, the What this PR keeps: its rules that main has no counterpart for. That is the phone layout, where the six links form a 3×2 grid at ≤640px with 40px rows, plus the tighter spacing at ≤340px. Those rules now sit after main's 850px block. The header still has six links. Checks run: Not verified: I had no Chromium to re-render phone widths after the merge. Please re-check the before/after mobile screenshots against the new header, since main's ≤1100px block now provides the row placement. |
|
Verified the merge at Merge contents (git):
Layout, built from the merge commit and from
Checks: Not verified: Chromium only (no Safari or physical phone); the sharing-image step; and whether the earlier commenter has write access to this branch, since the collaborator-permission API returns 403 for me. |
CassieFox23
left a comment
There was a problem hiding this comment.
TL;DR: After the merge with main, this PR is the phone grid only: nineteen lines of CSS. The thread above already covers why. Three things to tidy before it merges. The stylesheet now has two 640px blocks that both set .navigation. The grid cannot give way when text is enlarged. The title, body and screenshots still describe the desktop work that is no longer here.
Findings
Should fix: two 640px blocks set the same .navigation properties. Main's block at styles.css L2606-2609 sets gap and font-size. The new block at L2922-2932 sets them again with other values, plus the grid. Same selector, same media query, later one wins. Folding the grid rules into the existing block keeps one source of truth for phones.
Should fix: the grid cannot shrink below three columns. .navigation a keeps white-space: nowrap at L269, and the grid is repeat(3, auto) at L2925. With a large browser text size on a narrow phone, three nowrap labels do not fit. The row then runs past the edge. The old flex-wrap layout wrapped instead. Either repeat(auto-fit, minmax(<min>, auto)) or allowing wrap under a text-size limit would keep the two-by-three look at normal sizes. With large text, both would wrap instead of running off the edge. This is the open Greptile thread; it still applies to the head.
Should fix: title, body and screenshots. They describe minmax(0, 1fr) auto auto, the brand container query and the 1100px move. None of that is in the diff any more; the head has auto minmax(0, 1fr) auto at L234 and no @container rule. A phone-only title and fresh phone screenshots would let a maintainer judge the change as it is.
No P0 or P1 bot threads on this PR. I did not render the page, so nothing above says how it looks; the stylesheet is all I read.
This was a read-only review of the diff at 01bc382; no build, website check or browser run on my side. The website check on this head reports success (read from the checks API, not rerun).
Thanks, pirrozani, for the careful measurements in the body. You also carried the phone layout through the merge.
🤖 Written with Claude Code (Fable 5.1, verified by Opus 5.5), posted with my OK 🦊
…7497) The phone header gave each link an equal minmax(0, 1fr) column and allowed overflow-wrap: anywhere, so single-word labels such as "Showcases", "Anleitungen", "Руководства" and "Посібники" broke between letters at 320-430px. Links now share the row as flex items that never shrink below their longest word. Labels wrap only at spaces, and a word wider than the whole row can still break, preserving the enlarged-text fit from #3598. Refs #3597
Summary
Keeps mobile header navigation within a 320px viewport when text is enlarged. The mobile grid uses shrinkable columns and wrapping links, retaining the minimum link height. Duplicate mobile grid declarations were consolidated.
Validation and limits
Chromium measurements at a 320px viewport with 16px and 32px root text reported a 320px document scroll width; all six links remained within the viewport.
git diff --checkand the pre-pushcheck:fastpassed. The website check could not complete its Cairo-dependent image/share-render stage because native Cairo is unavailable. Other browsers, languages and themes were not exercised in this pass.Author readiness
Human owner: @pirrozani