Skip to content

UI-A1 — Motion tokens core (QueryaMotion) #173

Description

@ZhuchkaTriplesix

Epic: #170
Depends on: 0.4.3 shipped

Source: docs/motion-and-high-refresh.md §4

Goal

Introduce lib/core/motion/ as the single source of truth for animation durations and curves across the app.

Files

  • lib/core/motion/querya_motion.dart (new)
  • lib/core/motion/motion_scope.dart or extension on BuildContext (new)
  • test/core/motion/querya_motion_test.dart (new)

Implementation

  • Duration tokens: instant (0 ms), fast (120 ms), standard (200 ms), slow (320 ms).
  • Curve tokens: enter (easeOutCubic), exit (easeInCubic), standard (easeInOutCubic), emphasized (easeInOutCubicEmphasized).
  • Helper effectiveDuration(BuildContext, Duration) that reads MediaQuery.disableAnimationsOf(context) and returns instant when OS reduce-motion is on (A5 will add in-app override later; design API now).
  • Export from a small barrel if needed; no widget changes in this issue.

Acceptance Criteria

  • All tokens documented in code (brief dartdoc).
  • effectiveDuration returns 0 ms when disableAnimations: true in MediaQuery.
  • Unit tests cover token values and reduced-motion collapse.
  • flutter analyze clean.

Tests

  • Token constants match design doc values.
  • effectiveDuration with/without MediaQuery.disableAnimations.

Metadata

Metadata

Labels

enhancementNew feature or requestfrontendTheme parser epic label: frontendmotionAnimation system, transitions, motion tokenstestsTheme parser epic

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions