-
Notifications
You must be signed in to change notification settings - Fork 15
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
2.0.8: viewport dimension changes across breakpoint should close mobile menu, when appropriate #12
Comments
Honestly I did think about it, it didn't bother me. However I was also thinking we could switch the open state from mobile view to desktop view and vice-versa on window resize, but in my view this is an unnecessary load of memory allocation. A more simple approach I think is to close the submenu on window resize, while on close this event listener is also detached. My priorities right now:
Your 2cents. |
Probably would work fine for me ➕ 1️⃣
👍
👍
I'm not sure what this achieves for the user, didn't feel the need for delays in my own implementation.
👍 💯 I was looking for this. I'm looking to run special JS logic after we init, currently I do something like (works fine, but would be more "contained" in a callback): window.ACMEGroup = window.ACMEGroup || {};
window.ACMEGroup.menuPrimaryNavbar = new Navbar('#menu-primary');
/**
* Un-flicker level 1 menu items.
* Non-absolute position submenus force unwanted parent menu item width change.
* Fixed width doesn't work, too spacious.
*/
(function($) {
$('#menu-primary-items > li').each(function() {
$(this).css('max-width', $(this).width() + 'px');
});
})(jQuery || {});
Yeah I turned all of that off :)
LGTM overall. I didn't get to building my own SASS here, so can't really speak to anything there that works well or doesn't. |
Also I forgot to mention: keyboard navigation :) |
PS for event callbacks, I like how headroom.js has |
I think the main
Other specs:
|
@lkraav I'm on the Navbar now.
Thanks |
This is about our specific implementation for If you have Twitter or some other well known chat tool account, I can send you the production link there. |
@lkraav you don't have to share a production working draft, just give me a short video or drop a sample piece of HTML + CSS somewhere in codepen. |
There's a Storybook but it isn't up to date. I sent you a follow request on Twitter y-day, it hasn't been accepted yet. I could DM you a URL there. |
Just to let you know:
|
@lkraav feel free to test latest master and tell me what you think. |
We have specific things we want to do in CSS only on
.open-mobile
mode..open-mobile
class still appliedI feel like we could ResizeObserver here and programmatically close mobile menu when appropriate.
Your thoughts? Too much bloat for edge use case may be a concern, but maybe it's negligible.
The text was updated successfully, but these errors were encountered: