Skip to content

fix: scroll animation not rendering — replace astro:page-load#17

Merged
terisuke merged 1 commit into
mainfrom
develop
Mar 12, 2026
Merged

fix: scroll animation not rendering — replace astro:page-load#17
terisuke merged 1 commit into
mainfrom
develop

Conversation

@terisuke

Copy link
Copy Markdown
Contributor

Summary

  • astro:page-load event only fires when Astro ViewTransitions is enabled
  • Without ViewTransitions, IntersectionObserver never initializes
  • All .fade-in-section and .section-animate elements stayed at opacity: 0, making the entire page appear blank
  • Replaced with DOMContentLoaded fallback pattern in MarketingLayout, index.astro, and FloatingCTA

Root cause

Previous implementation assumed ViewTransitions was active. It was not imported in BaseLayout.

Test plan

  • Verify all sections are visible on page load
  • Verify scroll animations still trigger correctly
  • Verify FloatingCTA appears after scrolling past hero

🤖 Generated with Claude Code

astro:page-load only fires when ViewTransitions is enabled.
Without it, IntersectionObserver never initializes, leaving all
.fade-in-section and .section-animate elements at opacity: 0.

Affects: MarketingLayout, index.astro, FloatingCTA.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying griftai with  Cloudflare Pages  Cloudflare Pages

Latest commit: 67f083a
Status: ✅  Deploy successful!
Preview URL: https://c49bb4cb.griftai.pages.dev
Branch Preview URL: https://develop.griftai.pages.dev

View logs

@terisuke terisuke merged commit 3dc1869 into main Mar 12, 2026
4 checks passed
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