falling-fruit / falling-fruit-web

Mobile-friendly website for Falling Fruit
https://beta.fallingfruit.org
GNU General Public License v3.0
39 stars 23 forks source link

when returning to searched place, re-open suggestions #426

Open wbazant opened 3 months ago

wbazant commented 3 months ago

Say we searched for a place, moved thee map, and want to come back to the populated search box: Screenshot from 2024-07-15 16-09-34

when it comes back to focus, we should reopen the suggestions.

Extra fun to develop because the component can disappear off the map and get re-rendered.

Full test procedure for when this is fixed:

  1. search for a text, suggestions should open
  2. select first suggestion: map should pan and zoom to that place and cross should show up and suggestions should disappear
  3. return to the searched text. suggestions should reopen
  4. repeat 2.
  5. click on location, then dismiss it. searched text should still be there, but no suggestions
  6. repeat 3.
  7. repeat 2.
ezwelty commented 2 months ago

@wbazant I believe this is now done in #419, as described? I'll copy here my (low priority) comment from there (https://github.com/falling-fruit/falling-fruit-web/pull/419#issuecomment-2284862604):

I find the crosshair icon for the selected search result confusing because we already use that symbol for device location. How about either making all of the others a simple marker icon (without the filled circle, see maps.google.com) and the selected one with a circle to indicate selection? Or use a clock icon (i.e. "previously selected")

wbazant commented 2 months ago

I agree with you, the icon means something else in our app and shouldn't be used. The icon choice was always there in the code but not working due to a bug, I thought it was quite nice when I fixed the bug but didn't think much of it.

How about only differentiating the icon with color: Screenshot from 2024-08-17 15-15-02

https://github.com/falling-fruit/falling-fruit-web/pull/419/commits/a95f3c0314799b3c75beff6075a918084e85f521

ezwelty commented 2 months ago

@wbazant That's fine. But if we want to dive into design, then my preference would be a grey map box icon for the results (better matching the design of the inactive track-location icon), a grey history box icon for the previously-selected result(s) in the dropdown, and none of those blue arrows on the right.

image

My point earlier was that when the selected result isn't marked on the map with a crosshair, it made less sense to me to show it as selected. The history icon seems more general to me.

wbazant commented 1 month ago

This is live and working as I thought - @ezwelty leaving you to close or keep the issue for changing this design?

I'm not sold on the history icon meaning a previously searched place, and the color indicating the 'active' place goes well with the search text box having the corresponding text. But I see the point about some search results being about places and markable with a crosshair - where a map icon makes sense - and other stuff. Google maps has a couple of icons: Screenshot from 2024-09-25 18-22-16 Screenshot from 2024-09-25 18-22-07

ezwelty commented 1 month ago

@wbazant Focusing on function over design, I'd say there is just one thing that feels off to me. Search "Boulder, CO, USA" and select the result. On my screen, this navigates to a z=12 map without the crosshair. Zoom in to z=13 and the crosshair appears (zoom out and it disappears again), zoom in to z=14 and markers appear.

I suggest showing the place crosshair for z>=14 (so same threshold as for markers) and not showing it at all (even after zoom in) if the initial place selection results in a z<14 map?