Repository navigation
feat(site): trigger one-shot feature card entrance when description is visible - #260
Merged
Merged
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-site-features-css-scroll-motion-uzzy-site.cronos-b0a.workers.dev (commit 74e238e)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit eec1d1a. Configure here.
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.

The
FeaturesSectionentrance animation previously relied on ReactuseEffect+IntersectionObserveron the whole section, which fired too early (finishing before the cards reached reading position) or skipped animating on refresh.This removes React hydration (
useEffect/useState) fromFeaturesSectioncompletely and triggers each card's one-shot entrance transition once its own description enters the viewport (threshold: 0.8), cascading on desktop and revealing one by one on mobile/tablet.Summary
site/src/components/FeaturesSection.tsx: pure static markup (zerouseEffect, zerouseState), tagging each<article data-feature-card>and its description<p data-feature-trigger>.site/src/pages/index.astro: dropclient:*on<FeaturesSection />and add a small Astro<script>that setsdata-feature-pendingand removes it once per card when its description is 80% visible (prefers-reduced-motion: reduceskips hiding).site/src/styles/global.css: one-shot500ms var(--ease-out-strong)transitions for.feature-popover(opacity+scalefromorigin-top, preserving-translate-x-1/2) and.feature-notifs(opacity+translate: 56px 0to0 0), with desktop-only stagger (0ms,90ms,160ms).Evidence
pnpm --dir site build(astro check+astro build) passed with 0 errors, 0 warnings, 0 hints across 18 files.astro preview(production build):1280x800): stays pending while only card tops peek in, reveals all 3 once descriptions enter the viewport, and stays revealed when scrolling back to top (no repeat).390x844): reveals cards one by one ([false, true, true]->[false, false, true]->[false, false, false]) as each card's description enters the viewport.Merge danger
Two-way door. Static CSS, Astro markup, and a 20-line progressive-enhancement script; SSR, no-JS, and
prefers-reduced-motion: reducerender all feature screenshots at full opacity.Decisions
view()timelines so cards never freeze half-transparent if the user pauses mid-scroll and never replay when scrolling back up.<script>instead of a React island to avoiduseEffectand ship zero React JS forFeaturesSection.Not in this change
MacDesktopHero,ProvidersSection,SettingsSection) are untouched.Agents
Note
Low Risk
Marketing-site progressive enhancement only; no auth, data, or shared app logic.
Overview
Replaces the features section’s React
IntersectionObserverscroll entrance with static markup plus CSS, triggered when each card’s description is ~80% in view.FeaturesSectionis no longer a hydrated island: it dropsuseEffect/useState,client:idle, and Tailwind motion classes in favor ofdata-feature-card/data-feature-triggerhooks and shared classes (feature-popover,feature-notifs). A small Astro inline script arms only below-the-fold cards withdata-feature-pending, observes the description, and removes pending once for a one-shot reveal (skipped whenprefers-reduced-motion: reduce).New CSS in
global.cssdefines the 500ms entrances and pending hidden states, with desktop stagger delays on cards 1 and 2. SSR, no-JS, and reduced-motion users still see screenshots at full opacity.Reviewed by Cursor Bugbot for commit 74e238e. Bugbot is set up for automated code reviews on this repo. Configure here.