Skip to content

docs: add haptic feedback guide for extension developers - #507

Merged
imorland merged 2 commits into
mainfrom
im/haptic-feedback-docs
Mar 12, 2026
Merged

docs: add haptic feedback guide for extension developers#507
imorland merged 2 commits into
mainfrom
im/haptic-feedback-docs

Conversation

@imorland

Copy link
Copy Markdown
Member

Summary

Adds documentation for the haptic() utility introduced in flarum/framework#4430.

  • Explains Android (Web Vibration API) and iOS (Taptic Engine via checkbox trick) support
  • Documents the user gesture requirement — haptic() must be called synchronously before any await/.then() on both platforms
  • Named presets reference table with suggested use cases
  • Custom pattern support (Android only)
  • isHapticSupported for conditional UI
  • Reference table of all integration points in core and bundled extensions
  • Extension developer examples: buttons, API saves, extend() on controls, reactions, settings toggles, user preferences

Related

Companion implementation PR: flarum/framework#4430

Test plan

  • Verify docs render correctly in Docusaurus
  • Check all code examples are accurate against the implementation
  • Confirm sidebar placement under Reference Guides

🤖 Generated with Claude Code

Documents the haptic() utility added in flarum/framework#<framework-pr>:
- Named presets, custom patterns, isHapticSupported
- User gesture requirement (Android + iOS) — must call synchronously before async
- Where core uses haptics (reference table)
- Extension integration examples: buttons, API saves, extend(), reactions, settings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ype refs

- Custom patterns do work on iOS — web-haptics simulates them via repeated
  checkbox clicks using rAF; previous claim they were Android-only was wrong
- Replace HapticPreset/HapticPattern type references with HapticInput,
  matching the updated haptic.ts in flarum/framework

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imorland
imorland merged commit 3b2e7d3 into main Mar 12, 2026
1 check passed
@imorland
imorland deleted the im/haptic-feedback-docs branch March 12, 2026 00:29
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