Skip to content

perf(landing): paint the hero without waiting for JavaScript - #241

Merged
gnacho merged 1 commit into
mainfrom
fix/239-nojs-reveal
Oct 29, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/239-nojs-reveal

Conversation

@gnacho

@gnacho gnacho commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Problem

With JavaScript disabled at 390x844, all 27 .reveal blocks stayed at opacity: 0, including .hero-sub, which is the LCP element. The page rendered blank. With JS enabled the hero waited for the script plus the .d1 to .d5 delays (up to 450 ms), which matches the 947 ms render delay Lighthouse reported on a 2.0 s LCP.

Changes

  • landing/index.html: the hero (eyebrow, h1, subtitle, actions, facts and sync widget) no longer carries reveal or the delay classes, so it paints with the HTML and CSS.
  • A <noscript> block after the stylesheet makes every .reveal block visible when scripts are off.
  • Cache-bust: styles.css?v=10, app.js?v=12.

Below-the-fold sections keep the scroll animation when JS is available.

Verification

  • New suite /tmp/opencode/verify-nxs-nojs.js, 22/22 twice: without JS at 360 and 390 px, 0 of 27 blocks hidden, subtitle at opacity 1, h1 painted, no overflow; with JS at 360, 390 and 1280 px, subtitle visible immediately, the last below-fold block still starts hidden and animates in on scroll, no console errors.
  • Previous suites against local: extras 55/55, install 62/62, slider 48/48.

Deployed and checked on https://nextsync.cloudless.club/ (production serves the noscript block).

Closes #239

@gnacho
gnacho merged commit d2322a5 into main Oct 29, 2026
2 checks passed
@gnacho
gnacho deleted the fix/239-nojs-reveal branch October 29, 2026 07:38
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.

landing: hero text only paints after JS runs (blank page without JavaScript)

1 participant