Skip to content

feat: Implement functional UI motion patterns for core interaction feedback#1257

Open
Risktaker001 wants to merge 4 commits into
Stellar-Mail:mainfrom
Risktaker001:main
Open

feat: Implement functional UI motion patterns for core interaction feedback#1257
Risktaker001 wants to merge 4 commits into
Stellar-Mail:mainfrom
Risktaker001:main

Conversation

@Risktaker001

Copy link
Copy Markdown

Closes #99

Description

This PR establishes a system-wide motion framework across our primary action targets (archive, star, snooze, approve, block, refund, and copy-proof interactions). In alignment with the design principle of prioritizing utility over novelty, these animations reinforce user confidence, visually communicate state mutations instantly via optimistic updates, and provide clean rollbacks if network requests fail.


Changes

Motion Architecture & Tokens

  • Standardized Choreography: Implemented three explicit, predictable easing patterns utilizing Framer Motion/CSS variables:

  • Destructive (Block, Refund): Sharp, snappy layout collapse paired with high-contrast indicator shifts.

  • Restorative/Neutral (Archive, Star, Snooze, Approve): Fluid, spring-based transitions highlighting state change completion.

  • Informational (Copy-Proof actions): Brief, non-blocking confirmation scale shifts.

  • Accessibility First: Integrated a standard media inquiry hook to automatically suppress or substitute complex transforms for users with prefers-reduced-motion: reduce configured at the OS level.

Optimistic Interaction Engine

  • Zero-Latency Micro-interactions: UI nodes trigger icon morphs, background color interpolation, or row collapses immediately upon user click, bypassing network latency bottlenecks.
  • State Rollback Handlers: Hooked asynchronous API failure hooks up to reverse UI states smoothly (e.g., a row that collapsed out of view expands back into place with an alert toast if the server rejects the operation).

Acceptance Criteria Verification

  • Immediate Optimistic Feedback: Interface transitions happen instantly ahead of server confirmations.
  • Graceful Failure Rollbacks: Failed network operations trigger a clear, accessible rollback animation accompanied by error feedback.
  • Accessible Design Compliance: Full fallback coverage explicitly honors reduced motion system settings.
  • Reusable Tokens: Motion parameters (durations, spring stiffness, and dampening coefficients) are extracted into centrally documented theme tokens.

Testing Checklist

Interaction & Mechanics Testing

  • Star/Approve: Verify clicking the action immediately animates the icon state and color fills ahead of network resolution.
  • Archive/Block (Row Collapse): Ensure the list row collapses vertically and remaining elements transition up into place without visual layout stuttering.
  • Network Disconnect Simulation: Trigger a "Block" action while offline. Confirm the element immediately hides, waits for the network failure response, rolls back open, and presents an error toast.

Accessibility & Performance Validation

  • Enable "Reduce Motion" in system settings and verify transitions instantly fall back to standard, clean opacity cuts.
  • Check CPU rendering tracks cleanly under 60fps thresholds when multiple layout animations fire simultaneously.

Developer and others added 4 commits June 22, 2026 02:40
…stic rollback

- New action-motions.ts with 13+ motion presets for archive, star, snooze, approve, block, refund, and copy-proof actions
- ActionIcon component providing haptic-like animated icon state changes with reduced-motion support
- useOptimisticAction hook for optimistic updates with visible rollback on failure
- Integrated animated icons into EmailView reader toolbar (snooze, archive, trash, star)
- Row collapse/slide-out animations for EmailList removal events
- Comprehensive ACTION_MOTIONS.md documentation with tokens, examples, and a11y notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

app-ui: implement mail action microinteractions

1 participant