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

Disable hiding of hamburger menu upon resize <= 1024px width #2924

Conversation

kristinalim
Copy link
Member

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

  • Disable hiding of hamburger menu in screen widths of not more than 1024px.

Changelog Category: Fixed

How is this related to the Spree upgrade?

The behaviour should be checked again if the version of Foundation is upgraded.

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 kristinalim added the bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. label Oct 25, 2018
@kristinalim kristinalim self-assigned this Oct 25, 2018
@sigmundpetersen sigmundpetersen removed the bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. label Oct 25, 2018
@sigmundpetersen
Copy link
Contributor

@kristinalim that spec fails often in semaphore, just try a rebuild

Copy link
Member

@mkllnk mkllnk left a 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.

Copy link
Contributor

@luisramos0 luisramos0 left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luisramos0 luisramos0 added the pr-staged-fr staging.coopcircuits.fr label Oct 30, 2018
@luisramos0
Copy link
Contributor

staged staging.openfoodfrance.org

@myriamboure
Copy link
Contributor

I'm testing it straight away, hopefully it can go into the release!!

@myriamboure myriamboure self-assigned this Oct 30, 2018
@myriamboure
Copy link
Contributor

myriamboure commented Oct 30, 2018

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 !

@myriamboure
Copy link
Contributor

img_9596

@RachL RachL removed the pr-staged-fr staging.coopcircuits.fr label Oct 30, 2018
@sauloperez sauloperez merged commit e4b988c into openfoodfoundation:master Oct 30, 2018
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.

Can't login anymore on mobile (hamburger menu too long and closing when scroll)
7 participants