4. hooks
we built a simple hook to get/set the value of each filter with the same DX as useState
these hooks don't need a context provider because the current values of the filters can always be computed purely from the current search params. and they're type-safe, because the types for filter definitions are generic
2. encoding & decoding
there are methods on each filter definition that convert between the value of the filter & the search params equivalent of that value
when updating the value of a filter we first check what the previous encoded value was to determine what to replace/remove (e.g. if the filter was setting the "status" property and it isn't for the new value, we should remove that prop from the new search params)
but we don't animate suggestions as soon as the user applies one
we delay it if they've been moving their pointer over the filter bar recently or if they've clicked to open one of the filter menus
this allows users to apply multiple suggestions w/o waiting on animations in between clicking them and ensures that filters won't move while their value is being changed
3. keyboard support
all of the filters now support typing to filter their values with fuzzy logic. moreover, the "Add Filter" button functions like a specialized cmdk menu
in other words, you can type the value of any of the filters immediately in the "Add Filter" menu and set it without needing to first select which filter you're trying to apply (e.g. typing "rdy" instead of selecting "Status" and then "Ready")




