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

Hamburger menu not working for longer menus on mobile #5

Open
adamkucharski opened this issue Jan 16, 2024 · 6 comments
Open

Hamburger menu not working for longer menus on mobile #5

adamkucharski opened this issue Jan 16, 2024 · 6 comments

Comments

@adamkucharski
Copy link
Member

Please place an "x" in all the boxes that apply

  • [ X] I have the most recent version of this package and R
  • [ X] I have found a bug
  • [ X] I have a reproducible example

On mobile, if a user loads a page with many options in the dropdown hamburger menu (e.g. the epidemics page), then the items in the lower section of the dropdown cannot be clicked, because when the user scrolls down, the menu disappears. Likely a CSS issue in the library (i.e. pixel constraint) being used to display the current website.

@Bisaloo Bisaloo transferred this issue from epiverse-trace/epiverse-trace.github.io Jan 16, 2024
@Bisaloo
Copy link
Member

Bisaloo commented Apr 18, 2024

I don't think there is a great solution here. Beyond this specific issue, a dropdown with that many options will always be a bit awkward.
A solution may be to get rid of the dropdown and direct users to the articles index page: https://epiverse-trace.github.io/epidemics/articles/ when we get a large number of vignettes.

@Bisaloo
Copy link
Member

Bisaloo commented Jul 13, 2024

Fixed by r-lib/pkgdown#2716. Keeping this issue open until the next release of pkgdown.

@jayhesselberth
Copy link

jayhesselberth commented Jul 14, 2024

@Bisaloo Can you confirm whether this actually fixes the issue for you? It's tedious to test with pkgdown itself because I'd have to create a bunch of dummy vignettes that actually exist. In particular, I'm not sure whether 280px is the appropriate value.

@Bisaloo
Copy link
Member

Bisaloo commented Jul 15, 2024

Yes, I confirm it fixes the issue. I tested with Firefox responsive design mode and this is the result while emulating an iPhone SE 2022. In particular, I confirm I can scroll in the articles menu without accidentally scrolling in the main window. From what I've seen, other phone layout give similar results.

New:

Screen Shot 2024-07-15 at 09 35 11

@jayhesselberth
Copy link

Sorry, I should been more clear. Scrolling already worked on mobile browsers. The intent of the PR was to activate scrolling on non-mobile browsers in dropdowns with many articles.

@Bisaloo
Copy link
Member

Bisaloo commented Jul 15, 2024

Scrolling already worked on mobile browsers. The intent of the PR was to activate scrolling on non-mobile browsers in dropdowns with many articles.

This PR then also indirectly solves the issue described here, which affected mobile browsers. When the article dropdown was taking the entire screen, you couldn't scroll down in the dropdown without scrolling down on the main page and thereby closing the dropdown.

I confirm this also activated scrolling on non-mobile browsers as you intended:

image

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

No branches or pull requests

3 participants