AntonKhorev left a comment (openstreetmap/openstreetmap-website#5960)
Why do we need the *Go* button at all? One scenario is when the user closes the
directions panel by clicking this close button:

Why would the user do that? Maybe they're on a slow connection and don't want
extra route requests while they're moving the markers around and changing the
routing options.[^1] When they're done with markers and options, they can click
*Go* and make the directions panel reappear. So *Go* = *Show Directions
(again)*. In this case it makes sense for this button to be where the panel is
supposed to be, that is below the form. And if the form was closed in the
scenario described in this paragraph, the button should be visible because
nobody would figure out they need to tab to it.
But we wanted to hide the button, right? We can hide it if one of these is true:
- one or both endpoints are not ready
- the directions panel is visible
Then normally users won't see the *Go* button. And when they'll see it, it's
because the directions are not shown; in this case it doesn't take away the
screen space from the direcions.
Showing *Go* below the form avoids the problems of having to squeeze it into
the side and resizing/moving other inputs/buttons to make space for it. We
don't even know how wide *Go* is because of i18n.
[^1]: Currently the panel reappears when the options are changed, but it
probably shouldn't.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5960#issuecomment-2845105935
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5960/c2845105...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev