Repository navigation
Resize the phone tab bar and minimise it while reading - #516
Conversation
|
Review: Changes needed (two small fixes) Reviewed head Verified
Must fix
Nice to have
Shots: |
0bf6d9b to
edc8995
Compare
|
Review (follow-up): Looks good. One recommended visual change: centre the pencil at rest. I re-checked head Earlier must-fixes: both resolved
Measurements
Recommended: centre the pencil at restWith
At 393 it reads slightly low. At 320 it clearly looks like it has slipped ( Use Nice to have: the pencil at 320 is now 44px, against 48px earlier. It meets the target, but next to a 62px bar it looks undersized. Consider 48px. |
The phone tab bar takes iOS 26 proportions: a 62px bar with 10px semibold labels, a 54px action circle, and a selection pill whose corners are concentric with the bar (pill radius = bar radius - inset), so labels clear the pill's curve at every phone width. Reading down a pane shrinks the bar to one circle showing the current tab, on the same scroll signal that tucks the top bar away; scrolling up, focus, or a tap restores it. Reduced motion keeps the full bar. The first-paint skeleton follows the new geometry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A minimised bar's inert tabs are also aria-hidden, so only the Show tabs circle is exposed. The bar's corners drop to 22px (pill 17px, still concentric with the 5px inset), which keeps "Decisions" clear of the pill's curve at 320 under Linux font rendering too. Tests that read down a pane and then switch tabs restore the bar first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The minimised circle's icon takes brand ink, and its count or activity dot sits at the circle's corner instead of over the icon, landscape too. - Landscape shrinks the bar toward its action, so the circle and pencil stay together. - Scroll direction accumulates travel since the last change of direction, so slow drags still tuck and restore both bars. - The pencil's bottom edge stays level with the bar while both shrink. - Corners drop to 20px (pill 15px, still concentric), and the narrowest phones use a 44px action and tighter tracking, so even "Document" keeps label clearance at 320 under Linux font metrics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pencil sits on the bar's centre line at rest and both shrink to the same circle when minimised. The narrowest phones keep a 48px action: "Document" still clears its pill by over 3px at 320. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- apps/web/src/workspace.tsx: passes two props to the phone tabs, a boolean `minimised` from the top bar's hidden state and the `onRestore` callback; no new className, style, or dynamic class logic. - The preserved-values typography exception for --phone-tab-label-size was checked: one case, one selector (.phone-tab), the token's only use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f011cf6 to
3148913
Compare
Why
The phone tab bar felt cramped: 11.3px medium labels were too wide for their columns, so the full-column capsule's 26px curve touched "Decisions" (2.9px clearance at 393, 0.6px at 375, an overlap at 320), and the label's weight pushed the icon up. Maggie chose option E from the tab-bar comparison: option B's iOS 26 sizing plus minimise-on-scroll.
What changed
calc(var(--radius-phone-tab-bar) - var(--phone-tab-bar-inset))(15px with a 5px inset), so the curves run parallel at the Chat and Build ends. A full capsule would have forced a near-capsule pill that crowded the labels again. Landscape's 48px bar uses a 2px inset and an 18px pill, using the same rule (--radius-phone-tab-pill-compact). There's a CSS comment on the tokens.usePhoneTopBarnow returns a sharedshow()), and direction now accumulates travel since the last change of direction, so slow drags of a few pixels a frame still tuck and restore both bars; rubber-banding at either end is still ignored. Any scroll up, focus entering the tab row, or a tap on the circle restores the bar. The transitions use--tab-slide-dur/--tab-slide-ease, and Chat never minimises, matching the top bar.inertandaria-hidden; while expanded the circle isinertandaria-hidden. Restoring by tap or keyboard focus moves focus to the current tab.--phone-bottom-chromestill derives from--phone-tab-bar-height, so it tracks the full 62px bar. I didn't touch any pane padding rules.phone-skeleton.cssto the same geometry (radius, inset, action size, 320 and landscape variants). The markup needed no change, so theindex.htmlandPhoneSkeletonparity test still holds.packages/visuals/theme.css):--phone-tab-bar-inset(-compact),--phone-tab-action-gap,--phone-tab-action-size,--phone-tab-bar-minimised,--phone-tab-label-size,--phone-tab-label-line,--radius-phone-tab-bar,--radius-phone-tab-pill(-compact),--radius-phone-tab-minimised.Screenshots
Before on top, after below.
393, Document current

393, Decisions current

375, Decisions current

320, Decisions current

Landscape

After: end tabs selected, to show the concentric corners (393 Chat, 393 Build, 320 Chat, 320 Build)

After: minimised while reading (393 on Decisions with its count, 393 on Document with the activity dot, 320 on Decisions, landscape on Decisions and on Document)

Testing
bun run types: passbun test apps/web/src/phone-skeleton.test.tsx scripts/design-contract: 47 passdprint checkandoxlint: cleancheck-design-record: passcheck-design-contract: pass after the renewal below. The localdesign:checkand token failures come from untracked local design-jig files that aren't in this branch.e2e/phone-workspace.e2e.ts:sidecar.e2e.ts(compact destinations) restores the bar before switching tabsresponsive-decisions.e2e.tsaccepts either the Decisions tab or the minimised circlee2e/phone-first-load.e2e.tsnow runs at 393 and 320 and asserts the 62px bar and the 54px or 48px actionDesign-contract review
Reviewed and renewed in the "Renew design-contract review exceptions for the phone tab bar" commit. Maggie approved the 10px tab label design; the typography exception is exact (one case,
.phone-tab, the token's only use).apps/web/src/workspace.tsx, exception filescripts/design-contract/exceptions/dynamic-web.json: itssourceHash(6c383a9a…) no longer matches. The new hash is332ae71c3fca3a39c97a1a4314c6315b0c6e296cb29d9c9f8d60ba5b8290909c. Only two props were added (minimised={topBar.hidden},onRestore={topBar.show}); there's no new style or class logic at the dynamic sites.scripts/design-contract/exceptions/preserved-values.json: I added a typography case forfont-size: var(--phone-tab-label-size)(10px) on.phone-tab. The fluid scale's smallest step (--text-2xs, about 11.3px) makes four labels too wide for their pills at 320–393, which was the original problem. This mirrors Apple's 10pt tab label and needs an explicit design decision.🤖 Generated with Claude Code