Pitch doc (Sorry Jason, I know you can't see this)
Organizations look at up to hundreds of shifts at once, and volunteer coordinators have to multitask. Information constantly comes at them from a myriad of places (email, help line, text, slack, etc). When they are looking up information to quickly answer a question and move on to the next thing, a long scrolling screen can feel overwhelming and distracting. Double so when they have to answer a volunteers time bound request and return to looking at the admin dashboard.
This adds a shift filter that lets users pick between many filters for those event occurrences. It's all implemented in ruby because there's no way to query event occurrences in the database (sigh maybe one
day).
The filter is also separated from the implicit filter of the "current week" a user sees in the list of shifts. This means it's possible to have exclusive filters like selecting a date outside of the visible week. The alternative would be to link all the filters together which
was more complex to implement and (I thought) confusing.
Right now, you can only filter for shifts with missing volunteers, but you can't filter for shifts that have volunteers. Not sure if we want that so I left it off.
Tech notes
The blank option of exists instead of the default empty space because some Firefox based browsers show the empty option as very short for some reason. Adding the non-breaking space fixes it.
To clear filters, the form removes all params from the URL except for starts_at and then requests that page. This way, we can remove all the filters, but keep the date so the user doesn't have to get to a far off date again.
<video src="/attachments/0c77637e-e53b-4c34-85bc-53fcb90922aa" title="Waterfox" controls></video>
[Pitch doc](https://docs.proton.me/doc?mode=open&volumeId=gt-aDv_z88sGWm34o9QiEnUphgY0Nc822eDjMLrSbemox-4O9oYyLlM5iDEbgLM0zwJ01771vvf5QaOgsiE7Bg%3D%3D&linkId=Gm-nPZjugd8DIfic7vHYinscGDMA2yqNUw6_RCWGln7xJ3S1VWNqpMpAeay-nd0I1aswNNFj52enljFp5u5ocg%3D%3D) (Sorry Jason, I know you can't see this)
Organizations look at up to hundreds of shifts at once, and volunteer coordinators have to multitask. Information constantly comes at them from a myriad of places (email, help line, text, slack, etc). When they are looking up information to quickly answer a question and move on to the next thing, a long scrolling screen can feel overwhelming and distracting. Double so when they have to answer a volunteers time bound request and return to looking at the admin dashboard.
This adds a shift filter that lets users pick between many filters for those event occurrences. It's all implemented in ruby because there's no way to query event occurrences in the database (_sigh_ maybe one
day).
The filter is also separated from the implicit filter of the "current week" a user sees in the list of shifts. This means it's possible to have exclusive filters like selecting a date outside of the visible week. The alternative would be to link all the filters together which
was more complex to implement and (I thought) confusing.
Right now, you can only filter for shifts with missing volunteers, but you can't filter for shifts that _have_ volunteers. Not sure if we want that so I left it off.
## Tech notes
The blank option of ` ` exists instead of the default empty space because some Firefox based browsers show the empty option as very short for some reason. Adding the non-breaking space fixes it.
To clear filters, the form removes all params from the URL except for `starts_at` and then requests that page. This way, we can remove all the filters, but keep the date so the user doesn't have to get to a far off date again.