Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autocomplete for location field #733

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Add autocomplete for location field #733

wants to merge 15 commits into from

Conversation

MartinKolarik
Copy link
Member

@MartinKolarik MartinKolarik commented Mar 10, 2025

Referencing US states and cities requires jsdelivr/globalping#629, and doesn't work at the moment. Closes #537.

Also fixes displaying error messages for the location field and hides the map in case of errors that are shown below it, as those were easy to miss otherwise.

TODO:

  • If two values are present, autocomplete should not delete the first one.
  • Improve + to work with networks and tags.
  • Try to add a "no results" message.

@jimaek
Copy link
Member

jimaek commented Mar 10, 2025

I love how it works as a location search, but it makes look like that's all we support. Since it doesn't pick up networks, tags and so on. Plus it doesn't understand the combo + feature. So as a new user I might think it's not even an option. We would have to hope users read the tooltip and don't get discouraged by the auto complete.

There must something we can do, maybe add hints inside it?

@MartinKolarik
Copy link
Member Author

MartinKolarik commented Mar 10, 2025

Not sure how to make it clearer than this, it's the exact reason that message is there:
image

Also:

  • network names are supported, only AS numbers are not - don't expect people would use them without copy/pasting,
  • system tags are supported (user tags not as they'd add too much noise, I think),
  • + is supported across cities/countries/states (it's even used by the autocomplete itself if you select cities).

@MartinKolarik
Copy link
Member Author

  • is supported (it's even used by the autocomplete itself if you select cities for example)

I guess you meant a combination of network/tag and a place? That it indeed doesn't work but I think I can make that work too.

@jimaek
Copy link
Member

jimaek commented Mar 10, 2025

Yes a combo, that's what I use the most of all combos.

How about showing a message when no matches are found? That's when it's needed most. Maybe show the contents of the tooltip to make it clear that lack of results doesn't mean it's not going to work

@MartinKolarik
Copy link
Member Author

How about showing a message when no matches are found? That's when it's needed most. Maybe show the contents of the tooltip to make it clear that lack of results doesn't mean it's not going to work

The tooltip message won't directly help, but I was thinking in that direction, too, now. Will try to write something to show in that case.

@MartinKolarik
Copy link
Member Author

@jimaek check the + handling behavior now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GP: autocomplete for location field
2 participants