oficina / estilo Public

Phone web P0: the compact bar, 44px touch targets, the stacked header from 44rem open

On branch feat/phone-compact-bar

P0 of Docs' phone web redesign: estilo's part

Paul approved the phone web mockups on 2026-11-28 ("Yeah, those screens look much better"), together with the audit's six recommendations. The design is on Docs design/phone-web (e058917): AUDIT.md, plus the mockups at tailnet :10011. This branch is slice P0. Docs pins it on the P1 branch, after it lands.

What changes

Compact bar, opt-in: Bar.Compact, drawn as estilo-bar~="compact". Below 44rem, or on a phone held sideways (a coarse pointer under 30rem tall), the bar is one 52px row:

  • Back: the brand, drawn as a chevron and the app's name, linking to App.Home.
  • The title.
  • The lead.
  • Compact.Trail, which holds Docs' Aa and •••.

The menu row, the actions, the switcher and the account are hidden there, as in native D4. A compact bar never draws the Menu sheet, because its trail is the overflow (findings 1 and 4).

The folded title. Compact.Title is for pages with a large title of their own. It is hidden until the app's script sets estilo-bar-folded. Folded, it fades in, the hairline appears, and Back shrinks to its chevron. The app's name stays as Back's accessible name. Without script the bar never folds. This matches reading.html.

Trail controls.

  • [estilo-bar-tool] is a 44px round control in the accent colour.
  • A <details> panel in the trail is a drop-down from the bar's inline end (Paul's answer 3: a drop-down, not a sheet). It has 44px rows at 16px, a 16px radius, no shortcut hints, and grouped separators.
  • menu.Item.Icon draws an icon before a row's label.

Title ellipsis (finding 2). The compact title fills its room and ends in an ellipsis instead of being cut mid-letter. chrome.js leaves the field unfitted there.

Stacked header from 44rem instead of 800px (answer 4). Between 44rem and 800px a stacked bar shows its actions in the bar and has no Menu sheet, and the Rename pill stays in the title row. Every other bar keeps the 800px shell breakpoint. The breakpoint pair is defined once and shared by the CSS and chrome.js:

  • narrow: (max-width: 43.99rem), (max-height: 30rem) and (pointer: coarse)
  • wide: (min-width: 44rem) and (not ((max-height: 30rem) and (pointer: coarse)))

Touch, in every app (findings 9 and 10).

  • On a coarse pointer, bar triggers and menu rows are 44px. --estilo-trigger-size is 2.75rem there.
  • Where nothing hovers, menus show no ⌘ hints.
  • The stacked header keeps its 32px look and takes 44px of hit area: the pills, switcher, account and menubar titles. The menubar titles reach 16px up into the title row, and the title field stays on top. Its menu rows are 44px on touch.

Save state (finding 7). savestatus gains a subtitle placement, rendered as inline subtitle. It is muted normally, in the warning tone while retrying, and negative and bold once saving has failed. Docs uses it in P1.

No new strings: the templates carry none, and Back's label is the app's name.

Evidence

  • TDD. The new tests went red first: chrome/compact_test.go, menu/touch_test.go, savestatus/subtitle_test.go. Old tests that pinned 800px now pin the ruled 44rem pair. mainChromeCSS and mainMenuCSS were updated deliberately; the reason is in the test comment and the commit.
  • Browser check. chrome/compact_browser_test.go and compact.browser.mjs (go test -tags browser -run TestTheCompactBarInRealEngines ./chrome) cover: - phones at 360, 390 and 430 with touch, plus landscape at 844×390; - tablets at 768 and 1024 with touch; - desktop at 1280; - light and dark, and en, ar and ru.

It checks bar height and the published variable, what is shown and hidden, the order of Back, title and end group (mirrored in Arabic), 44px tools, the ••• panel's placement, 44px rows and no hints, and the folded state. Green in Chromium 151. Three mutations were each seen to turn it red, for the right reason: account shown, 30px rows, and a folded name with display: none. The existing TestStackedTitleFitsItsTitle is green in Chromium.

  • Desktop unchanged. Stacked and plain bars were rendered with main's estilo and with this branch's, closed and with File and account open, in light and dark, at 820, 900, 1024 and 1280px with a mouse pointer. All 40 screenshots are pixel-identical.
  • Screenshots. In polish-audit/docs-phone-web/build/p0-estilo/: 84 PNGs, each case at rest, -open, -large and -folded, plus desktop-vs-main/. The page is a stand-in for Docs, not Docs itself, which adopts this in P1.
  • make test-spacing passes. vet, gofmt, and the chrome, menu, savestatus and internal/lint tests pass locally. Hub CI runs the rest.

Compared with the mockup

  • Matching: the bar row (Back, undo/redo, Aa, •••), the 44px tools, the ••• drop-down's width, radius, rows and separators, the folded inline title with Back as a chevron and the hairline only when folded, and the iPad desktop header at 768.
  • Different: - The ••• panel uses the solid surface, not the mockup's translucent blur, to stay consistent with every other estilo menu. - The undo/redo pill styling is left to Docs (P1).

