Skip to content
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

Off-canvas sidebars: implement touch gestures for opening and closing #23

Open
1 task done
Ambient-Impact opened this issue Oct 26, 2024 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@Ambient-Impact
Copy link
Member

Ambient-Impact commented Oct 26, 2024

Right now, the menu is only toggled by tapping the Menu link or via history states. It's much more intuitive on mobile to swipe horizontally to open a side menu.

Short term goal: implement simple swipe gestures to toggle the menu using Hammer.js. This won't require any signficant refactor of how the overlay and menu open and close from a CSS perspective.

  • Disable when PhotoSwipe and other things open and re-enable when they close to avoid breaking things. We can probably use the immerse events for this.

Long term goal: refactor the menu so that we can do a real time pan/swipe that follows the pointer; a great example is the side menu on the Steam community site on small screens, where you can effectively grab the menu from the left side. Other examples are https://codepen.io/carl-victor-fontanos/pen/NQPLGW and https://github.com/xsonic/ff-swipe-menu that basically do the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant