codeforboston / codeforboston/maple

Move 'upcoming' vs 'past' hearing from sort to filters

Open
#2,039 0 comments 0 reactions 0 assignees View on GitHub
enhancement frontend future Nice To Have
Dominant language
TypeScript
Stars
56
Forks
175
Avg merge
2d 5h
Merged PRs (30d)
13

Description

**Summary**
It might be nice to have hearing date (upcoming vs past) handled with our refinements, so that all our filters are handled by our refinements rather than a hidden filter. AFAIK, InstantSearch doesn't handle this well because upcoming vs past is a moving target (as it's compared to the current time), and right now we have it fed into useConfigure in SortBy. We would want this to be handled in the refinement logic instead.
We would want to ask the UX if this is even something desirable.

**Work Detail**
This ticket would involve adding useConfigure work somewhere around components/search/useRefinements.tsx, and coordinating it with what exists between components/search/SortBy.tsx (assuming we still want sort filtering behavior) and the actual refinement work of InstantSearch. It would be somewhat of a refactoring change and require some thoughtfulness in design.

**Current State**
This is not implemented

**Success Characteristics**
- Upcoming and Past should be added to the filters list via some means
- Hearing sort by would probably just be Earliest->Latest or the reverse

**Resources**
We are using InstantSearch: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js
And feeding it into TypeSense: https://github.com/typesense/typesense-instantsearch-adapter

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.