Skip to content

Add motion tokens and interaction choreography (D52) - #22

Merged
mrmarmac merged 3 commits into
mainfrom
claude/plan-implementation-y7hptz
Jul 28, 2026
Merged

Add motion tokens and interaction choreography (D52)#22
mrmarmac merged 3 commits into
mainfrom
claude/plan-implementation-y7hptz

Conversation

@mrmarmac

Copy link
Copy Markdown
Owner

Implements "Warm Bauhaus" motion design and refined interaction feedback across the app, introducing CSS motion tokens, exit-commit animation patterns, and gesture support for touch swipe actions.

Summary

This PR adds a comprehensive motion system to the UI, replacing static interactions with choreographed animations that provide clear feedback for task state changes. It introduces two new custom hooks (useRowExit and useSwipeAction) to coordinate animations with state commits, ensuring visual feedback completes before data changes land.

Key Changes

Motion tokens & animations:

  • Added CSS motion variables (--dur-quick, --dur-move, --ease-brisk, --ease-settle) to styles.css with a "crisp and physical" aesthetic (no bouncy springs)
  • New colour wash tokens (--flash-sage, --hover-wash, --token-wash) for visual feedback across light/dark themes
  • Keyframe animations for task completion (task-completing, task-strike), task entry (task-enter), and add-form feedback (add-sweep, token-pop)

Task row interactions (D52):

  • Refactored .task structure: visible content now wraps in .task__surface to enable swipe translation without moving the row's border or background
  • Added hover wash on ruled-paper rows (hover-capable media only)
  • Completion choreography: checkbox tick draws, title strikes through, row washes sage, then slides right and fades before committing to Done
  • Master rows now show a "Move to Today" button (.task__move) on hover/focus, with destination-coloured styling

Custom checkbox styling (D52/WP8):

  • Replaced native checkbox appearance with custom-drawn tick animation
  • Micro-interactions: grow on hover, compress on press
  • Shared styling between task and subtask checkboxes with size variants

Add form enhancements (D52/WP7):

  • Mirror overlay (.add__mirror) tracks input text with transparent glyphs, revealing an ochre pill (.add__token) under recognized date tokens
  • Sweep animation on form commit as field clears
  • Scroll syncing between input and mirror for long titles

Touch swipe gesture (D52):

  • New useSwipeAction hook implements horizontal swipe-to-act for touch
  • Today rows swipe left to return to Master; Master rows swipe right to move to Today
  • Resistance damping when swiped in wrong direction or when action is disabled (recurring master with live day-copy)
  • Fling-out animation with fallback timeout for commit

Exit-commit pattern (D52):

  • New useRowExit hook opens an animation window for instant state reducers
  • Marks row with animation class, waits for animation end, then commits state
  • Fallback timeout ensures commit even if animationend event is dropped
  • Used for task completion, move-to-column, and swipe-out actions

Column flash states:

  • TodayColumn and DoneColumn now accept flashId prop to highlight newly arrived tasks
  • Separate flash animations: task--flash (ochre, for created/moved tasks) and task--flash-done (sage, for completed tasks)
  • Only 'created' tasks scroll into view; completed/moved rows land where user was looking

Drag handle & mark button feedback:

  • Drag handle scales on hover with colour change
  • Mark button (active toggle) scales on hover (1.35x) and press (0.85x)
  • All transitions use motion tokens for consistency

Edit panel:

  • Soft open animation (edit-panel-in) on mount
  • Click-away closes and persists edits (blur-commits before close)
  • Move button now shows destination text ("Today"/"Master") with destination-coloured tint

Implementation Details

  • Motion tokens live in :root only (theme-independent, crisp aesthetic)
  • All durations clamp to ~0 under prefers-reduced-motion, but animations still fire so commits aren't gated on visible duration
  • Swipe gesture uses pointer events with intent threshold (12px horizontal, 1.5x ratio over vertical) to avoid hijacking vertical scroll
  • Rubber-band resistance function for swipe

https://claude.ai/code/session_0138ccb6URP1H46oAjNs3Toz

claude added 3 commits July 28, 2026 13:44
- Motion tokens + useRowExit two-phase exit-commit hook (D52)
- Custom drawn-tick checkbox + satisfying completion choreography
- Row-level hover move control and touch swipe gestures via useSwipeAction
- task__surface wrapper so a swipe translates row content over a colour cue
- Self-labelling, destination-coloured editor move button; fixed action order
- Generalised arrival flash (created/completed/moved) across all three columns

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0138ccb6URP1H46oAjNs3Toz
…3/5/7/8)

- WP3: barely-there hover wash on rows, hover-capable media only
- WP5: click-away closes and persists the editor (click, not pointerdown)
- WP7a: mirror-overlay ochre pill highlighting the live date token
- WP7b: add-commit sweep + longer, richer arrival flash + scroll-into-view
- WP8: physical rest/hover/press states for handles, mark dot, checkboxes, buttons

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0138ccb6URP1H46oAjNs3Toz
- DECISIONS.md: D52 (two-phase exit), D53 (move control + swipe), D54
  (click-away), D55 (editor consistency), D56 (token highlight + flash),
  D57 (hover wash + micro-states)
- CLAUDE.md: file map + extended D51 interaction-model paragraph
- verify/SKILL.md: replace the stale pre-D51 hover-toolbar gotchas with the
  new .task__move / swipe / animation-commit / click-away recipes

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0138ccb6URP1H46oAjNs3Toz
@mrmarmac
mrmarmac merged commit b2a9fdd into main Jul 28, 2026
1 check passed
@mrmarmac
mrmarmac deleted the claude/plan-implementation-y7hptz branch July 28, 2026 14:16
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.

2 participants