Skip to content
New issue

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

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

Already on GitHub? # to your account

Locality typeahead "no results" message #201

Open
1 task
maxachis opened this issue Oct 19, 2024 · 5 comments
Open
1 task

Locality typeahead "no results" message #201

maxachis opened this issue Oct 19, 2024 · 5 comments
Labels
enhancement feature request or other improvement

Comments

@maxachis
Copy link
Contributor

maxachis commented Oct 19, 2024

Context

Currently, the logic for localities is a little convoluted:

  1. We have a limited set of localities in our database, but not all localities for every county (which would be quite a substantial number)'
  2. In some endpoints (such as the /agencies POST endpoint, if a county and state are valid but the locality does not exist, we assume we don't have it, and add that locality.
  3. Other, more public facing endpoints, such as /data-requests POST, simply do not accept localities we don't already have.

This can pose a problem if we get people interested in adding data requests for localities we don't have.

Requirements

  • when no locations are found in a locality typeahead (for example, on new request), display the message: "We don't have agencies in the place you're looking for. Is it spelled correctly? If our database is missing something, please reach us at contact@pdap.io."
@maxachis maxachis added the question Further information is requested label Oct 19, 2024
@josh-chamberlain
Copy link
Contributor

Interesting! We build locality based on agency, correct? This should be pretty good, I would estimate 99% of the population is covered.

Additionally, since this is happening via typeahead, this will manifest in people not getting what they want in the typeahead, but we won't really know they're looking for a locality we don't have; what if they're misspelling something? What if they're misspelling a county?

I wonder if we should just show a note in the typeahead when no places are found with a general message telling people to try searching in the county if they can't find the locality, or reach out to contact@pdap.io if we're missing a place.

@maxachis
Copy link
Contributor Author

Additionally, since this is happening via typeahead, this will manifest in people not getting what they want in the typeahead, but we won't really know they're looking for a locality we don't have; what if they're misspelling something? What if they're misspelling a county?

I think that's a sufficient approach, especially since we don't have any sense of how often this problem will pop up!

@josh-chamberlain josh-chamberlain removed the question Further information is requested label Oct 23, 2024
@josh-chamberlain josh-chamberlain changed the title Streamline Locality Logic Locality typeahead "no results" message Oct 23, 2024
@josh-chamberlain
Copy link
Contributor

@maxachis I updated the issue a bit—as long as the back end returns "no results" appropriately, the front end should be able to display the user-friendly message.

@joshuagraber
Copy link
Contributor

@josh-chamberlain @maxachis This is what we're currently displaying when the typeahead returns no results. Are we meaning to update this message to use the above text, but swap locations and agencies depending on context?

Screenshot 2024-11-18 at 9 59 02 AM

@josh-chamberlain
Copy link
Contributor

@joshuagraber yes, I think that's the idea!

@joshuagraber joshuagraber transferred this issue from Police-Data-Accessibility-Project/data-sources-app Jan 11, 2025
@joshuagraber joshuagraber added enhancement feature request or other improvement and removed front end labels Jan 13, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement feature request or other improvement
Projects
Status: Todo
Development

No branches or pull requests

3 participants