Open maxachis opened 1 month ago
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.
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!
@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.
@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?
@joshuagraber yes, I think that's the idea!
Context
Currently, the logic for localities is a little convoluted:
/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./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
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."