Skip to content

feat(site): trigger one-shot feature card entrance when description is visible - #260

Merged
aka-cronos merged 4 commits into
mainfrom
fix/site-features-css-scroll-motion
Nov 22, 2026
Merged

aka-cronos merged 4 commits into
mainfrom
fix/site-features-css-scroll-motion

Conversation

@aka-cronos

@aka-cronos aka-cronos commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

The FeaturesSection entrance animation previously relied on React useEffect + IntersectionObserver on 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) from FeaturesSection completely 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 (zero useEffect, zero useState), tagging each <article data-feature-card> and its description <p data-feature-trigger>.
  • site/src/pages/index.astro: drop client:* on <FeaturesSection /> and add a small Astro <script> that sets data-feature-pending and removes it once per card when its description is 80% visible (prefers-reduced-motion: reduce skips hiding).
  • site/src/styles/global.css: one-shot 500ms var(--ease-out-strong) transitions for .feature-popover (opacity + scale from origin-top, preserving -translate-x-1/2) and .feature-notifs (opacity + translate: 56px 0 to 0 0), with desktop-only stagger (0ms, 90ms, 160ms).

Evidence

  • Build & typecheck: pnpm --dir site build (astro check + astro build) passed with 0 errors, 0 warnings, 0 hints across 18 files.
  • Verified live on astro preview (production build):
    • Desktop (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).
    • Mobile (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: reduce render all feature screenshots at full opacity.

Decisions

  • Chose a one-shot per-card description trigger over scroll-scrubbed view() timelines so cards never freeze half-transparent if the user pauses mid-scroll and never replay when scrolling back up.
  • Used a small Astro <script> instead of a React island to avoid useEffect and ship zero React JS for FeaturesSection.

Not in this change

  • Other sections (MacDesktopHero, ProvidersSection, SettingsSection) are untouched.

Agents

Role Model Effort Tool Thread
Implementer Gemini 4 Neon medium Antigravity in T3 Code ef6354ba-fb29-427b-9803-e3d20472e556

Note

Low Risk
Marketing-site progressive enhancement only; no auth, data, or shared app logic.

Overview
Replaces the features section’s React IntersectionObserver scroll entrance with static markup plus CSS, triggered when each card’s description is ~80% in view.

FeaturesSection is no longer a hydrated island: it drops useEffect/useState, client:idle, and Tailwind motion classes in favor of data-feature-card / data-feature-trigger hooks and shared classes (feature-popover, feature-notifs). A small Astro inline script arms only below-the-fold cards with data-feature-pending, observes the description, and removes pending once for a one-shot reveal (skipped when prefers-reduced-motion: reduce).

New CSS in global.css defines 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🚀 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 deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d2d713c3-uzzy-site.cronos-b0a.workers.dev 74e238e 2026-11-22T23:29:16.771Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://964e03e5-uzzy-site.cronos-b0a.workers.dev eec1d1a 2026-11-22T23:19:35.630Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://64d2828b-uzzy-site.cronos-b0a.workers.dev dca9280 2026-11-22T23:09:50.872Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://6837328c-uzzy-site.cronos-b0a.workers.dev 5741c82 2026-11-22T23:00:40.173Z Visit the dashboard ↗

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread site/src/styles/global.css Resolved
@aka-cronos aka-cronos changed the title feat(site): drive feature card entrance with CSS view() scroll timeline feat(site): trigger one-shot feature card entrance when description is visible Nov 22, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread site/src/pages/index.astro Resolved
@aka-cronos
aka-cronos merged commit 9803e29 into main Nov 22, 2026
4 checks passed
@aka-cronos
aka-cronos deleted the fix/site-features-css-scroll-motion branch November 22, 2026 23: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