Skip to content

fix(website): wrap mobile navigation at enlarged text sizes - #3598

Merged
morluto merged 3 commits into
morluto:mainfrom
pirrozani:fix/website-nav-wrap
Oct 22, 2026
Merged

morluto merged 3 commits into
morluto:mainfrom
pirrozani:fix/website-nav-wrap

Conversation

@pirrozani

@pirrozani pirrozani commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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 --check and the pre-push check:fast passed. 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

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

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.
@pirrozani
pirrozani marked this pull request as ready for review October 14, 2026 17:56
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the earlier phone navigation overflow is addressed.

Summary

This PR arranges phone navigation into three equal columns and lets long or enlarged labels wrap.

  • Phone navigation now fits six links into two rows of three.

Reviews (3) · Last reviewed commit: "fix(website): wrap mobile navigation at ..." · Reviewed by Greptile

Comment thread website/public/assets/styles.css Resolved

@rahul05ranjan rahul05ranjan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Merged latest main into this branch to resolve the website/public/assets/styles.css conflict. No rebase or force-push was used.

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 brand container query, and the 1101px and 1100px blocks. Combining both designs would have produced untested CSS, so the resolution keeps main's header layout there.

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: python3 scripts/website.py check reports 380 pages in 20 languages and 0 shared-HTML changes. The sharing-image step was skipped because native Cairo isn't available here.

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.

@pirrozani

pirrozani commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Verified the merge at 01bc382b4 independently against the open points in the earlier comment.

Merge contents (git):

  • Parents are a0b656183 (this PR's original commit) and 22ec8bdb2, which is on main and contains fix(website): give navigation room and refresh contributors #3851.
  • The tree equals 22ec8bdb2 plus the 19 added lines in website/public/assets/styles.css: the ≤640px phone grid and the ≤340px tightening. Nothing else differs from main, so main's header rules are untouched.

Layout, built from the merge commit and from 22ec8bdb2 and compared in Chromium (Playwright), 20 languages:

  • Phones (320, 340, 360, 390, 430 and 640px): main alone keeps the six links on one row in 45 cases and otherwise splits them 5+1 (54 cases), 4+2 (16) or 3+3 (5). This branch has 2 rows of 3 in all 120 cases, with no overflow and no overlap with the controls.
  • Above 640px (641, 700, 850, 851, 1100, 1101, 1280 and 1920px): the link positions are identical to main in all 160 cases. This branch changes nothing there, and main's own header has no overflow or overlap at those widths.

Checks: python3 scripts/website.py check exits 0 on the merge commit and reports 0 shared-HTML changes. Its own build prepares 57 reading pages in 3 languages; the 380 pages in 20 languages in the earlier comment come from prepare-website.py.

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 CassieFox23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 🦊

@morluto morluto changed the title fix(website): keep header navigation on one row and grid it on phones fix(website): wrap mobile navigation at enlarged text sizes Oct 21, 2026
@morluto
morluto merged commit f33b7bd into morluto:main Oct 22, 2026
35 checks passed
morluto pushed a commit that referenced this pull request Oct 27, 2026
…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
@morluto morluto added the bug Something isn't working label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants