Mobile Gestures Hook #83

Open
opened 2021-07-07 17:10:53 -04:00 by a258wang · 1 comment
Owner

A React Hook for detecting swipe gestures on mobile devices. Used in the mobile navbar, and potentially anywhere else that needs it.

A React Hook for detecting swipe gestures on mobile devices. Used in the mobile navbar, and potentially anywhere else that needs it.
a258wang added the
Backlog
label 2021-07-07 17:10:53 -04:00
a258wang self-assigned this 2021-07-07 17:10:53 -04:00
a3thakra added this to the Pre launch milestone 2021-07-11 16:24:56 -04:00
a258wang removed their assignment 2021-07-25 00:50:54 -04:00
a3thakra modified the milestone from Pre launch to Post launch 2021-08-13 05:19:01 -04:00
a3thakra removed the
Backlog
label 2021-08-13 05:19:04 -04:00
l42luo self-assigned this 2021-08-16 20:51:46 -04:00
l42luo removed their assignment 2021-09-09 23:27:40 -04:00
w25tran self-assigned this 2021-09-20 21:02:50 -04:00
a3thakra added the
Priority - Low
label 2021-09-27 17:15:07 -04:00
Contributor

Notes from Amy:

Currently, when you open the mobile navbar menu, the only way to close it again is to click on the gray background area (or to click on one of the links). However, on really small screens (eg. the Galaxy Fold), the menu is actually wider than the screen, so you can't see the gray background at all and thus you can't close the menu (unless you click on one of the links). Also, we realized that swiping to close the menu feels more natural than just clicking. Furthermore, if we ever want to use this swiping detection behaviour in other parts of the site, then having this hook will make that pretty easy too.

Ideally, we not only want to be able to detect when the screen is being swiped, but also what direction the user is swiping in - in the case of the navbar, we'd only want to close the menu when the user is swiping to the right, and not when they're swiping up or down.

Notes from Amy: Currently, when you open the mobile navbar menu, the only way to close it again is to click on the gray background area (or to click on one of the links). However, on really small screens (eg. the Galaxy Fold), the menu is actually wider than the screen, so you can't see the gray background at all and thus you can't close the menu (unless you click on one of the links). Also, we realized that swiping to close the menu feels more natural than just clicking. Furthermore, if we ever want to use this swiping detection behaviour in other parts of the site, then having this hook will make that pretty easy too. Ideally, we not only want to be able to detect when the screen is being swiped, but also what direction the user is swiping in - in the case of the navbar, we'd only want to close the menu when the user is swiping to the right, and not when they're swiping up or down.
w25tran was unassigned by a258wang 2022-01-08 20:15:51 -05:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#83
No description provided.