Closed davidpickering closed 4 years ago
@PhilNorman2 can you provide some comment? Is the city name, state name, county name coming back in either of the API calls? If not, what is the best pattern to follow? Build it into one of the existing, or make a new API call that does that one single thing?
@davidpickering The City, State and Zip Code for the foodbank and event location is returned by their respective APIs. No county names are returned. However, this is after the fact information which may or may not be OK depending on the UX/UI.
Has the UX/UI discussion been had with Sean or others? Specs for API changes come later if required. If an API is required, we might want to ask the question whether it is better to create it or use a chosen map provider API such as google maps.
The City, State and Zip Code for the foodbank and event location is returned by their respective APIs.
Okay, that makes sense, and we should leave that as is (we are displaying those attributes of the foodbank). I'm interested in learning how we could retrieve attributes of the zip code that was queried. Then we can display that information to the user. I'm most thinking this is applicable when someone queries a zip code with no results. This kid of feedback is more satisfying than "no results" alone.
Has the UX/UI discussion been had with Sean or others?
No, not in any formal way. I think I want to put this as a new feature somewhere in the UI's roadmap, but after I thought of it I wanted to start the API question. I figured the 1st question someone working on the UI would have is "sure, where is that data?"
we might want to ask the question whether it is better to create it or use a chosen map provider API such as google maps.
Not a bad idea, but I would say this is important to make sure the answer exactly matches the logic of the foodbank selection. Right answer is probably to just retrieve the zip code attributes at the same time we lookup the foodbank.
@PhilNorman2 per our conversations, I have modified this feature request to only happen when a user gets no results for their search area.
This is what is showing currently. Any thoughts on changes?
That is a good start, I wonder if we could put a couple pieces of logic in? The first is if the zip code doesn't exist:
The 2nd would be a "no results" type message for both foodbanks and Resource Events:
The api does not return if the zip code does not exist. The return from a search of 11111 is just an empty array. We would have to add that logic in the backend. Which isn't a problem, but it adds to the scope of this feature.
Adding the submitted zip code in the API is easy to do.
On Thu, Apr 30, 2020 at 1:15 PM seanlawrenz notifications@github.com wrote:
The api does not return if the zip code does not exist. The return from a search of 11111 is just an empty array. We would have to add that logic in the backend. Which isn't a problem, but it adds to the scope of this feature.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/midohiofoodbank/freshtrak-client/issues/10#issuecomment-621987995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHR2YMFCPXQG523CDNCS2WDRPGW4HANCNFSM4MQSSB6A .
The front end can store the submitted zip code, the issue is how to validate it
Got it.
Zip Code doesn't exist - "11111" doesn't exist. So, if the zip code doesn't exist, I guess it would be good to feed that information back to the user "We're sorry, but that zip code doesn't exist. Please try again."
Does the zip_code database store all US zip codes? If yes, If we can't lookup the zip code in the database, it doesn't exist. If no, then the message might be the zip code doesn't exist in the pantry finder database or something to that affect.
No Agencies service the zip code - "99901" - KETCHIKAN AK - (random zipcode from Alaska) This zip code does exist, but we do not have any agencies documented as serving it. Current language "No Events Currently Scheduled"
This data is available in the zip_code database so the API could return that information.
The front end can store the submitted zip code, the issue is how to validate it
Does the zip_code database store all US zip codes? If yes, If we can't lookup the zip code in the database, it doesn't exist. If no, then the message might be the zip code doesn't exist in the pantry finder database or something to that affect.
I would say if we submit a zipcode, and the foodbank response comes back "{}" with no data, that is the cue to say the zip code does not exist. At this point, I AM 99.997% sure we have documented 100% of all zip codes in the US and they are assigned to a foodbank. So, if that foodbank response comes back with no data - let's assume the zipcode doesn't exist and display the message accordingly. I don't think we need any other validation that the zip code doesn't exist.
Fine with me
On Fri, May 1, 2020 at 11:32 AM David Pickering notifications@github.com wrote:
The front end can store the submitted zip code, the issue is how to validate it
Does the zip_code database store all US zip codes? If yes, If we can't lookup the zip code in the database, it doesn't exist. If no, then the message might be the zip code doesn't exist in the pantry finder database or something to that affect.
I would say if we submit a zipcode, and the foodbank response comes back "{}" with no data, that is the cue to say the zip code does not exist. At this point, I AM 99.997% sure we have documented 100% of all zip codes in the US and they are assigned to a foodbank. So, if that foodbank response comes back with no data - let's assume the zipcode doesn't exist and display the message accordingly. I don't think we need any other validation that the zip code doesn't exist.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/midohiofoodbank/freshtrak-client/issues/10#issuecomment-622435618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHR2YMBG5KF2C2TFGGAPOETRPLTQ3ANCNFSM4MQSSB6A .
There were some updates here, going to close this issue and start another thread.
Edit: 4/29/2020 - Updated to only happen when there are no search results
When the user submits a zip code, and there are no results, it would be great to tell them the following information about the zip code:
Serves as confirmation they are searching the right area
Customer Story: I am a customer and when I input a zip code and get no results, I want to be able to see if it is the zip code I wanted to search for. Seeing the information on the screen will help me realize if I have made a mistake.
Likely dependent on modification to the API