Closed EvilDrPurple closed 3 months ago
@EvilDrPurple @joshuagraber @josh-chamberlain This seems to be related to a discussion me and Joshua and Josh were having about how we expect users to use the search functionality.
Regardless, I think Kylie's right that, with the web design currently as is, some users probably would try to make a search without using the typeahead suggestion. So we'd need to figure out how to approach that.
Additionally, it's worth pointing out that if a user types "Pittsburgh, Allegheny, PA" (as is currently suggested above the search bar), no results would be returned. Partly, that's on me, as the search bar's contents is being fed into my typeahead endpoint, which only searches on a single entity at a time (whether that be a State, City, or Locality). Maybe we want to consider adjusting that.
It's also worth bearing in mind that the frontend is in a very alpha stage right now, so a lot of this is subject to substantial change.
Regardless, I think Kylie's right that, with the web design currently as is, some users probably would try to make a search without using the typeahead suggestion. So we'd need to figure out how to approach that.
@maxachis I just wanted to make it clear that the search currently doesn't work at all -- regardless of whether a typeahead suggestion is selected or not. If a typeahead suggestion is selected it doesn't show an error but the search button does not react to being pressed and the results page is not loaded at all
Regardless, I think Kylie's right that, with the web design currently as is, some users probably would try to make a search without using the typeahead suggestion. So we'd need to figure out how to approach that.
@maxachis I just wanted to make it clear that the search currently doesn't work at all -- regardless of whether a typeahead suggestion is selected or not. If a typeahead suggestion is selected it doesn't show an error but the search button does not react to being pressed and the results page is not loaded at all
@EvilDrPurple That part is intentional! If you check the console log in the browser, you can see the endpoint path being generated. @joshuagraber is working on developing that component.
@maxachis ah okay thanks for clearing that up!
All of this is still very much in development. It is definitely premature to test against these front-end views.
FWIW, we also have an issue to set up client-side end-to-end (integration) tests once this work is completed, which will catch errors like these.
Regardless, I think Kylie's right that, with the web design currently as is, some users probably would try to make a search without using the typeahead suggestion. So we'd need to figure out how to approach that.
Yeah, we can just disable the button until a user selects something. That's on my list to add during the search results work.
Additionally, it's worth pointing out that if a user types "Pittsburgh, Allegheny, PA" (as is currently suggested above the search bar), no results would be returned. Partly, that's on me, as the search bar's contents is being fed into my typeahead endpoint, which only searches on a single entity at a time (whether that be a State, City, or Locality). Maybe we want to consider adjusting that.
Agreed, we should probably figure out how to allow such a search to proceed. A non-trivial task (where does one split the string, etc.), but worthwhile to look into.
@EvilDrPurple Thank you for reporting this in such detail! I'm going to close this as a non-bug as others have mentioned; the main branch up at https://data-sources-v2.pdap.io/ breaking would be unexpected. https://data-sources-v2.pdap.dev/ is not expected to be totally functional except when we are doing testing for a dev → main
merge.
@maxachis @joshuagraber it's a good point that the help text is not helpful! The functionality changed out from under it. I made an issue here about searching more complex types of names with comma separation: https://github.com/Police-Data-Accessibility-Project/data-sources-app/issues/389
Thank you all for being thoughtful testers, and caring about the humans who will have to use this stuff!
Context
The v2 app search functionality is not working currently in both the live app and on local setups Searching for anything without clicking any typeahead suggestions will result in this being displayed: When clicking a typeahead suggestion, pressing the search button does nothing and will not show the error message until the page is refreshed The nasty part about this error is, it slipped past our tests and an error message is not outputting to the console on local setups. I did have an error message print once, which was this:
Though this may be a red herring because the line it's pointing to and the error message don't exactly match up. This error predates the recent changes to the connection logic and may have been around for weeks without detection. My hypothesis is this could be a frontend issue since all backend tests pass.
Requirements
Tests