feat: configurable passage transitions with outgoing phase support#37
Merged
feat: configurable passage transitions with outgoing phase support#37
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix critical issues: - Clarify setNextTransition is always consumed on navigation - Add crossfading state to state machine for concurrent animations - Add render gating section explaining displayedPassage decoupling - Add resolveTransition() signature and call pattern Fix minor issues and add clarifications: - Fix resolveTransitionFromTags to validate type and handle NaN - Note ms-to-seconds conversion for CSS custom properties - Explain translateY motion intent in keyframes - Add crossfade CSS grid layout strategy - Clarify duration:0, data-transition values, first-load tag override Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Clarify resolution chain fill-from-defaults semantics - Fix restart/load: treat as first-load (incoming-only fade) - Add passage-container wrapper to avoid #story layout changes - Clarify data-transition prop delivery via Preact component - Add prefers-reduced-motion CSS handling - Add snapshot media pause/mute handling - Clarify snapshot target is .passage div specifically - Update files-to-modify table with Passage.tsx Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Note key={displayedPassage} change explicitly
- Add restart/load detection mechanism via history comparison
- Clarify back/forward consume nextTransition
- Note fade/fade-through use default CSS with no type-specific override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…se support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add transitions guide page (docs/transitions.md) with full reference - Add Story.setTransition/setNextTransition to Story API docs - Add transitions to VitePress sidebar - Update changelog with transition feature, breaking changes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The new fade-through default adds ~350ms before new passage mounts, pushing timed content past the 2000ms timeout in e2e tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The {#id timed} syntax doesn't propagate ctx.id to the timed macro
wrapper (pre-existing issue on main). Changed test to wait for text
content instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
none(instant),fade(incoming only),fade-through(default — fade out, pause, fade in), andcrossfade(simultaneous overlap)Story.setTransition(config)for persistent defaults,Story.setNextTransition(config)for one-shot overrides[transition:crossfade duration:600 pause:200]on passage headers--passage-in-duration,--passage-out-duration,--passage-pause) for author stylingprefers-reduced-motionsupportTest plan
tsc --noEmitcleantransition.test.ts(14 tests),store-transition.test.ts(15 tests),story-api-transition.test.ts(4 tests),passage-display-transition.test.tsx(9 tests)Story.setTransition({ type: 'none' })disables transitionsrelease-npm
🤖 Generated with Claude Code