vue-advanced-chat
vue-advanced-chat copied to clipboard
Swipe back animation
Describe the bug
Swipe back to go back to rooms list event is too easy to trigger on mobile device. It’s easy to accidentally trigger the swipe back event when you just swipe down or swipe up to read more messages.
Expected behavior
I think a better solution is add some animations to let users know they are swiping back to rooms list. And back to rooms list when users swipe more than half the screen width.
Device (please complete the following information)
- OS: Android
- Browser: Chrome
- Package version: 1.1.0
Yes I agree, adding animation may be difficult though. If you want to send me a PR, I would be happy to merge it :)
The swipe back distance was already fixed in https://github.com/antoine92190/vue-advanced-chat/commit/219fe6bf2c89a69c368d0825d11dc9bbc5aa688f I increased the distance further in https://github.com/antoine92190/vue-advanced-chat/commit/b05a979a9a35875e0ac099c6c12437d9b0e2ab4d
Thank you for the quick fix! It works great. I will try to implement animation when I have time
This is probably something that could be added after vue 3 migration using SwiperJS. We could also add some message actions with Swiper, like swipe left to trigger message reply.
I have two suggestions:
- Make it sense to measure also the time to swipe back?
- At the moment it is possible to swipe back within a multiple seconds touch move.
- A gesture should be something fast
- Is it possible to add the gesture only to the messages area?
- When I scroll in the emoji suggestions, it closes the conversation too.
- Or in the roomTextarea, it closes the conversation too.