Repository navigation
Fit a signup's three tabs on a 320px phone in every language - #1112
Conversation
In Swedish and German the tab strip was wider than a 320px screen, so a signup opened on Build showed Settings cut in half at the right edge. Below sm, the tabs' side padding, the gap before a count, the count's minimum width and the strip's own side margin are narrower; the tabs keep their height, and wider screens are unchanged. The label-fit test now checks every tab is in view at 320px as well as 390px, in every catalog language. Fixes #1022. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9STsNeQFCos1mPCTVrc
CI's Chromium hints Inter to whole pixels, which made the Swedish tabs 323px wide at 320px; here the text is laid out at fractional widths and they took 316px. Below sm each tab's side padding goes from 8px to 6px, so the Swedish strip takes 311px hinted and 304px unhinted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9STsNeQFCos1mPCTVrc
CI: e2e failed on the first push, fixed in
|
Tophat: passedSee it: https://claude.ai/artifact/EeRgZvFu43K5pa9SiykCJN
Worth a look: the tighter spacing applies on every phone, not only at 320 px. At 390 px in English the tabs also sit closer together. The first tab now starts 8 px from the screen's edge (its word at 14 px), while the panel below starts at 16 px. The card shows the 390 px pair. Not checked: a two- or three-digit Responses count (these signups had 0 responses; the PR's e2e spec measures the seeded counts). Firefox and Safari (only Chromium here). Ran c8d00c0 against 90369ba locally, Chromium at 320, 390 and 1280 px wide, made-up data. https://claude.ai/code/session_016YZ9SUXdWjAwJhK7qPRd9V Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
This changes classes only, in TabsNav. Below sm, the tab padding, the gap before a count, the count's minimum width and padding, and the strip's side padding all get smaller. Every sm: variant puts back the old value, so the desktop strip is unchanged (the tophat measured the same positions at 1280 px). py-3 stays, so the tap target keeps its height. The e2e check "every tab in view" now runs at 320 px as well as 390, so a regression in any test language fails CI. The CHANGELOG entry is there.
Blocking (0)
Optional (1): TabsNav.tsx L60: with -mx-4 px-2, the strip's first tab starts 8 px from the screen's edge, while the panel below starts at 16. The tophat's 390 px pair shows the offset. The description makes this choice on purpose, so whether it reads fine is the owner's call.
Earlier threads: none
Checks: CI green on c8d00c0 (lint-type-test, e2e, CodeQL). The tophat passed on this same SHA. No conflict with main.
Waits for the owner because it's UX (the tab strip's spacing on every phone). Card: https://claude.ai/artifact/EeRgZvFu43K5pa9SiykCJN. The code adds no risk beyond what's on screen.
https://claude.ai/code/session_016YZ9SUXdWjAwJhK7qPRd9V
Generated by Claude Code
|
Approved by the owner at https://claude.ai/code/session_016YZ9SVEZdRizJssntdwLA8 Generated by Claude Code |
Merge: not merged, sent to fixOne gate failed on
The other gates passed: review and tophat at https://claude.ai/code/session_016YZ9SVEZdRizJssntdwLA8 Generated by Claude Code |
Resolves the conflict with #1077 in TabsNav: the count badge keeps #1077's aria-hidden on Build (with its sr-only words after it) and this branch's narrower phone spacing. CHANGELOG keeps both entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SSe4RUc89LXkqYHJs6
Conflict with
|
Tophat: passedSee it: https://claude.ai/artifact/EeRgZvFu43K5pa9SiykCJN This re-checks the merge from
Worth a look: the tighter spacing applies at every phone width, not only 320 px. At 390 px the first tab starts 8 px from the edge, while the panel below starts at 16 px. Not checked: the keyboard focus ring, which the merge didn't change and the tophat at Ran 1f6ac7e against ae90fa8 locally, Chromium at 320×800, 390×800 and 1280×800, made-up e2e seed data. https://claude.ai/code/session_016YZ9SWSbhtCnF13yMBu7QU Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 2)
The only change since the review that passed at c8d00c0 is the merge from main. It resolves the TabsNav conflict with #1077 correctly: Build's badge keeps aria-hidden and its sr-only "N slots" words, and it gets this PR's phone sizes. CHANGELOG.md keeps both entries. The spec change hasn't moved since the last review.
Blocking (0)
Optional (0)
Earlier threads: none
Checks: CI green on 1f6ac7e, e2e included. The tophat passed on 1f6ac7e: all three tabs fit at 320 px in English, Swedish and German, two-digit counts included, and the desktop layout is unchanged.
Needs the owner because it's UX. The approval for c8d00c0 doesn't carry over: the merge resolved a conflict in runtime code. Card: https://claude.ai/artifact/EeRgZvFu43K5pa9SiykCJN
https://claude.ai/code/session_016YZ9SWSbhtCnF13yMBu7QU
Generated by Claude Code
|
Approved by the owner at https://claude.ai/code/session_016YZ9SSmSRHnrjyfJxikvNb Generated by Claude Code |
Fixes #1022.
Session: https://claude.ai/code/session_016YZ9STsNeQFCos1mPCTVrc
The problem
On a 320px phone, a signup's tab strip (Build · Responses · Settings, in
TabsNav) was wider than the screen in Swedish and German. A signup opens on Build, so the Settings tab showed cut in half at the right edge. The strip scrolls, but its scrollbar is hidden, so nothing said there was more. Measured on the seeded signups (counts 7 and 5): the strip needed 372px in Swedish and 352px in German. English already fit.The fix
src/components/signup/TabsNav.tsx, belowsmonly:px-3(12px) topx-1.5(6px), and the gap before a count fromgap-2togap-1px-1.5topx-1px-4topx-2. I made this choice; the issue doesn't list it. The issue's levers alone leave Swedish over. The first tab's label now starts 14px from the screen edge, about in line with the page's 16px gutter. Before, it started at 28px.py-3) is unchanged, so the tap target doesn't shrink. Fromsmup, every class is what it was, so the desktop strip looks the same. The centring effect (fix(a11y): center the active tab by scrolling the strip, not the page #673) is untouched.affected-articles.mjsnames no help article, and no help screenshot shows the strip at phone width, so no help change.Tests
tests/e2e/translated-organizer.spec.ts: the label-fit test now checks "every tab in view" (the strip doesn't scroll sideways) at 320px as well as 390px, for each test language. Onmain'sTabsNavit failed at 320px in both Swedish and German.hintfull), which gave 323px. With this PR's head, the spec passes with hinting on and off.pnpm lint,pnpm format:check,pnpm typecheck,pnpm knip,pnpm test(252 files, 3869 passed, 1 expected fail), andpnpm build && pnpm budgetswith CI'sNEXT_PUBLIC_*values (Build page 151.7 of 151.8 kB; no budget changes). Against the production build, chromium, with hinting:translated-organizer,tabs-focus-ringandorganizer(37 passed). On the first push, the whole chromium suite passed locally (310).TabsNavor this spec. No conflict is expected.🤖 Generated with Claude Code
https://claude.ai/code/session_016YZ9STsNeQFCos1mPCTVrc