Skip to content

Open mobile menu only if slide come from left-border side of screen #913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2017
Merged

Open mobile menu only if slide come from left-border side of screen #913

merged 1 commit into from
May 19, 2017

Conversation

MachinisteWeb
Copy link
Contributor

@MachinisteWeb MachinisteWeb commented May 18, 2017

When we use the vuejs.org website from mobile, the menu is opened too many time because a lot of action from user is basicaly to slide left-to-right for read example code.

But each time an example code is slided to be red, the menu appears from left side.

Just allows it to be shown if the gesture start from left side conduct to a better UX.

For example, we have this type of message:

user from chat

Hello,
juste pour prévenir, à chaque fois que je slide sur mon telephone de gauche à droite j'ai le menu de gauche.
Le menu responsive quoi, c'est vraiment affreux surtout pour lire le code.
En tout cas ce framework à l'air très sympa, il est nativement inclus avec Laravel maintenant en plus :)

that can be translated by

Hello,
just to warn, each time I slide on my phone from left to right I have the left menu.
The responsive menu, it's really awful in particular to read code.
Anyway, this framework look good, and he is natively include with Laravel now in addition :)

@MachinisteWeb MachinisteWeb changed the title Open mobile memu only if slide come from left-border side of screen Open mobile menu only if slide come from left-border side of screen May 18, 2017
@Kocal
Copy link

Kocal commented May 18, 2017

I think it is better to use document.elementsFromPoint() for preventing the menu to open, instead of using start.x <= 80.

With document.elementsFromPoint(), you are able to prevent the menu to open only if the user started to swipe on a figure.highlight element.

With start.x <= 80, you disable the entire swipe gesture for x > 80.

@MachinisteWeb
Copy link
Contributor Author

The support of document.elementsFromPoint() is experimental and in my proposition I want to be capable to open menu from all part of a page. It's just to reserved the feature from left side, not from all page displayed.

@chrisvfritz chrisvfritz merged commit 382b8ac into vuejs:master May 19, 2017
@MachinisteWeb MachinisteWeb deleted the mobile_behavior branch May 19, 2017 06:47
kazupon pushed a commit to kazupon/vuejs.org that referenced this pull request Oct 1, 2017
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.

3 participants