Skip to content

Comments

Add haptic feedback when selecting metrics chart points#2426

Merged
Dimillian merged 1 commit intomainfrom
codex/add-haptic-feedback-to-metrics-screen
Jan 10, 2026
Merged

Add haptic feedback when selecting metrics chart points#2426
Dimillian merged 1 commit intomainfrom
codex/add-haptic-feedback-to-metrics-screen

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Provide tactile feedback on the Metrics screen when the user drags or taps the chart selection to reveal the tooltip and summary cards.
  • Improve discoverability and perceived responsiveness of the chart interaction by leveraging the existing haptic manager.

Description

  • Imported Env and used the existing HapticManager to fire haptics from the metrics chart component.
  • Added @State private var lastHapticDayStart: Date? to deduplicate repeated haptics for the same day selection.
  • Added .onChange(of: selectedDate) handler that maps the selection to the corresponding day and calls HapticManager.shared.fireHaptic(.timeline) when the selection changes to a new day.
  • Changes applied to Packages/Account/Sources/Account/Metrics/AccountMetricsComponents.swift to wire up the interaction.

Testing

  • No automated tests were executed in this environment.
  • The change compiles locally was not verified here, and no CI or unit/UI tests were run as part of this rollout.
  • Manual validation on device/simulator is recommended to confirm haptic behavior and ensure there are no runtime issues.

Codex Task

@Dimillian Dimillian merged commit c1baf00 into main Jan 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant