Repository navigation
Review follow-up 8: the explorer as a scene (one timeline, auto-advance, toggle morph, decision log) - #67
Merged
Conversation
One Web Animations API scene clock drives Play, Pause, Previous, Next, a scrub bar, the arrow keys, step clicks and a decision log. Auto-advance starts once the chain sits in view and stops for good on any input, never under reduced motion. Sender and receiver light up per step, the message draws in, earlier steps dim in colour, changed claims get their rail 40ms apart after the message. Toggles swap the chain in place through a same-document view transition. Plan M5 to M7 amended, M17 and M18 added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Ctjj2gaNQFgJEzz8uq4yv
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Ctjj2gaNQFgJEzz8uq4yv
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Ctjj2gaNQFgJEzz8uq4yv
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.
Requested by Jan · project thread
What this changes
Review follow-up 8. The explorer used to animate a reveal. Now it plays the chain as one scene, as the blue16 explainer does. The motion is kept quiet: short ease-out entrances, colour changes and no movement on dimmed steps.
One timeline. A Web Animations API animation with no target is the scene clock. It holds the playhead. Play and Pause run it. Previous, Next, a new scrub bar in the stepper, the arrow keys, a click on a step and a click on a log line all move it. The current step is always the step under the playhead. The scrub bar's fill follows the clock while it plays.
Auto-advance (M6 amended). It is armed once per page. It starts after the chain has been in view for 1 s with no input, so a reader who is scrolling past is not interrupted. A step lasts 2.5 s. A hover (real mouse movement), touch, focus, wheel or key stops it for good, and it never restarts by itself. It never starts under reduced motion, and never when the URL already names a step. Play, once pressed, pauses on any click, key or scroll, as before.
Per step (M5, M7).
Toggle morph (M17). A toggle link swaps the chain in place (breadcrumb, toggles, notice and steps) through a same-document view transition of 220 ms, then pushes the toggle's URL. Steps that both chains share morph, the rest fade, and the M8 rails run on the new steps. Back and forward swap again. A reload, a new tab, a modified click, reduced motion or no JS still get the static toggle page. The swap counts as a pageview (
SOFT_NAVIGATIONinsrc/lib/analytics.ts, with a unit test).Decision log (M18). A quiet "So far" list under the chain gains one line per step reached: the number, sender → receiver, and the message. The newest line fades in.
Tokens. The island reads its durations from the motion tokens through a new
durationToken()insrc/lib/motion.ts(unit tested), so the island brings no tokens of its own. New tokens:--dur-message300 ms,--stagger40 ms and--dur-step2500 ms. The first two are 0 under reduced motion. The CSS keyframes for M5 and M7 and theis-freshclass are gone, and M8 stays in CSS.Docs. In
plan.mdanddocs/design.md, M5, M6 and M7 are amended and M17 and M18 are added.tasks.mdgets R-08.Screenshots
From
astro previewat 1440 px and on a Pixel 7, stepped to step 6 with Next. The toggle row is stepped to the changed step.The scene playing on its own, then two toggle morphs (after):
The screenshots were committed once for stable URLs and removed in the next commit, so the squashed diff has no images.
Code checklist
pnpm checkpasses.scenario-*.pngneeds therefresh-screenshotslabel.Generated by Claude Code