-
Notifications
You must be signed in to change notification settings - Fork 1
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
YSP-352: Mobile menu hide animation on resize #340
Conversation
A loaded menu state is one where the page has been loaded, but no toggles have been made. This lets us take that into account and not display the visual rollup on a resize.
✅ Deploy Preview for dev-component-library-twig ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The svg arrows were showing even though the menu was not. They no longer show.
If we resize the window again and the current state of the menu is closed, make it loaded so we don't get the roll up effect afterward. If it's open, leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dblanken-yale This all looks good and accomplishes the goal. I can not think of a better way to do this nor can I think of any downsides to your approach here.
Lovely work!
@joetower Thanks so much. I added @kara-franco then to make sure there's no accessibility issues doing this or that she finds some way to get into the menu that I can't find. :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Works as expected and no keyboard traps!
🎉 This PR is included in version 1.40.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
YSP-352: Mobile menu hide animation on resize
When resizing the window to a mobile size, the closed menu actually shows temporarily and then animates up to hide itself.
A loaded menu state is one where the page has been loaded, but no toggles have been made. This lets us take that into account and not display the visual rollup on a resize.
Description of work
loaded
initial menu state so that we can properly hide the menu on initial resizeloaded
if it wasclosed
Testing Link(s)
Functional Review Steps
Accessibility Review