Skip to content

Page and Route Transition Animations #558

Description

@Kingsman-99

Description

Navigating between routes currently produces abrupt, instant swaps that feel disconnected and jarring, particularly when moving between the invoice list and the invoice detail page. Smooth enter/exit transitions improve perceived performance and make the app feel polished and intentional.

Technical Context

Transitions implemented using the browser's View Transitions API, gated by a document.startViewTransition feature-detect utility at src/lib/transitions.ts. A TransitionProvider component in src/components/layout/TransitionProvider.tsx wraps the root layout in src/app/layout.tsx and fires transitions on usePathname changes via a useEffect. CSS keyframes for fade-slide enter/exit are defined in src/styles/transitions.css and imported globally. For browsers without View Transitions API support, the component renders children immediately with no animation, ensuring zero-regression fallback.

Acceptance Criteria

  • Navigating from the invoice list to an invoice detail page shows a 200 ms fade-slide transition on enter
  • Navigating back from detail to list shows a reverse-direction transition
  • The transition does not fire on same-page soft navigations (e.g., opening a modal or applying a filter)
  • In browsers without View Transitions API support (feature-detect returns false), routes swap instantly with no console errors
  • Users who have enabled prefers-reduced-motion see no animation at all; routes swap instantly
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highuiUI styling and visual changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions