-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Disable hiding of hamburger menu upon resize <= 1024px width #2924
Disable hiding of hamburger menu upon resize <= 1024px width #2924
Conversation
In some browsers for mobile devices, the address bar is automatically hidden when scrolling down the page. This is not workable if the height of the contents of the off-canvas exceeds the height of the screen, because the latter portion of the contents stays hidden to the user. https://github.com/openfoodfoundation/angular-foundation/blob/0.9.0-20180826174721/src/offcanvas/offcanvas.js
@kristinalim that spec fails often in semaphore, just try a rebuild |
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.
Nice work! I didn't know about any of this.
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.
Interesting!
|
||
# Bind hiding of the off-canvas that only happens when screen width is over 1024px. | ||
win.bind 'resize.body', -> | ||
isolatedScope.hide() if $(window).width() > 1024 |
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.
I think you can use $window
https://docs.angularjs.org/api/ng/service/$window
staged staging.openfoodfrance.org |
I'm testing it straight away, hopefully it can go into the release!! |
I didn't open a file for this, it is working, I can browse the hamburger menu and access the login ! And I can login. Good to go ! |
What? Why?
Closes #2907
Disable hiding the hamburger menu (off-canvas) upon window resize to less than 1024px width.
In some browsers for mobile devices, the address bar is automatically hidden when scrolling down the page. This is not workable if the height of the contents of the hamburger menu exceeds the height of the screen, because the latter portion of the contents stays hidden to the user.
Refer to code of directive: https://github.com/openfoodfoundation/angular-foundation/blob/0.9.020180826174721/src/offcanvas/offcanvas.js
Merely changing the hamburger menu to be scrollable is quite tangly and will need a lot of testing because of how the DOM elements are laid out, which I think this is counter-productive. The behaviour of automatically closing the hamburger menu is introduced by angular-foundation which has long been unsupported. We should move away from the library rather than work around its features.
What should we test?
Test closed and open hamburger menu for different screen sizes, and switching between landscape and portrait for mobile devices.
Release notes
Changelog Category: Fixed
How is this related to the Spree upgrade?
The behaviour should be checked again if the version of Foundation is upgraded.