Skip to content

Stage 3: Fix bypass call sites and tab navigation intensity #142

@ElectricCookie

Description

@ElectricCookie

Stage 3 of #139

Route the 3 raw HapticFeedback bypass calls through LdHaptics.emit and fix wrong intensity in tab navigation.

Files to modify

  • lib/src/button.dart:217–219 — replace HapticFeedback.heavyImpact() × 2 with await LdHaptics.emit(context, LdHapticsEvent.buttonError) × 2 (200ms gap preserved in caller); remove HapticFeedback usage from this call path
  • lib/src/date_picker.dart:194 — replace HapticFeedback.selectionClick() with LdHaptics.emit(context, LdHapticsEvent.selection)
  • lib/src/appbar/tab_navigation.dart:157 — replace LdHaptics.vibrate(HapticsType.heavy) with LdHaptics.emit(context, LdHapticsEvent.indicatorDrag) (backend maps to selection-class, fixing the wrong-intensity bug)
  • lib/src/appbar/tab_navigation.dart:169 — replace LdHaptics.vibrate(HapticsType.light) with LdHaptics.emit(context, LdHapticsEvent.selection)

Testing

  • Widget test per modified component with injected MockHapticsBackend via LdThemeProvider(hapticsBackend: mock)
  • Verify exact LdHapticsEvent fired for each gesture
  • Verify zero raw HapticFeedback calls: grep -r 'HapticFeedback\.' lib/ --include='*.dart' must return empty

Dependencies

Depends on Stage 1 (#140) and Stage 2 (#141)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions