Skip to content

Haptic feedback, button morph, dial slide, heads-up notification#4

Merged
Xitee1 merged 1 commit into
mainfrom
feat/haptic-feedback-and-effects
Apr 18, 2026
Merged

Haptic feedback, button morph, dial slide, heads-up notification#4
Xitee1 merged 1 commit into
mainfrom
feat/haptic-feedback-and-effects

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented Apr 18, 2026

Summary

  • Haptics: play/stop (CONFIRM) and +/- (CLOCK_TICK) now trigger haptic feedback, gated by the existing hapticFeedbackEnabled setting
  • Play button morph: circle (idle) ↔ rounded square (running), 240ms FastOutSlowInEasing; play/stop icons crossfade
  • Dial slide: smooth animation on +/- jumps whether the timer is idle or running; countdown ticks snap. Single source of truth via Animatable, threshold-based snap/animate (δ<1 min → snap; dragging → snap)
  • Heads-up notification: appears once on start only (setOnlyAlertOnce), ported to a fresh channel (sleep_timer_v2, IMPORTANCE_HIGH, sound/vibration disabled). Previous setSilent(true) was suppressing heads-up
  • -5 min action added to the notification, placed before +5
  • remainingMillisToDisplayMinutes helper in core:data fixes the "30 → 29 after one second" rounding bug in the notification and unifies the ceiling logic with the on-dial time display. TimerUiState.Running now carries remainingMillis instead of derived remainingMinutes/remainingSeconds

Test plan

  • Haptic: play/stop feels distinct from +/-; silenced when hapticFeedbackEnabled=false
  • Play button: morphs between circle and rounded square on start/stop; shadow follows the shape
  • Dial: +5/-5 slides smoothly both idle and while running; drag feels immediate (no slide lag); countdown motion unchanged
  • Notification: heads-up appears on Start only, not on every second; no sound, no vibration
  • Notification actions: -5 | +5 | Cancel shown in that order, all fire correctly
  • Notification minute count shows starting value (e.g. 30) for the first 60 seconds, not 29 after the first tick

🤖 Generated with Claude Code

- Haptic feedback on play/stop (CONFIRM) and +/- (CLOCK_TICK) buttons,
  gated by existing hapticFeedbackEnabled setting
- PlayButton morphs between circle (idle) and rounded square (running)
  with a crossfade between play and stop icons
- Dial slides smoothly when minutes change via +/- — both idle and
  while the timer is running; countdown ticks snap
- Notification shows as heads-up on start only (setOnlyAlertOnce),
  fresh channel at IMPORTANCE_HIGH with sound/vibration disabled
- New -5 min action in the notification, placed before +5
- Reusable remainingMillisToDisplayMinutes helper in core:data fixes
  the "30 → 29 after one second" rounding bug in the notification and
  unifies the rounding logic with the on-dial time display

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Xitee1 Xitee1 merged commit 438a58c into main Apr 18, 2026
1 check passed
@Xitee1 Xitee1 deleted the feat/haptic-feedback-and-effects branch April 18, 2026 16:04
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.

1 participant