godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.78k stars 3.07k forks source link

Sticky top bar/hamburger icon in mobile view #9651

Open InspectorCaracal opened 1 month ago

InspectorCaracal commented 1 month ago

Your Godot version: This pertains to the documentation website itself.

Issue description: The current website converts the fixed sidebar menu to a top bar with a toggleable sidebar. This behavior itself is great - the problem is that the top bar is actually at the top of the whole page instead of just the screen.

This means that if I'm reading a documentation page and want to access anything in the side bar, I have to manually scroll all the way back up to the top, making the website several times more frustrating to use on mobile.

As an added point of frustration to this behavior, "pulling down" when at the top of the page is a standard mobile browser shortcut for reloading the page - and since I was often far down the page due to clicking an anchor link, this means if I'm not super careful about scrolling up, I'll accidentally reload and be jumped allllllllll the way back down.

If the top bar was stickied at the top of the view instead, it would completely solve this issue.

Calinou commented 1 month ago

Fixed navigation bars tend to be frowned upon, as they reduce your already-limited vertical screen real estate even further. This is why many modern website designs don't feature one anymore.

One way to make fixed navbars less intrusive is to make it fixed when scrolling upwards only, and make it disappear after scrolling down. This is what many native apps do. It's possible to implement the same behavior on a web app, but it requires some custom JavaScript code.

InspectorCaracal commented 1 month ago

While I agree that there are other possible solutions to this problem, I'm confused by your point. Mobile view is typically portrait mode and as such it is mostly vertical screen space? That's why it has the toggleable sidebar, because horizontal screen space is at a premium.