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

Unreachable typeahead results #576

Open
joshuagraber opened this issue Jan 10, 2025 · 3 comments
Open

Unreachable typeahead results #576

joshuagraber opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels
api enhancement New feature or request

Comments

@joshuagraber
Copy link
Contributor

joshuagraber commented Jan 10, 2025

Context

Requirements

I can see a few options here:

  1. Just return everything, and the client can handle making the content scrollable.
  2. Implement more dynamic searching, so that a user's search terms are split at ' ', then applied to city, state, and county (i.e., if a user searches "Cleveland, " or "Cleveland, Ohio" we currently show no results found. If we could strip punctuation and split that string to be `["Cleveland", "Ohio"] and apply all words as search terms dynamically (both individual words and the whole phrase, to catch place names with spaces), users could just keep typing and narrow the list)
  3. Sort search results by population or number of data sources (although with this option we would wind up hiding smaller places or those that aren't represented in our data. Better, but still not great.)

Tests

  • This is just discussion for now, but any updates should be covered in tests.

Docs

  • As above.

Open questions

Everything is currently open for discussion.

@joshuagraber
Copy link
Contributor Author

Hey @josh-chamberlain @maxachis Here's that issue I referenced yesterday to discuss typeahead stuff! Added some overview in the description to get us started.

@josh-chamberlain
Copy link
Contributor

@joshuagraber I think a combination of all 3 options for requirements would be good. return more, parse inputs better, and maybe sort by population (it's hard to say if this will be confusing or not until we try it, IMO). We could fall back to splitting on commas if the magic way doesn't work.

@maxachis
Copy link
Contributor

@josh-chamberlain @joshuagraber I'll get to work on this! The one caveat is that certain options might slow down the typeahead -- by how much, I don't know, but it's something to be aware of. Will have a better answer for this once I start working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api enhancement New feature or request
Projects
Status: Needs Discussion
Development

No branches or pull requests

3 participants