Implement swipe-to-open/close gestures for Side Navigation #8172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Screenshot from iOS simulator
(this can also be reproduced using Chrome mobile device simulator)
References
Fixes #6899
Reviewer guidance
The options for
useSwipe
, like the threshold, as well as the size of the "swipe zone" for opening the menu may need to be tuned. Do you have any suggestions?I also made a decision not to place a guard around the swipe-left-to-close gesture for large devices. This means that something like a MS Surface user could use the gesture.
Also, this does not account for RTL languages (might need have a follow up issue). The
isRTL
prop should be accessible using https://v3.vuejs.org/api/composition-api.html#getcurrentinstance within thesetup()
function like thisIn an RTL layout, the swipe directions need to be reversed, and the swipe zone on CoreBase needs to be moved to the right edge of the screen.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)