Repository navigation
frontend(fix): let the hero H1 rise without fading so it counts as LCP - #583
Merged
Merged
Conversation
The landing H1 used hero-reveal, an opacity-and-rise entrance. Chrome skips text painted at opacity 0 when it picks the LCP element, and the fade runs on the compositor without repainting the text, so the H1 was not counted when it became visible. On desktop it was never counted and LCP fell back to the consent banner or the header wordmark. On a throttled phone it only counted when the web font swapped in, about 950ms after first paint. The H1 now uses hero-rise: the same 16px rise, 520ms curve, and 60ms delay without the fade, so it is the LCP element at first paint. The rest of the hero keeps hero-reveal and its stagger. Both entrances end on the same frame, so the landing visual baselines are unaffected; the settled landing captures differ by 0 pixels at both snapshot sizes. Measured on production builds in Chromium 151, median LCP went from 2244ms to 1290ms on a throttled 390px phone and from 212ms to 136ms on desktop (first visits). Closes #523 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: Ducksss/payload-components/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
This was referenced Oct 1, 2026
Ducksss
added a commit
that referenced
this pull request
Oct 4, 2026
…bile LCP (#598) On a first visit at 360-430px, the consent banner's description paragraph could out-size the landing H1. Because the banner paints after hydration, it then became the final LCP entry, about 3.4s on a throttled phone. Since #583 the H1 is opaque from first paint. A tighter description keeps the banner below the H1's area, so LCP stays at first contentful paint. The new copy keeps all four disclosures: which tools, why, what Decline does, and what runs regardless. It replaces the static-HTML banner approach in #590, which reached about 2.6s with 576 added lines. Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #523.
The landing
<h1>now useshero-riseinstead ofhero-reveal: the same 16px rise, 520ms curve, and 60ms delay, but no opacity fade. The headline is opaque from its first frame. The eyebrow, subheadline, install command, and links keephero-revealand their 0–190ms stagger.src/app/globals.cssadds thehero-risekeyframes and a.hero-riseclass next tohero-reveal.src/components/site/sections/HeroSection.tsxswaps the H1's class.What the measurement found
The issue expected the fade to delay LCP by about its own length. It was worse than that: Chrome didn't count the faded H1 at first paint at all.
LCP before and after
Times are in ms: the median, with p75 in brackets, over 20 interleaved cold loads per build. Δ is the paired median difference with its 95% bootstrap CI.
<p>→ H1<p>→ banner<p>When the H1 itself was counted
Method:
pnpm build:e2ethennext start, served side by side:origin/mainPerformanceObserver('largest-contentful-paint')once the page settles, meaning 1.5s after the consent banner appears, or 3–4s when there's no banner.Verification
pnpm test:release: not run in full locally; CI runs the gate. Run locally:pnpm lint,pnpm exec tsc --noEmit, and Prettier on both files pass.pnpm run test:int: 64 files, 794 tests passed (1 file and 1 test skipped).PLAYWRIGHT_SERVER_MODE=production pnpm test:e2e tests/e2e/frontend.e2e.spec.ts tests/e2e/a11y.e2e.spec.ts, against apnpm build:e2ebuild: 171 passed, and 1 was skipped: the landing screenshot contract, which only runs on Linux. One more, the/docs/components/content-rowsroute smoke check, hit the 180s timeout inside itsgrantConsentbeforeEachhook (a singleaddInitScriptcall) before it loaded the page. It passed on an isolated rerun in 5.1s.landing page keeps its desktop and mobile visual contractdoes: consent granted, reduced motion,animations: 'disabled', full page, at 1280×720 and 390×900. I took two captures from each build, then repeated the set with the consent banner showing.opacity: 1,translateY(0)), solanding-home-*-chromium-linux.pngshouldn't need a re-mint. The Linuxrelease-gateon this PR compares against them. If it flags a difference, the mint goes throughvisual-baselines.yml.Registry Checklist
public/routput out of git. (No registry changes.)Notes
/aboutand/brand-guidestill fade their H1s in. Both usehero-reveal, with a 180ms delay on the H1 and 340ms on the lead paragraph. That's the same guardrail breach, left for a follow-up that can reuse.hero-rise.🤖 Generated with Claude Code