Closed alexjball closed 2 years ago
Visit the preview URL for this PR (updated for commit alexjball/advocacy-maps@eba723c):
https://digital-testimony-dev--pr318-search-gmv39dbr.web.app
(expires Tue, 29 Mar 2022 22:01:46 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: bc0858669d4997df2a9165c2144bd1e2dbba0242
Fixing some deployment things, the link doesn't yet work
Alex, This looks amazing! One small thing, I noticed that there is an "undefined" in one of the results. I will keep on looking at it.
This isn't a showstopper, but I noticed that if you filter by a Lead Sponsor it works fine, but if you go back to Search By: None, the filter stays on.
I noticed that if you do a filter, and then add a sort, there are no results. For example, I filtered on lead sponsor = "Adrian Madaro" and then sorted by # CoSponsors, and I got no results.
Thanks for the review, Jeff! We need a bunch of indexes for this feature. Each combination of search by and sort by needs one. Now that they're built sorting and filtering works. Also addressed your other comments.
closes #249, closes #301
This adds a "search by" dropdown and a search box. Users can search by bill title/id/pinslip; city; current committee name/id; and lead sponsor name/id/district. Will add filter for my legislators in a followup PR
The search runs entirely on the client. The backend generates an index of all the bills every day. The client downloads this index and searches it using Fuse.js. The selected value is then used as a filter in the main bill table. So this handles both the search and filter use cases.