door pills: review fixes (Fable)
- Quiet controls are a full tap target on touch and narrow screens (2.75rem, as rastrillo's door ghost), restated in a media query because estilo's pinned rastrillo does not declare --rst-target and TestChromeUsesDefinedTokens refuses a token the pin lacks. - The pill's glow applies only at rest (:not(:active)), so rastrillo's pressed state still sinks. - Sent's "Use a different address" is a quiet text button, the card's secondary action. chrome.css's main hash updated for the door's rules only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+30
−5
chrome/chrome.css+12 −0chrome/chrome_test.go+1 −1chrome/door_test.go+1 −1chrome/screen_test.go+12 −0chrome/templates/signin.html+3 −2chrome/unchanged_test.go+1 −1
CI passed — run details
CI log
=== modcache === all modules verified === vet === CGO_ENABLED=0 go vet ./... CGO_ENABLED=0 go vet -tags browser ./... === fmt === === build === CGO_ENABLED=0 go build -buildvcs=false ./... === go-test === CGO_ENABLED=0 go test -count=1 ./... ok amadan.net/oficina/estilo.git/base 0.007s ok amadan.net/oficina/estilo.git/brand 0.003s ok amadan.net/oficina/estilo.git/busy 0.009s ok amadan.net/oficina/estilo.git/callui 0.004s ok amadan.net/oficina/estilo.git/chrome 1.047s ? amadan.net/oficina/estilo.git/cmd/oficina-notices [no test files] ok amadan.net/oficina/estilo.git/colophon 0.025s ok amadan.net/oficina/estilo.git/credits 0.006s ok amadan.net/oficina/estilo.git/credits/catalog 0.005s ok amadan.net/oficina/estilo.git/desk 0.004s ok amadan.net/oficina/estilo.git/googleimport 0.177s ok amadan.net/oficina/estilo.git/homeconnect 0.005s ok amadan.net/oficina/estilo.git/internal/lint 0.006s ? amadan.net/oficina/estilo.git/internal/tokencheck [no test files] ok amadan.net/oficina/estilo.git/menu 0.011s ok amadan.net/oficina/estilo.git/savestatus 0.131s ok amadan.net/oficina/estilo.git/sky 0.031s ok amadan.net/oficina/estilo.git/theme 0.012s
Intent
diff --git a/chrome/chrome.css b/chrome/chrome.css| index ade46e8..83a482f 100644 |
| --- a/chrome/chrome.css |
| +++ b/chrome/chrome.css |
| @@ -336,6 +336,10 @@ |
| [estilo-signin] :is([estilo-signin-form] [type="submit"], [estilo-signin-action]:not([estilo-signin-action~="quiet"])):not([hidden]) { |
| display: flex; inline-size: 100%; box-sizing: border-box; justify-content: center; align-items: center; |
| min-block-size: 44px; padding-inline: 18px; border-radius: 999px; font-weight: 600; text-decoration: none; |
| +} |
| +/* The glow lifts the pill only at rest: pressed, rastrillo's own pressed |
| + shadow draws it sinking. */ |
| +[estilo-signin] :is([estilo-signin-form] [type="submit"], [estilo-signin-action]:not([estilo-signin-action~="quiet"])):not([hidden]):not(:active) { |
| box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 1px 1px rgb(23 32 60 / 0.10), |
| 0 8px 18px -8px var(--estilo-signin-glow, light-dark(color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 80%, transparent), color-mix(in srgb, var(--rst-accent-fill, var(--rst-accent)) 30%, transparent))); |
| } |
| @@ -348,6 +352,14 @@ |
| min-block-size: 2.5rem; padding: 0 0.875rem; border-color: transparent; border-radius: 999px; background: transparent; box-shadow: none; |
| color: var(--rst-text-muted); font-size: calc(var(--rst-fs-base) * 0.9375); font-weight: 500; text-decoration: none; |
| } |
| +/* On touch, and on a narrow screen, a quiet control is a full tap target, |
| + as rastrillo's door draws its ghost (max(2.5rem, --rst-target), which is |
| + 2.75rem there). Restated rather than read: estilo's pinned rastrillo |
| + does not declare --rst-target, and every token chrome.css reads must be |
| + declared by the pin (TestChromeUsesDefinedTokens). */ |
| +@media (pointer: coarse), (max-width: 40rem) { |
| + [estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):not([hidden]) { min-block-size: 2.75rem; } |
| +} |
| [estilo-signin] :is([estilo-signin-action~="quiet"], [estilo-signin-forget] > button):is(:hover, :focus-visible) { background: var(--rst-ghost-face-hover, var(--rst-surface-2)); color: var(--rst-text); } |
| /* ── Bar stack (Docs' I2 editor header, spec 2026-11-11) ──────────────── |
diff --git a/chrome/chrome_test.go b/chrome/chrome_test.go| index 1bd6930..357b54d 100644 |
| --- a/chrome/chrome_test.go |
| +++ b/chrome/chrome_test.go |
| @@ -329,7 +329,7 @@ func TestSignInPages(t *testing.T) { |
| } |
| } |
| html = render(t, "estilo-signin-sent", SignInNotice{Icon: "/i.svg", Heading: label + "-sent", Body: label + "-body", Link: &Link{Href: "/signin", Label: label + "-again"}}) |
| - if !strings.Contains(html, esc(label)+"-sent") || !strings.Contains(html, `<a href="/signin">`+esc(label)+"-again") { |
| + if !strings.Contains(html, esc(label)+"-sent") || !strings.Contains(html, `<a rst-btn="ghost" estilo-signin-action="quiet" href="/signin">`+esc(label)+"-again") { |
| t.Fatal("sent page", html) |
| } |
| html = render(t, "estilo-signed-out", SignInNotice{Icon: "/i.svg", Heading: label + "-out", Body: label + "-body", Link: &Link{Href: "/signin", Label: label + "-in"}}) |
diff --git a/chrome/door_test.go b/chrome/door_test.go| index 8e1f331..3924719 100644 |
| --- a/chrome/door_test.go |
| +++ b/chrome/door_test.go |
| @@ -85,7 +85,7 @@ func TestTheDoorDrawsItsOwnCopy(t *testing.T) { |
| for _, want := range []string{ |
| "<h1>Check your email</h1>", |
| `<p estilo-signin-body role="status">If that address can sign in here, we’ve sent it a link. It works once and expires in 15 minutes.</p>`, |
| - `<a href="/signin?return_to=%2Fm%2Fabc">Use a different address</a>`, |
| + `<a rst-btn="ghost" estilo-signin-action="quiet" href="/signin?return_to=%2Fm%2Fabc">Use a different address</a>`, |
| } { |
| if !strings.Contains(html, want) { |
| t.Errorf("sent lacks %q:\n%s", want, html) |
diff --git a/chrome/screen_test.go b/chrome/screen_test.go| index c806d05..a791e54 100644 |
| --- a/chrome/screen_test.go |
| +++ b/chrome/screen_test.go |
| @@ -234,6 +234,18 @@ func TestTheDoorsButtonsArePills(t *testing.T) { |
| t.Errorf("signed-out lacks %q:\n%s", want, out) |
| } |
| } |
| + // Sent: Use a different address is the card's quiet secondary action. |
| + sent := render(t, "estilo-signin-sent", SignInNotice{Icon: "/i.svg", App: "Docs"}.Sent("/signin")) |
| + if !strings.Contains(sent, `<a rst-btn="ghost" estilo-signin-action="quiet" href="/signin">`) { |
| + t.Errorf("sent's way back is not a quiet button:\n%s", sent) |
| + } |
| + // Quiet controls keep the touch target; pressing a pill drops its glow, |
| + // so rastrillo's pressed state still sinks. |
| + for _, want := range []string{"@media (pointer: coarse), (max-width: 40rem) {\n [estilo-signin] :is([estilo-signin-action~=\"quiet\"], [estilo-signin-forget] > button):not([hidden]) { min-block-size: 2.75rem; }", `:not([hidden]):not(:active) {`} { |
| + if !strings.Contains(src, want) { |
| + t.Errorf("chrome.css lacks %q", want) |
| + } |
| + } |
| // The smart door's buttons are rastrillo's: no estilo hook reaches them. |
| screen := renderScreen(t, "estilo-signin-screen", docsScreen(standInState{})) |
| for _, hook := range []string{"estilo-signin-action", "estilo-signin-form", "estilo-signin-forget"} { |
diff --git a/chrome/templates/signin.html b/chrome/templates/signin.html| index 80a9066..8bb4a2d 100644 |
| --- a/chrome/templates/signin.html |
| +++ b/chrome/templates/signin.html |
| @@ -77,12 +77,13 @@ |
| {{define "estilo-signin-screen-title"}}{{with .State}}{{if not .Unavailable}}{{template "signin-title" (dict "State" $.State "Brand" (dict "Name" $.App) "L" $.L)}}{{end}}{{end}}{{end}} |
| {{/* estilo-signin-sent: replaces the form once a link has been sent. Link |
| - goes back to the form, keeping the return. Data: chrome.SignInNotice. */}} |
| + goes back to the form, keeping the return: a quiet text button, the |
| + card's secondary action. Data: chrome.SignInNotice. */}} |
| {{define "estilo-signin-sent"}}{{template "estilo-door-open" .}} |
| <h1>{{.Heading}}</h1> |
| <p estilo-signin-body role="status">{{.Body}}</p> |
| {{- with .Link}} |
| - <p><a href="{{.Href}}">{{.Label}}</a></p> |
| + <p><a rst-btn="ghost" estilo-signin-action="quiet" href="{{.Href}}">{{.Label}}</a></p> |
| {{- end}} |
| {{template "estilo-door-close"}}{{end}} |
diff --git a/chrome/unchanged_test.go b/chrome/unchanged_test.go| index 2437006..4be4221 100644 |
| --- a/chrome/unchanged_test.go |
| +++ b/chrome/unchanged_test.go |
| @@ -80,7 +80,7 @@ const barStackMarker = "\n/* ── Bar stack" |
| // feat/door-pills, for the door's rules only (the door's buttons drawn as |
| // pills, Paul 2026-11-21): no bar rule changed. |
| const ( |
| - mainChromeCSS = "94f890f79fc851e05f7ee96bb02147aa34596781ef5727ee41fc45bd9bbf9620" |
| + mainChromeCSS = "d3fd4b3440932c3d797be502bfe6d1e450ecd21b26d5d3913069e8368446d29e" |
| mainMenuCSS = "6b3435a18591d20ad62b40df3e64e159b501f9d1c183b2f42aa32b4faa9c0669" |
| ) |