Skip to content

frontend(fix): tighten the consent banner copy so the H1 stays the mobile LCP - #598

Merged
Ducksss merged 1 commit into
mainfrom
claude/consent-copy-lcp
Oct 4, 2026
Merged

Ducksss merged 1 commit into
mainfrom
claude/consent-copy-lcp

Conversation

@Ducksss

@Ducksss Ducksss commented Oct 4, 2026

Copy link
Copy Markdown
Owner

What

This changes one string, Consent.description in messages/en.json:

  • Before: We use Google Analytics and PostHog to see which components and docs people actually use. Decline and neither one loads — no cookie, no identifier. Page-speed measurement runs either way and stores nothing.
  • After: Google Analytics and PostHog show us which components and docs get used. Decline and neither loads: no cookie, no identifier. Page-speed checks run either way and store nothing.

All four disclosures stay: which tools, why, what Decline does, and what runs regardless. No layout, role, label or key changes, so the Crowdin and i18n:check gates stay green.

Why

On a first visit at 360–430px, the banner's description paragraph could be larger than the landing H1. It paints after hydration, so it became the final LCP entry. #590 measured that at about 3.36s on a throttled phone, versus about 1.4s for first paint. Since #583 the H1 is opaque from first paint. With a smaller banner, the H1 stays the LCP element.

This supersedes #590. That PR moved the banner into static HTML with an inline reveal script (+576/−64 across 9 files) and reached about 2.6s. This one-string change does better: LCP equals first paint.

Measured

Production build:e2e of this branch, Playwright on Chromium. The profile approximates Lighthouse mobile: 4× CPU, 150 ms RTT, 1.6/0.75 Mbps, DPR 1.75. First visit with the banner shown, median of 3 loads per width:

Width FCP LCP LCP element
360×800 1,468 ms 1,468 ms H1
390×844 1,360 ms 1,360 ms H1
412×823 1,392 ms 1,392 ms H1
430×932 1,396 ms 1,396 ms H1

The description paragraph's box is 17–20% smaller with the new copy at every width. pnpm i18n:check and prettier pass.

No issue closed.

🤖 Generated with Claude Code

…bile LCP

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]>
Copilot AI balanced review requested due to automatic review settings October 4, 2026 07:25
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
payload-components Ready Ready Preview Oct 4, 2026 7:28am UTC
payload-components-97bf Ready Ready Preview Oct 4, 2026 7:28am UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: Ducksss/payload-components/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d24b9928-ea62-4407-b71b-69cc2f870a80
📥 Commits

Reviewing files that changed from the base of the PR and between 599e179 and dee1b6b.

📒 Files selected for processing (1)
  • messages/en.json
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

2 active deployments
Preview – payload-components — dee1b6b9 Deployed Oct 4, 2026 by vercel[bot]
Preview – payload-components-97bf — dee1b6b9 Deployed Oct 4, 2026 by vercel[bot]
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.

2 participants