Repository navigation
fix(templates): keep the preview-exit pill out of the mobile content column - #398
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (100)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…column
On the chrome-free preview routes the exit affordance is `fixed`, so it
floats over the concept it describes. Centred at 390px with the full
"{title} · Concept preview" label it spanned most of the single content
column and sliced through a band of hero content — the painted-contrast pass
in templates-a11y found it first, reading the pill's own glyphs as ink
belonging to the badge underneath and scoring that pairing at 1.00:1.
At narrow widths it now sits in the bottom-right corner and drops the concept
name from the VISIBLE label only: the sr-only span keeps it in the accessible
name, so the link still announces which concept it leaves, and the "Concept
preview" disclosure stays on screen. From `sm` up there is room for the full
pill in the middle, unchanged.
templates.e2e.spec.ts gains the guard this had been missing entirely — the
only exit from a chrome-free route had no test at all. It pins the href, the
full accessible name, the corner placement at 390, and the centred full-width
pill from sm up.
Darwin mobile baselines re-minted in production server mode. All 50 change,
each by 0.13-0.80% of pixels confined to the pill band (x 97-373, y 770-836)
with no page-height change, so nothing shifted. Desktop baselines are
untouched by construction.
Co-Authored-By: Claude Opus 5 <[email protected]>
65fa508 to
2087269
Compare
…pt's footer
The preview-exit affordance is `position: fixed`. Mid-page that is harmless —
scroll on and the content moves out from under it. At the END of the document
there is no scroll left, so whatever it covers there is covered permanently,
and on five of the ten concepts that was the footer's attribution line
("Composed from open-source Payload blocks"). #398 moved the pill out of the
mobile content column; this is the other half, and it applies at both widths.
preview-exit-clearance.css reserves a strip at the bottom of the last band for
the pill to land on. Every shell ends in exactly one <footer>, so one rule
covers all ten concepts with no per-shell edits, scoped with :has() to the
routes that render the pill.
The strip is a transparent bottom BORDER rather than padding or a spacer child:
padding can only replace what each footer already sets, which would quietly
restyle ten hand-tuned footers; a ::after spacer becomes a flex/grid item in
the footers laid out that way and would land in a column instead of at the
end; a border is additive, layout-neutral, and `background-clip: border-box`
paints the footer's own background across it, so no seam appears. Verified on
saas-launch (footer sets tokens only) and portfolio-solo (sets no background at
all) as well as the eight that paint their own.
The e2e guard measures TEXT NODE rects, not element boxes — a <p> box can
extend under the pill while its rendered lines stop short, and the reverse. It
scrolls with `behavior: instant` because globals.css sets `scroll-behavior:
smooth` on html: a plain scrollTo animates, and the first version of this test
measured the page still at the top and reported hero badges as covered. With
the clearance removed it fails naming the exact footer lines on all five
affected concepts, so it is not vacuous. The visual baselines cannot stand in
for it — they would only show that the page height changed, and a reviewer
re-minting them would accept the regression.
All 100 darwin baselines re-minted in production server mode; each grew by
exactly 72px (4.5rem) at unchanged width, confirming the strip is the only
change.
Co-Authored-By: Claude Opus 5 <[email protected]>
…pt's footer
The preview-exit affordance is `position: fixed`. Mid-page that is harmless —
scroll on and the content moves out from under it. At the END of the document
there is no scroll left, so whatever it covers there is covered permanently,
and on five of the ten concepts that was the footer's attribution line
("Composed from open-source Payload blocks"). #398 moved the pill out of the
mobile content column; this is the other half, and it applies at both widths.
preview-exit-clearance.css reserves a strip at the bottom of the last band for
the pill to land on. Every shell ends in exactly one <footer>, so one rule
covers all ten concepts with no per-shell edits, scoped with :has() to the
routes that render the pill.
The strip is a transparent bottom BORDER rather than padding or a spacer child:
padding can only replace what each footer already sets, which would quietly
restyle ten hand-tuned footers; a ::after spacer becomes a flex/grid item in
the footers laid out that way and would land in a column instead of at the
end; a border is additive, layout-neutral, and `background-clip: border-box`
paints the footer's own background across it, so no seam appears. Verified on
saas-launch (footer sets tokens only) and portfolio-solo (sets no background at
all) as well as the eight that paint their own.
The e2e guard measures TEXT NODE rects, not element boxes — a <p> box can
extend under the pill while its rendered lines stop short, and the reverse. It
scrolls with `behavior: instant` because globals.css sets `scroll-behavior:
smooth` on html: a plain scrollTo animates, and the first version of this test
measured the page still at the top and reported hero badges as covered. With
the clearance removed it fails naming the exact footer lines on all five
affected concepts, so it is not vacuous. The visual baselines cannot stand in
for it — they would only show that the page height changed, and a reviewer
re-minting them would accept the regression.
All 100 darwin baselines re-minted in production server mode; each grew by
exactly 72px (4.5rem) at unchanged width, confirming the strip is the only
change.
Co-Authored-By: Claude Opus 5 <[email protected]>
…pt's footer (#404) The preview-exit affordance is `position: fixed`. Mid-page that is harmless — scroll on and the content moves out from under it. At the END of the document there is no scroll left, so whatever it covers there is covered permanently, and on five of the ten concepts that was the footer's attribution line ("Composed from open-source Payload blocks"). #398 moved the pill out of the mobile content column; this is the other half, and it applies at both widths. preview-exit-clearance.css reserves a strip at the bottom of the last band for the pill to land on. Every shell ends in exactly one <footer>, so one rule covers all ten concepts with no per-shell edits, scoped with :has() to the routes that render the pill. The strip is a transparent bottom BORDER rather than padding or a spacer child: padding can only replace what each footer already sets, which would quietly restyle ten hand-tuned footers; a ::after spacer becomes a flex/grid item in the footers laid out that way and would land in a column instead of at the end; a border is additive, layout-neutral, and `background-clip: border-box` paints the footer's own background across it, so no seam appears. Verified on saas-launch (footer sets tokens only) and portfolio-solo (sets no background at all) as well as the eight that paint their own. The e2e guard measures TEXT NODE rects, not element boxes — a <p> box can extend under the pill while its rendered lines stop short, and the reverse. It scrolls with `behavior: instant` because globals.css sets `scroll-behavior: smooth` on html: a plain scrollTo animates, and the first version of this test measured the page still at the top and reported hero badges as covered. With the clearance removed it fails naming the exact footer lines on all five affected concepts, so it is not vacuous. The visual baselines cannot stand in for it — they would only show that the page height changed, and a reviewer re-minting them would accept the regression. All 100 darwin baselines re-minted in production server mode; each grew by exactly 72px (4.5rem) at unchanged width, confirming the strip is the only change. Co-authored-by: Claude Opus 5 <[email protected]>
…r adoption, template a11y (#409) Brings main level with dev (137 commits). Headline items: - the component wall no longer crops blocks: per-breakpoint zoom pins the twins' inner layout width at 1280px (#392), and the 640-1023px band gets a 256px frame plus a widened fade (#399). Production was cutting content-quote, content-feature-media and content-feature-split by 88/79/78px on a tablet; measured on the live site, not inferred. Three viewport tests now assert the fit so a curated-at-one-width regression cannot recur silently. - prettier is adopted: config matched to the house style (#402), the tree formatted, and format:check gated in test:release and the CI lint step (#408). - template a11y and layout fixes (#394, #398, #404), consent gate split by provider (#400), axe now waits for the consent banner (#405), CodeQL double-escaping fix (#391). Tree is identical to dev by construction: branched from dev, reparented onto main, so the diff is exactly the main..dev delta with no squash-divergence conflicts.
Follow-up to #394, which is what found this: the painted-contrast pass read the pill's own glyphs as ink belonging to the badge underneath and scored that pairing at 1.00:1. That reading was an artefact — the fix there was to hide the pill for the captures, the way
tools/templates/capture.tsalready does for posters — but the overlap it exposed was real.The defect
The exit affordance on the chrome-free preview routes is
fixed, so it floats over the concept it describes. Centred at 390px with the full{title} · Concept previewlabel it spanned most of the single content column and cut through a band of hero content — on nonprofit-cause it sliced the "Working the Corrow since 2009" badge in half.The fix
At narrow widths the pill moves to the bottom-right corner and drops the concept name from the visible label only. The
sr-onlyspan keeps it in the accessible name, so the link still announces which concept it leaves, and the "Concept preview" disclosure stays on screen — which matters on a route that is shareable but noindexed. Fromsmup there is room for the full pill in the middle, unchanged.Test
templates.e2e.spec.tsgains the guard this had been missing entirely — the only exit from a chrome-free route had no test at all. It pins the href, the full accessible name (so a future tidy-up cannot quietly drop the title from the a11y tree along with the pixels), the corner placement at 390, and the centred full-width pill fromsmup.Baselines
Both platforms, same PR, scoped to mobile:
PLAYWRIGHT_SERVER_MODE=production, per the note in the workflow — a dev render is not pixel-identical).visual-baselines(run 30346879290) withspec: "templates-visual --grep mobile", merged as test(chore): mint Linux visual baselines #397. Exactly 50 files, all*-mobile-chromium-linux.png.The mint used
update=allon purpose: the pill change is 0.13–0.80% of pixels, comfortably undermaxDiffPixelRatio: 0.01, sochangedwould have rewritten nothing and left both platforms stale — the trap the workflow's own input comment warns about. I audited every rewritten file by decoding it against its committed version: at a perceptual threshold all 50 differ only inside the pill band (x 97-373, y 770-836) and no file changed size, confirming nothing shifted. Desktop baselines are untouched by construction.Verification
pnpm test:releasegreen on the final tree — batches 40 / 69 / 102 / 43 / 131, int 379 passed. The 102 is the visual suite passing against the freshly minted darwin images; the 131 includes the new guard.Known, not fixed here
Reserving space is the only thing that would stop a fixed affordance covering the last line of a concept's footer, where the occlusion is permanent rather than transient — you cannot scroll it out from under. That means padding inside ten separate shell footers (or a
:has()rule), it changes page height at both widths, and it therefore re-mints all 100 baselines on both platforms. Called out rather than bundled in.🤖 Generated with Claude Code