Not done here, and why

  • WebKit was not run. Playwright 1.62.1 wants webkit-2336. This Mac has 2311, which refuses PushAPIEnabled, and 2388, which refuses Emulation.setAuthCredentials. Mobile Safari on an existing iOS 27 simulator is checked in P1, with Docs' real page. That covers :has(), the not (…) media query and the folded state.
  • No re-pins. Re-pinning is the only step needed for other apps to pick up the touch changes.

Who picks this up when they re-pin

Only Docs uses Menubar, Lead and Compact, so the compact bar and the 44rem header change only Docs.

Every app that links estilo's chrome and menu gets the touch changes (44px bar triggers and menu rows, no ⌘ hints on touch) the next time it re-pins:

  • On 6238a47: Sheets, Memoria, Calls (meet), Mapa, Fichas, Equipo and Home.
  • Slides on 49ad7d4.
  • Base on 487cadb.
  • Calendar's go.mod line doesn't parse as a pin.

Only apps that ask for subtitle get it; Slides' inline and Docs' floating placements are unchanged. Adding menu.Item.Icon breaks no consumer: no unkeyed menu.Item literals were found in any app.

Review requested: Fable, before landing.

LLM

estilo's slice of Docs' approved phone web design: Bar.Compact (one 52px row below 44rem, ••• as a drop-down), touch targets and no key hints on touch for every app, stacked header from 704px, savestatus subtitle placement. Chromium-proven; desktop pixel-identical to main; WebKit deferred to P1's simulator pass.

Hub CI passed at c56314e: modcache, vet, fmt, build, go-test and spacing. Ready for review.

Review by Claude Fable (model id claude-fable-5-2) of c56314e — verdict: APPROVE AFTER FIXES. Read-only review; no renders.

  1. HIGH chrome/chrome.css:515-518 (with :92-94): the 704 px move isn't Docs-only. Mapa (frame.go:89) and Fichas (frame.go:95) set Menubar + Lead + Nav. At 704–799 px, nav is still hidden below 800, the new rule hides the Menu sheet for every stacked bar, and both apps hide their rail below 800, so Mapa's places and Fichas' types/Search become unreachable. At 844×390 landscape they drop to the 85 px narrow bar, and their actions lose the pill style. Fix: keep the sheet (and the old actions behaviour) when the bar has nav (:not(:has(> [estilo-bar-nav]))), or key the 704 move on compact. Add browser cases for a stacked non-compact bar with Nav at 768 and 844×390. Also: a compact bar with Nav never renders the sheet (bar.html:64-66). Document that the Trail must carry the nav, or render it. TestTheStackedHeaderStartsAt44rem and TestEverythingAfterTheMarkerIsOptIn can't see this.
  2. MEDIUM chrome.css:906-915, :939: folded Back is a 30×44 target. Use min-inline-size: 44px; justify-content: center, and assert the width ≥ 44 when folded.
  3. LOW chrome.css:486, :515, :528: rem breakpoints disagree with the px ones at non-16 px default font sizes (20 px → 880). Use px or say why not.
  4. LOW bar.html:30, chrome.css:906-917: on public pages (empty App.Home) the brand is an accent-coloured span that looks like a link and is empty when folded. The sign-in button isn't hidden on compact. Don't accent span[estilo-bar-brand]; decide the rest in P1.
  5. LOW chrome.css:228, menu/menu.css:128: the rail account trigger stays 40 px, and menubar titles outside a wide stacked bar (Sheets, Slides) stay 32 px on touch. Raise them, or narrow the claim.

Checked and fine: desktop with a mouse is unchanged; menus scroll; disclosure semantics, Esc and outside click come from chrome.js; Back keeps its name when folded; RTL works through :dir(rtl)/logical insets; there's no-script parity; no FOUT; no strings; the checksum updates are justified.

Fixes for Fable's review of c56314e: tip 4757ccc, hub CI passed

