Skip to content

Add ScrollExpandMedia component for interactive media expansion - #2

Open
matheoceleste-sudo wants to merge 6 commits into
productionfrom
claude/scroll-expand-media-5brlfi
Open

Add ScrollExpandMedia component for interactive media expansion#2
matheoceleste-sudo wants to merge 6 commits into
productionfrom
claude/scroll-expand-media-5brlfi

Conversation

@matheoceleste-sudo

Copy link
Copy Markdown
Owner

Summary

This PR introduces a new ScrollExpandMedia component that provides an interactive scroll-to-expand interface for media content (videos and images). The component features smooth animations, responsive design, and support for both desktop (wheel) and mobile (touch) interactions.

Key Features

  • Media Support: Handles video (YouTube embeds and direct video files) and image content
  • Scroll-Driven Expansion: Media expands smoothly as users scroll, with progress tracking from 0-100%
  • Responsive Design: Adapts media dimensions and text positioning for mobile and desktop viewports
  • Touch & Wheel Support: Full support for both mouse wheel and touch gestures with appropriate sensitivity adjustments
  • Content Reveal: Shows additional content (children) once media is fully expanded
  • Customizable: Supports optional title, date, background image, poster image, and custom scroll-to-expand text
  • Visual Effects: Includes text blend modes, overlay opacity transitions, and smooth animations

Technical Details

  • Built with React hooks (useState, useRef, useEffect)
  • Prevents default scroll behavior during media expansion
  • Implements mobile detection for responsive scaling
  • Handles edge cases like scrolling back up to collapse media
  • Includes proper event listener cleanup to prevent memory leaks

Documentation Checklist

  • Changelog entry (if applicable)
  • Style guide compliance
  • Related issues tracked (if applicable)

https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie

Adapt the scroll-to-expand media hero component to the Astro + React 19
stack: replace next/image with native img and framer-motion animations
with CSS transitions, so it works without adding new dependencies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 7, 2026

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 Updated (UTC)
🔵 In progress
View logs
mathclean 96b6e00 Jul 07 2026, 02:29 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 7, 2026

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 Updated (UTC)
🔵 In progress
View logs
cloudflare-docs 96b6e00 Jul 07 2026, 02:08 PM

claude added 5 commits July 7, 2026 11:35
Port the DottedSurface UI component to the Astro/React stack without
three.js: render the animated dot field on a 2D canvas that follows the
container's currentColor and honours prefers-reduced-motion. Also add a
lightweight cn class-name helper (no clsx/tailwind-merge) and a demo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie
Reconstruct the animated-shader-hero Hero from its demo's prop interface:
a full-screen hero whose flowing gradient background is a raw GLSL
fragment shader on a full-screen quad (no three.js), with a CSS-gradient
fallback when WebGL is unavailable and a single static frame under
prefers-reduced-motion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie
Build a standalone dark-themed marketing homepage at /e-nettoyage that
reuses the previously added components: the animated-shader-hero WebGL
Hero as the 3D hero (wrapped for French CTA scroll handlers) and the
DottedSurface dot field as an animated mid-page band, plus services,
stats, steps, contact and footer sections. Does not touch the existing
docs homepage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie
text-black was not resolving on the rendered page, leaving the primary
CTA label white-on-white; use text-slate-950 which resolves correctly
(verified in the running dev server).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie
The allowBuilds entries contained the literal placeholder text 'set
this to true or false', which pnpm 11 treats as not-approved and fails
install with ERR_PNPM_IGNORED_BUILDS. Set the four packages to true,
matching the intent of the existing onlyBuiltDependencies allowlist
(esbuild, sharp, tldjs, workerd).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZy2r6BEbiEVB7jxPrtCie
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.

2 participants