gis-ops / valhalla-app

This is the demo web app running on https://valhalla.openstreetmap.de
https://valhalla.openstreetmap.de
MIT License
164 stars 90 forks source link

Responsive layout for small (phone) screens #15

Closed westnordost closed 1 year ago

westnordost commented 2 years ago

The app's layout is a bit of a mess on phone screens, see:

image

Notes / Possible solutions / Thoughts:

This feature request was triggered by https://github.com/streetcomplete/StreetComplete/issues/3905 , a request to add the valhalla demo to the list of useful OpenStreetMap showcase links in StreetComplete.

TimMcCauley commented 2 years ago

Hi @westnordost - thank you for raising this. Indeed, this should be done. Most of it can be solved with a bit of css. Let me dive in!

georg-d commented 2 years ago

While #18 is also about the mobile experience, it's not an exact dupe but rather about which details might be improved in which way - so maybe it's helpful to solve #15

TimMcCauley commented 2 years ago

We have been brainstorming a little about this. Going forward with this will take some time which we currently do not have. I found this library https://mui.com/material-ui/react-drawer/ which we now use for the range sliders, too. The drawers look pretty decent and they could help us move towards a responsive layout - thoughts? Is there anything you could and would like to pick up here @georg-d @westnordost ?

westnordost commented 2 years ago

Can't say anything about the technical side, but I do think that concept-wise, using a sidebar (aka drawer aka sheets) is a good way to build a layout that works well in a wide range of window sizes, especially when used in combination with a map.