One commit per item. Each item's new test was run against the commit before its fix and failed there.

  1. HIGH, the 704px move (531594c). Now keyed on compact, so it reaches Docs only. - Every other stacked bar keeps main's rules exactly: the 56px header from 800px, and below 800px the two-row bar with its Menu sheet. That covers Mapa and Fichas. - A media query can't ask which bar it is. So the 704–800px band for a compact bar is a copy of the header block that CSS() makes at init, with every selector scoped as :is(S):is([estilo-bar~="compact"], [estilo-bar~="compact"] *). Three hand rules undo the two-row layout there. The block is written once, so the copy can't drift (TestOnlyACompactBarMovesTo704px checks rule for rule and declaration for declaration). - The phone-sideways clause applies only to compact bars, and they override the 56px header's rules past 800px. - A compact bar with Nav draws the Menu sheet for it before the trail and shows it in the compact row (TestACompactBarWithNavKeepsItsSheet). - New browser cases use stand-ins built from Mapa's and Fichas' frame.go: Menubar, Lead, Nav and actions, one of them WideOnly. They run at 390, 768 and 844×390 with touch, and at 1280 with a mouse. They check that every nav link and action is in the bar or the open sheet, that the header matches what it publishes, and that it is 56px exactly from 800px. - On c56314e those cases fail: the nav is out of reach at 768, and the header is 107.8px at 844×390. Here they pass. - Before and after. The stand-ins were rendered on main, on c56314e and on the fix: polish-audit/docs-phone-web/build/p0-estilo/fable-fixes/compare-*.png (side by side) and standins/{main,c56314e,fix}/. - With a mouse, at 768 and 1280 (closed and with the Menu sheet or File open), and at 820, 900, 1024 and 1280 (closed and with File open), the fix is pixel-identical to main: 8 of 8 and 16 of 16. - On touch, closed, at 844×390, it is also identical. - On touch at 768 the only differences are the intended ones: 44px triggers and menu row, and 44px rows with no ⌘ hints in open menus. - These are faithful stand-ins, not the apps' running templates. Fichas also vendors its own copy of chrome.css, so it sees nothing until it re-vendors.
  2. MEDIUM (840b8a5). Folded Back is min-inline-size: 44px, centred. The browser check asserts at least 44×44 when folded; it measured 30×44 on c56314e.
  3. LOW (66b599e). The breakpoints are px: 703.98px and 704px, plus 480px for a phone held sideways, in the CSS, the generated band and chrome.js. A test refuses any rem breakpoint.
  4. LOW (a0e58d9). Only a[estilo-bar-brand] takes the accent. The browser check compares the public page's brand colour with the accent: equal on c56314e, different now. Where the public page's Sign in sits in the compact row is noted for P1.
  5. LOW (4757ccc). On a coarse pointer the rail's account row and every menubar title outside the wide header are now 44px. The narrow stacked bar publishes 97px without script. Sheets and Slides get 44px menubar titles on touch when they re-pin.

Also green locally: the unit tests for chrome, menu, savestatus and internal/lint; the spacing check; TestTheCompactBarInRealEngines and TestStackedTitleFitsItsTitle in Chromium 151. WebKit still can't be driven here; that check is still planned for P1 on the simulator.

Delta review by Claude Fable (claude-fable-5-2) of c56314e..4757ccc — APPROVE AFTER FIXES. The 531594c approach is sound. The copy is generated in Go at init and served as ordinary CSS: no runtime JS, no post-paint jump, no CSP exposure. It's identical without script.

  1. MEDIUM chrome/chrome.js:149-158: narrow is now (max-width: 799.98px), so the script publishes the measured height for a compact bar too. Load below 704 (52 px), widen into 704–799, and the bar reads the stale inline 52 px and republishes it, so it sticks at 52 instead of 56. Don't publish for compact bars ([estilo-bar~="stacked"]:not([estilo-bar~="compact"])). Add a browser case that resizes 650 → 768 and expects 56.
  2. LOW: the scoped copy adds (0,1,0) specificity, so border: 0 (chrome.css:643) beats the forced-colors ButtonBorder rule (~:813) in the band. Wrap the scope in :where(...) in scopeSelector.
  3. LOW, check: menu/menu.css:160 makes every menubar title outside a stacked bar 44 px on coarse pointers. Docs main's in-page menubar (show.html:1189) would grow on iPad unless P1 moves it into Bar.Menubar. Confirm at the Docs re-pin.
  4. NIT chrome.css:524-525, :787: the comments name compactBand; the function is buildCSS.

Note for Paul: until Mapa and Fichas go compact, a small phone held sideways under 800 px gets their 97 px two-row header.

Fixes for Fable's delta review of 4757ccc: tip a39f798, hub CI passed

  1. MEDIUM, 21f9bc1. chrome.js now publishes the measured height only for a stacked bar that is not compact. It filters on the attribute in plain JS, because chrome.test.mjs's fake DOM has no :not(). A new browser case loads a compact bar at 650 px and widens it to 768 px. It went 52 → 52 before the fix and goes 52 → 56 after.
  2. LOW, fdcf06f. scopeSelector now wraps the scope in :where(...), so the copy keeps each rule's own specificity. - At that weight the copy no longer beats the narrow two-row rules below 800 px. Two hand rules in the band restore the stack and the menu row's margins. - New browser checks: - Forced colours at 768 and 1280: the primary control's border was 0 px at 768 before and is 1 px now. Emulation is asserted, so the check isn't blind. - In every wide case, the title sits over the menu row. - The compact bar at 768 and 844×390, and the folded phone bar, are pixel-identical to 4757ccc. - The browser checks for items 1 and 2 were added in the item-1 commit.
  3. NIT, a39f798. The two comments now name buildCSS.

Locally: the chrome, menu, savestatus and internal/lint tests and the spacing check pass, and TestTheCompactBarInRealEngines and TestStackedTitleFitsItsTitle pass in Chromium 151.

Carried into P1: at the Docs re-pin, confirm how 44 px menubar titles on touch (menu.css) land on Docs' menus. Docs already passes its menubar as Bar.Menubar, so the wide header keeps its 24 px titles. Check any in-page menubar CSS in show.html then (the line cited, 1189, doesn't match origin/main today).