Skip to content

[Claude first-pass] Fix PageHeader collapsed action alignment, phantom gap, clip - #346

Draft
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-345
Draft

claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-345

Conversation

@claude

@claude claude Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What this fixes

First-pass fix for the three findings in #345 (Fable design review of PageHeader collapsed + Reveal).

1. Wrapped action now right-aligns. Added className="ml-auto" to the action Reveal. When the action wraps to its own line it shrink-wraps, so justify-between on the header row landed it flush with the h1's left edge. ml-auto absorbs the leading free space and pushes it right under the description. In the single-line case the row already right-aligns the action, so ml-auto is a no-op there.

2. Phantom 12px row gap while collapsed. The collapsed action Reveal is 0px tall but is still a wrapped flex line, so the row's gap-y-3 survived the tuck (the 96px-vs-84px band in the report). The header row now uses gap-y-0 when collapsed and gap-y-3 otherwise, with transition-[row-gap] duration-base ease-out-cubic so the gap opens/closes with the action instead of snapping.

3. Mid-glyph clip on collapse/expand. Took the optional suggestion: the Reveal inner now transitions transform alongside opacity and carries a 4px -translate-y-1 while closed, so the overflow-hidden clip reads as a slide rather than a horizontal cut through the glyphs in the first frames. Steady states (translate-y-0 when open; inert 0-height when closed) are unchanged.

What I verified

  • npm run typecheck, npm run lint, npm run build — all pass.
  • prettier --check on both touched files — clean.
  • page-header.test.tsx and reveal.test.tsx — 5/5 pass.

What a reviewer should double-check

  • This is a visual change; I could not run the VRT suite here. Please confirm the visual-regression baselines. Changes 1 and 2 only move pixels in the collapsed + wrapped-action configuration, which no existing story exercises (stories use single-button actions and mostly the open state), so I'd expect baselines to hold — but verify at 1280px and 390px, light and dark, per the report.
  • Change 3 touches the shared Reveal, so it also affects PageSubheader's expand/collapse. The translate is steady-state-neutral, but please eyeball the subheader animation to confirm the 4px slide feels right there too and doesn't nudge the border-t rule noticeably.
  • Confirm -translate-y-1 (4px) is the right amount — "a few px" per the issue; easy to dial to -translate-y-0.5.

Closes #345

🤖 Generated with Claude Code

…m gap, clip

Addresses the three findings from the Fable review in #345:

1. ml-auto on the action Reveal right-aligns a wrapped action under the
   description (it shrink-wraps to its own line, so justify-between alone
   left it at the h1's left edge); no-op when the action stays on the row.
2. Row gap drops to gap-y-0 while collapsed and tweens via transition-[row-gap]
   so the 0px-tall-but-still-wrapped action line stops leaving a phantom 12px
   band under the h1.
3. A few px of translate-y alongside the Reveal's opacity so the overflow clip
   reads as a slide rather than a mid-glyph horizontal cut in the first frames.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Visual regression report

26 changed · 0 added · 0 removed · 3114 unchanged

Status Screenshot Diff
🔄 Changed mobile/dark/app-chrome-pagecard--default.png 2.72%
🔄 Changed mobile/dark/app-chrome-pagecard--transition-lab.png 0.09%
🔄 Changed mobile/dark/app-chrome-pagecard--what-the-card-fixes.png 3.50%
🔄 Changed mobile/dark/app-chrome-pageheader--aligns-with-card-content.png 0.52%
🔄 Changed mobile/dark/app-chrome-pageheader--with-actions.png 2.88%
🔄 Changed mobile/dark/app-chrome-pageinset--the-rule-it-draws.png 1.30%
🔄 Changed mobile/dark/app-chrome-pagesubheader--closed.png 2.31%
🔄 Changed mobile/dark/app-chrome-pagesubheader--interactive.png 2.31%
🔄 Changed mobile/dark/app-chrome-pagesubheader--long-title.png 5.53%
🔄 Changed mobile/dark/app-chrome-pagesubheader--open.png 2.58%
🔄 Changed mobile/dark/app-chrome-section-navigation--deep-link.png 3.79%
🔄 Changed mobile/dark/app-chrome-section-navigation--default.png 2.09%
🔄 Changed mobile/dark/app-chrome-section-navigation--from-marketplace.png 0.41%
🔄 Changed mobile/light/app-chrome-pagecard--default.png 2.79%
🔄 Changed mobile/light/app-chrome-pagecard--transition-lab.png 0.51%
🔄 Changed mobile/light/app-chrome-pagecard--what-the-card-fixes.png 3.59%
🔄 Changed mobile/light/app-chrome-pageheader--aligns-with-card-content.png 0.48%
🔄 Changed mobile/light/app-chrome-pageheader--with-actions.png 2.94%
🔄 Changed mobile/light/app-chrome-pageinset--the-rule-it-draws.png 1.33%
🔄 Changed mobile/light/app-chrome-pagesubheader--closed.png 2.38%
🔄 Changed mobile/light/app-chrome-pagesubheader--interactive.png 2.38%
🔄 Changed mobile/light/app-chrome-pagesubheader--long-title.png 5.08%
🔄 Changed mobile/light/app-chrome-pagesubheader--open.png 2.42%
🔄 Changed mobile/light/app-chrome-section-navigation--deep-link.png 5.82%
🔄 Changed mobile/light/app-chrome-section-navigation--default.png 2.16%
🔄 Changed mobile/light/app-chrome-section-navigation--from-marketplace.png 0.43%

Next steps

  • Approve all 26 changes — check this box and the check reruns and passes automatically (write access required)

Want to look first? Download the visual report, unzip it, and open index.html — review each change with swipe, overlay, and blink views; approving as you go builds a precise command, and one button copies it and brings you back to this PR.

Approve by comment instead

Post one of these as a PR comment (from an account with write access):

/vrt approve all

Pinned to exactly this commit: /vrt approve all@49bfa64

Or approve screenshots individually (edit to taste):

/vrt approve mobile/dark/app-chrome-pagecard--default.png@49bfa64 mobile/dark/app-chrome-pagecard--transition-lab.png@49bfa64 mobile/dark/app-chrome-pagecard--what-the-card-fixes.png@49bfa64 mobile/dark/app-chrome-pageheader--aligns-with-card-content.png@49bfa64 mobile/dark/app-chrome-pageheader--with-actions.png@49bfa64 mobile/dark/app-chrome-pageinset--the-rule-it-draws.png@49bfa64 mobile/dark/app-chrome-pagesubheader--closed.png@49bfa64 mobile/dark/app-chrome-pagesubheader--interactive.png@49bfa64 mobile/dark/app-chrome-pagesubheader--long-title.png@49bfa64 mobile/dark/app-chrome-pagesubheader--open.png@49bfa64 mobile/dark/app-chrome-section-navigation--deep-link.png@49bfa64 mobile/dark/app-chrome-section-navigation--default.png@49bfa64 mobile/dark/app-chrome-section-navigation--from-marketplace.png@49bfa64 mobile/light/app-chrome-pagecard--default.png@49bfa64 mobile/light/app-chrome-pagecard--transition-lab.png@49bfa64 mobile/light/app-chrome-pagecard--what-the-card-fixes.png@49bfa64 mobile/light/app-chrome-pageheader--aligns-with-card-content.png@49bfa64 mobile/light/app-chrome-pageheader--with-actions.png@49bfa64 mobile/light/app-chrome-pageinset--the-rule-it-draws.png@49bfa64 mobile/light/app-chrome-pagesubheader--closed.png@49bfa64 mobile/light/app-chrome-pagesubheader--interactive.png@49bfa64 mobile/light/app-chrome-pagesubheader--long-title.png@49bfa64 mobile/light/app-chrome-pagesubheader--open.png@49bfa64 mobile/light/app-chrome-section-navigation--deep-link.png@49bfa64 mobile/light/app-chrome-section-navigation--default.png@49bfa64 mobile/light/app-chrome-section-navigation--from-marketplace.png@49bfa64

No approvals workflow installed? Checkbox and commands still count — use "Re-run failed jobs" afterwards.

📦 Download the full visual report (artifact vrt-report) · workflow run

Baseline from this run · commit 49bfa64

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PageHeader collapsed: wrapped action alignment, phantom row gap, mid-glyph clip

0 participants