CouncilDataProject / seattle_v2

Website for interacting with Seattle's instance of CDP
https://councildataproject.github.io/seattle
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

Feature/voting table filters #40

Closed timganter closed 4 years ago

timganter commented 4 years ago

Some progress towards https://github.com/CouncilDataProject/seattle/issues/18. Feel free to edit/change/modify whatever.

  1. Some checkboxes to filter table by type of vote cast.
  2. Some styling tweaks to use https://react.semantic-ui.com instead of custom styling.

Some things to be aware of.

  1. @tohuynh mentioned that there is a limit to how many records are fetched at once. This means that if the number of rows in the table is beyond the limit, then there could be rows not fetched that the filter is missing. Which would be the case anyway I suppose. That the user wouldn't see all the records to begin with at the moment.
  2. Currently there is no refetching of results. The filtering is all done on the front end without any new call to the server. This might all need to be revised someday, but this PR has a working version of the Vote column in the table.
  3. You'll notice some stickyness when they're all checked then unchecked or when In Favor is checked. Because In Favor typically has the majority of rows. Adding some paging or infinite scrolling could help remove that stickyness from the re-rendering.
evamaxfield commented 4 years ago

There is also some weirdness when there are more check boxes? image

evamaxfield commented 4 years ago

There is also some weirdness when there are more check boxes?

Correction.... The vote has no value.... Interesting. So not a bug on your side but could you include a check for when the vote value is missing?

timganter commented 4 years ago

Nice catch! https://github.com/CouncilDataProject/seattle/pull/40/commits/458832d2038e7f32629e1bf60c1bd58187be2688 and https://github.com/CouncilDataProject/seattle/pull/40/commits/1876443c463077aceeb1849f6087d8e902e2e154 should fix those.

If all else looks good. Maybe we can merge and make new issues for anything else you find.

Adding that no-wrap thing, I noticed that https://github.com/timganter/seattle/blob/feature/votingTableFilters/src/components/VotingTable.jsx could use some refactoring/tweaking to use react semantic ui and add that singleLine={true} to the Matter, Decision, and Name columns.

That could be an easy issue for someone at the next hack-a-thon to tackle.