-
Notifications
You must be signed in to change notification settings - Fork 923
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
Dynamic "more" dropdown #5363
base: master
Are you sure you want to change the base?
Dynamic "more" dropdown #5363
Conversation
Somehow it moves all remaining buttons too early on my side. Here is a video: Recording.2024-12-02.160542_compressed.mp4 |
Do you mean the width breakpoint for "small mode" with burger menu is too high? It has to be one of the Bootstrap breakpoints if I'm to use their navbar later. The only smaller breakpoint is 576px, but even with both History and Export moved to the secondary navigation things are not going to fit in some locales. This is If we really want the 576px breakpoint, a possible extra trick is to hide "OpenStreetMap" next to the logo between 576px and 768px. |
3bad6be
to
af6ca6d
Compare
No, I think "next change" should be moving Somehow, I prefer this PR (initial commits with mentioned improvements) over #5370 but let's hear what others have to say. |
Moves secondary nav menu items into / out of the More dropdown depending on the browser window width, as explained earlier in #4854 (comment). This lets to use screen space more efficiently as opposed to the current all-or-nothing "compact mode" where either the entire menu is visible or it is fully collapsed into more, see #5151 (comment).
Fixes #4130 because "compact mode" is gone and changes in #4842 and #5151 make it possible to switch between "small mode" with a burger menu and "wide mode" at a fixed width as described in #4130 (comment).
You'll notice that I also left-aligned the menu. That has to do with minimizing the blinking when the javascript menu code runs. Before the code runs, all menu items are visible. After it runs, some of them may get collapsed into More. If I kept them right-aligned, that could cause them to move right. The currently deployed version also has this kind of blinking, with the difference that all menu items appear and then possibly disappear if "compact mode" with More is triggered. Also some people may actually want History and Export closer to where they were before #5151.
I also experimented with removing More and letting the menu occupy multiple lines if necessary but I didn't like the results. Sometimes three lines are required, then line height has to be reduced. This makes it more difficult to click the menu entries even with a mouse, touch interfaces probably degrade even more.