Skip to content

Show the homepage palm on first paint - #1535

Merged
manudeli merged 1 commit into
mainfrom
fix/home-palm-first-paint
Nov 22, 2026
Merged

manudeli merged 1 commit into
mainfrom
fix/home-palm-first-paint

Conversation

@manudeli

@manudeli manudeli commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The homepage now includes the palm’s first frame in the initial HTML, so it can appear with the sky without an image request. The still stays visible while the animated WebP loads and is hidden once playback starts, preventing the two sets of fronds from overlapping.

Visitors who prefer reduced motion see the still, as do visitors whose animated WebP fails to load.

Verification

  • The three hero media tests passed in Chromium. They cover the inlined first frame, delayed and failed animation requests, and reduced motion.
  • Checked the handoff at 390 px and 1512 px in Chromium. The still and animation have identical bounds.
  • Type checking and lint passed. The full local suite stopped when the sandbox denied the socket used by the tsx test runner.

Summary by CodeRabbit

  • Improvements
    • The home page’s hero media now respects reduced-motion preferences, showing a still image instead of preloading the animation when reduced motion is requested.
    • When animation is enabled, the still image remains visible until the animation is ready, helping prevent a blank or incomplete visual during loading.

Prepare the commit object for the fix/home-palm-first-paint pull request branch.
@changeset-bot

changeset-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f3e6e1a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The hero media now uses an inline still image and conditionally preloads an animated WebP when reduced motion is not requested. The tests cover server-rendered markup, animation loading, reduced-motion changes, viewport widths, and failed requests.

Changes: Hero media loading

Layer / File(s) Summary
Still-to-animation handoff
src/components/home/HeroPalmMedia.tsx
The component uses an inline still image and conditionally preloads the animation. It keeps the still visible until the animation loads and shows the animation only when motion is permitted and it has loaded.
Rendering and browser validation
tests/hero-media.test.ts
Tests check server-rendered markup, animation asset properties, the still-to-animation visibility change, reduced-motion preferences, multiple viewport widths, and failed animation requests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

Suggested reviewers: ladybluenotes, tannerlinsley

Merge Risk: Minimal · up to f3e6e

The homepage palm now appears on first paint with a still frame that hands off to the animation, and falls back to the still when the animation fails or reduced motion is requested. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Show the homepage palm on first paint" matches the main change. The PR inlines the palm's first frame into the initial HTML so it appears with the sky before the animated WebP loads. The ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Show the homepage palm on first paint" matches the main change. The PR inlines the palm's first frame into the initial HTML so it appears with the sky before the animated WebP loads. The title names the homepage palm and the first-paint goal, and it is short and specific. The summary also covers the reduced-motion and failed-animation fallbacks, which the title does not need to mention.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb58352a-c1a6-4072-b3ea-451085b85032
Commits

Reviewing files that changed from the base of the PR and between 5668b04 and f3e6e1a.

Files selected for processing: 3

  • src/components/home/HeroPalmMedia.tsx
  • src/components/home/hero-palm-cutout-still.webp
  • tests/hero-media.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com f3e6e1a Commit Preview URL

Branch Preview URL
Nov 22 2026, 02:23 PM

@manudeli
manudeli merged commit fabf130 into main Nov 22, 2026
8 checks passed
@manudeli
manudeli deleted the fix/home-palm-first-paint branch November 22, 2026 14:34
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.

1 participant