Open rsyoh-97 opened 3 years ago
Notes from discussion with Serdar on 5/5:
Notes from Serdar's Slack (5.6.2021)
Will need to attach an event handler and creating a function to handle the event. The function is where you’d instantiate Fuse and perform the search, and render dropdown menu items.
Focus on (1) displaying the results when a user is typing as a dropdown menu (2) inserting the text of the selected menu item into the input box. After that is done, we can think through the workflow for how to take the user to the desired page. A super basic v1 could be a Submit button as part of a traditional form, which sends the user to a new page. A nice-to-have UI improvement would be to send the user to the page automatically upon selection of an item from the dropdown menu.
Something that came to mind, we likely only want to show/search through counties for which we actually have the data. Ideally, we can cover all counties across the US, but we'll need to decide (if it even comes up), how to handle counties for which we're missing some or all of the data.
@miguelito34 That's a very good point about the display of counties in search. I could see handling this in one of two ways:
Approach 1 has the downside that users may find it confusing if they can't find their county. You could alleviate this with a note somewhere in the UI that explains that not all counties are yet supported. Alternative 2 avoids this confusion but will require some very clear visual indicator (and possibly textual explanation) that greyed out counties are not yet supported.
Either approach is acceptable, though personally I'd lean towards stategy 2.