Skip to content

Let visitors push the project gallery about themselves - #7

Merged
MorganGodden merged 1 commit into
masterfrom
claude/landing-gallery-scroll-drag-mb9rsp
Aug 10, 2026
Merged

MorganGodden merged 1 commit into
masterfrom
claude/landing-gallery-scroll-drag-mb9rsp

Conversation

@MorganGodden

Copy link
Copy Markdown
Owner

The gallery on the landing page moved on rails: UMarquee animates its
content in CSS, and a CSS animation is not a scroll position, so a
trackpad swipe, a touch drag or a mouse drag had nothing to take hold
of. Anyone wanting a second look at a card that had just gone past had
to wait for it to come round again.

DraggableMarquee lays the same repeated content out in a real
horizontal scroller and drifts it by nudging scrollLeft a fraction of
a pixel each frame, which makes the drift one more writer of a position
the visitor can write to as well. Scrolling, swiping, dragging, momentum
and the keyboard then all work because the browser already does them.

It stands aside while it is being used: the drift stops under the
pointer, during a drag, while a card holds focus, for a moment after any
scrolling of the visitor's own, off screen, and entirely for anyone who
asks for reduced motion. A drag that ends over a card is not taken for a
visit to it, and the duplicated copies are hidden from screen readers
and taken out of the tab order without being made inert, which would
have stopped the clicks as well.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015aCGjKwtBpk8NdVKxQiCRA

The gallery on the landing page moved on rails: `UMarquee` animates its
content in CSS, and a CSS animation is not a scroll position, so a
trackpad swipe, a touch drag or a mouse drag had nothing to take hold
of. Anyone wanting a second look at a card that had just gone past had
to wait for it to come round again.

`DraggableMarquee` lays the same repeated content out in a real
horizontal scroller and drifts it by nudging `scrollLeft` a fraction of
a pixel each frame, which makes the drift one more writer of a position
the visitor can write to as well. Scrolling, swiping, dragging, momentum
and the keyboard then all work because the browser already does them.

It stands aside while it is being used: the drift stops under the
pointer, during a drag, while a card holds focus, for a moment after any
scrolling of the visitor's own, off screen, and entirely for anyone who
asks for reduced motion. A drag that ends over a card is not taken for a
visit to it, and the duplicated copies are hidden from screen readers
and taken out of the tab order without being made inert, which would
have stopped the clicks as well.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015aCGjKwtBpk8NdVKxQiCRA
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
godden.dev Ready Ready Preview Aug 10, 2026 2:34pm

@MorganGodden
MorganGodden merged commit 51f902f into master Aug 10, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 7cd11f7e Deployed Aug 10, 2026 by vercel[bot]
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