feat(web): page navigation transitions - #5
Merged
Conversation
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.
What
template.tsxentrances (templates remount per navigation, restarting a one-shot CSS animation):app/template.tsx): 250ms opacity fade on every top-level navigation. Opacity-only on purpose — a transform on this wrapper would become the containing block for the marketing tree's inlineposition: fixedfloating CTA.app/(dashboard)/template.tsx): 300ms scale-fade (scale(0.97)→ 1) on the content pane; sidebar/topbar chrome never remounts. Transform origin pinned near the top so tall pages don't shift at the viewport top while settling.from, so nothing (opacity/transform/stacking context) is retained after the animation ends; both are gated behindprefers-reduced-motion.apps/web(dev-server reuse, Playwright setup, throwaway-signup flow,.nextfootgun).Why not the View Transitions API
The theme toggle already drives
document.startViewTransitionwith global::view-transition-*(root)wipe styles — router-level view transitions would inherit the theme wipe. Templates are stable (no experimental flags) and can't collide with it.Verification
Driven end-to-end with Playwright against the dev server: animations fire on real client-side navigations and initial load; wrapper remounts while root wrapper/chrome persist; frame-sampled the scale-fade (starts
scale(0.97), opacity 0, settles totransform: none, opacity 1at ~300ms); fixed floating CTA keepsoffsetParent: null; reduced-motion suppresses the animation with content fully visible; rapid-fire navigation produces no page errors. Gates: typecheck, web tests, web build, Prettier.