[FEATURE] Integrate Haptic Feedback on Payment Completion
Description
When users open the payment sheet in the Hyperswitch SDK, the buttons should provide haptic feedback. This means a gentle vibration when they tap a button, giving them a nice confirmation of their actions. This feature makes the payment experience feel more engaging and responsive on mobile devices.
Getting started
- Get familiar with ReScript.
- Check the README.md for project structure and setup instructions.
- To setup locally, follow these steps
# Clone repository
cd hyperswitch-client-core
git submodule update --init --recursive
yarn install
yarn run server # This starts the mock server
yarn run re:start # In another terminal
Expected Behavior:
- Upon successful payment completion, users should receive a short, gentle haptic response to confirm the action.
- The feedback should be subtle and non-intrusive, enhancing the user experience.
Actual Behavior:
- Currently, there is no haptic feedback upon payment completion, leaving users without tactile confirmation of success.
Tasks
Integrate Haptic Feedback:
Implement haptic feedback in the payment completion workflow.
Select Appropriate Haptic Pattern:
Choose a subtle and non-intrusive haptic pattern, such as a short, gentle vibration, to indicate a successful payment.
Platform-Specific Implementation:
Use platform-specific APIs for haptic feedback:
- Android: Utilize the Vibrator class.
- iOS: Use UIImpactFeedbackGenerator or equivalent.
Testing:
Test haptic feedback on different devices and platforms to ensure consistent and expected behavior across iOS and Android.
Contribution Guidelines:
- Fork the repository and create a new branch for your work.
- Write clean, well-documented code with clear commit messages.
- Make sure to follow our coding standards and contribution guidelines.
Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, read more here.
- For this issue, please submit a PR on https://github.com/juspay/hyperswitch-client-core repo, and link it to the issue.
Refer here for Terms and conditions for the contest.
If you have any questions or need help getting started, feel free to ask in the comments!
Hi @manideepk90, I noticed that the issue isn't marked as high priority. If it's not an urgent requirement, could you please assign it to me? I'm still familiarizing myself with open source contributions and would love to take this on. In case I encounter any difficulties, I’ll be sure to let you know so we can reassign if needed.
Sure @aashish-g03 Assigning this to you, Thanks for your interest.
Hey @aashish-g03
Just a quick check-in, how are you progressing with the issue?
Feel free to reach out in the community for any questions.. Happy to help!
Hi, can I be assigned this issue if needed, would love to contribute