Repository navigation
fix(site): hydrate FeaturesSection on idle so scroll entrance animation runs - #259
Merged
Merged
Conversation
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.
After switching
FeaturesSectionto defaultvisible = truefor SSR/no-JS visibility in #258,client:visibleprevented the island from hydrating until the section had already entered the viewport, so itsIntersectionObservernever armed the scroll entrance animation.Switching
FeaturesSectiontoclient:idlehydrates it in the background before the user scrolls down, keeping SSR and no-JS fully visible while restoring the scroll-triggered drop and slide-in animations.Summary
site/src/pages/index.astro: change<FeaturesSection client:visible />to<FeaturesSection client:idle />with an inline comment explaining the SSR +IntersectionObserverinteraction.Evidence
be14321:pnpm --dir site build(astro check+astro build) passed with 0 errors, 0 warnings, 0 hints across 18 files.Merge danger
Two-way door. Single-line hydration directive change on one island in
site/src/pages/index.astro; zero layout or SSR output change.Decisions
client:idleoverclient:visible={{ rootMargin }}so fast scrolling cannot outrun hydration before the observer arms, without blocking hero LCP.Not in this change
FeaturesSection.tsxanimation timings or SSR defaults.Agents
Note
Low Risk
Single Astro island hydration directive on the marketing homepage; no logic, layout, or SSR markup changes.
Overview
Fixes FeaturesSection scroll entrance animations that stopped firing after SSR visibility was improved in a prior change.
On
index.astro, the island hydration directive moves fromclient:visibletoclient:idle(with a short inline comment).client:visibleonly hydrated once the section was already in view, so itsIntersectionObservernever had time to arm before scroll.client:idlehydrates in the background after load, preserving full SSR/no-JS visibility without racing the user’s scroll to the features block.Reviewed by Cursor Bugbot for commit be14321. Bugbot is set up for automated code reviews on this repo. Configure here.