Skip to content

feat(polish): wire haptics, sounds, and animation into feature views#29

Merged
dinesh-git17 merged 1 commit intomainfrom
feat/haptics-sound-animation-wiring
Mar 5, 2026
Merged

feat(polish): wire haptics, sounds, and animation into feature views#29
dinesh-git17 merged 1 commit intomainfrom
feat/haptics-sound-animation-wiring

Conversation

@dinesh-git17
Copy link
Owner

Summary

Implements E8.2: Wire Haptics, Sounds, and Animation Polish. Integrates sound triggers, haptic feedback, and motion polish into four feature views per design doc S6.6, S6.8, and S3.7.

Design Doc Alignment

  • S6.6: Signature reveal (0.5s ease, 0.95-1.0 scale), card parallax via scroll transitions, reduced-motion awareness.
  • S6.8: Page-turn sound on completed page transitions, signature-placed sound on successful sign confirmation.
  • S3.7: Medium-impact haptic on successful signature confirmation only.
  • S6.6 screen transitions: Navigation fade (0.3-0.4s) not implemented. The NavigationStack + UIPageViewController architecture does not safely support custom navigation transitions without regression risk. Deferred to a dedicated navigation polish pass.

Changes

  • HomeView.swift: Settings gear button (sheet presentation of SettingsView), ScrollView wrapper with scrollTransition parallax on cards, accessibilityReduceMotion awareness.
  • ContractBookView.swift: SoundService environment injection through UIHostingController bridge, soundService.play(.pageTurn) in didFinishAnimating delegate callback (fires only on completed transitions).
  • SignaturePadView.swift: UIImpactFeedbackGenerator(style: .medium).impactOccurred() and soundService.play(.signaturePlaced) at the successful sign-confirmation boundary (after hasSubmitted = true, before dismiss()).
  • SignatureBlockView.swift: .transition(.opacity.combined(with: .scale(scale: 0.95))) on signature image, withAnimation(.easeInOut(duration: 0.5)) on image load for new signings only. hasPerformedInitialLoad flag prevents re-animation on initial view appearance for already-signed content.

Risk Surface

  • Parallax via scrollTransition only activates during actual scroll transitions. On devices where all 3 cards fit on screen, the effect is invisible. Correct behavior -- parallax requires scroll.
  • SoundService environment injection through the UIHostingController bridge uses a 4-branch switch for type safety. FinalPageView excluded (no environment needed).
  • Haptic fires synchronously on main thread. For <50KB PNG signatures, the save-to-cache async operation completes before the haptic, so no perceptible delay.

Testing

  • Built with xcodebuild -project ExhibitA.xcodeproj -scheme ExhibitA -sdk iphoneos build. Zero errors, zero code warnings.
  • Protocol Zero scan: PASS.
  • Typographic lint: PASS.
  • All pre-commit hooks pass.
  • UnreadBadge 2-second breathing cadence preserved (no changes to UnreadBadge.swift).

Protocol Zero

./scripts/protocol-zero.sh exits 0.

Typographic Lint

./scripts/check-em-dashes.sh exits 0.

HomeView: settings gear button with sheet presentation, ScrollView
wrapper with scroll-transition parallax on cards, reduced-motion
awareness.

ContractBookView: page-turn sound cue via SoundService on completed
page transitions, SoundService environment propagation through
UIHostingController bridge.

SignaturePadView: medium-impact haptic and signature-placed sound
cue on successful sign confirmation.

SignatureBlockView: 0.5s ease reveal animation with 0.95-to-1.0
scale transition on signed-image appearance, skipped on initial
load to avoid replaying for already-signed content.
@github-actions github-actions bot added the surface/ios iOS (SwiftUI) changes label Mar 5, 2026
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

CI Health Report

Workflow Status Notes Additional Context
Content Validation ✅ success -- 0m 13s
Full Stack Smoke ✅ success -- 0m 28s
PR Governance ✅ success -- 0m 18s
iOS Build & Test ✅ success -- 0m 12s

Not triggered: API Sync Contract, Admin Smoke, Backend Quality, DB Schema Check, Dependabot Updates, Push Mock Integration, Release Readiness, iOS Assets & Theme Check, pages-build-deployment


4 passed | 0 failed | 0 other | Commit: 952f103 | 2026-03-05 04:17:37 UTC

@dinesh-git17 dinesh-git17 merged commit 89b0b7b into main Mar 5, 2026
12 checks passed
@dinesh-git17 dinesh-git17 deleted the feat/haptics-sound-animation-wiring branch March 5, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

surface/ios iOS (SwiftUI) changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant