CityOfDetroit / bloom

component-based web framework for affordable housing management
Apache License 2.0
16 stars 1 forks source link

Collect frontend filter logic #629

Open avaleske opened 3 years ago

avaleske commented 3 years ago

Refactor frontend filter logic so it's unified in one place.

As of #626 the concept of "what a filter is" is spread across multiple places:

To reduce the chance of hard-to-debug issues, we should refactor this logic into a ListingFilterStateManager class that can hold all this in one place.

It could an internal list of filters and their states, and have methods like

Work toward this was completed by @elenm in #484, but was set aside so complexity around the interaction between the seniorHousing and communityType filters could be resolved independently.

avaleske commented 3 years ago

Adding this here so I can use it in the wiki, but this is the flow for the frontend filter state: image

Note that the function names were just ideas, and the actual encode/decode functions are named differently.