modrinth / code

The Modrinth monorepo containing all code which powers Modrinth!
https://modrinth.com
Other
863 stars 150 forks source link

Navbar should appear on top in desktop environments #1620

Open Owehttamy opened 1 year ago

Owehttamy commented 1 year ago

Is your suggested enhancement related to a problem? Please describe.

If you have a vertically-oriented monitor or modify your window to display on only one side of your horizontally-oriented screen, you'll run into an inconvenience: The navbar appears on the bottom of the page as if it's a mobile device. Because of this, navigation on the site becomes a bit obnoxious, as your mouse has to jump between the top and the bottom of the screen to jump between things such as the search button in the navbar to the actual search bar (where you search) And—to add to the frustration—if you are on Windows and have an auto-hiding taskbar, you must fight it to access the navbar as it pops up, shielding the buttons.

Describe the solution you'd like

You could place the navbar at the top of the webpage when on a non-mobile device.

Describe alternatives you've considered

The detection of what environment the webpage is in may be too costly to be worthwhile or just may be considered outright intrusive. In that case, allowing users to move the navbar to the top or bottom in the appearance settings would be amazing.

Additional context

No response

triphora commented 1 year ago

The way that it detects whether you're on mobile or not is based on the width of your monitor. It changes to mobile mode at the width needed for the navbar to fully display on one line. If it didn't convert it to mobile mode, it would be very ugly and look something like the April Fools site which removed mobile support: image

Owehttamy commented 1 year ago

I think you misunderstood what I meant. I'm not saying remove or modify the look of the navbar in any way; instead, move it from the bottom of the webpage to the top for better ease of access. Here's an example of what I meant: navbar

triphora commented 1 year ago

Under what conditions should this be the case?

Owehttamy commented 1 year ago

I still need to familiarize myself with javascript and its limitations, so take this idea with a grain of salt. Can the page detect what device it is on? If that's not the case, simply providing an option to move the navbar to the top inside the appearance settings would be fine.

Minenash commented 1 year ago

Besides when width/hight and aspect ratio, I think the only thing would be user agents

Poopooracoocoo commented 1 year ago

Besides when width/hight and aspect ratio, I think the only thing would be user agents

or the 'mobile' client hint

Minenash commented 1 year ago

Only works with chromium based browsers though. Meaning if that were used, it could change position depending on what browser you're on

Owehttamy commented 1 year ago

Only works with chromium based browsers though. Meaning if that were used, it could change position depending on what browser you're on

Why's that? Aren't user agents required in the HTTP header?

Minenash commented 1 year ago

Poopooracoocoo was referring to "User Agent Client Hints" which is an extension of "Client Hints", which only chromium supports as of now.