Admin runner list to use filtered_search_utils.js
Summary
We have several opportunities for code reuse on the implementation of the runner filtered search.
Detailed points
The following discussions from !62018 (merged) should be addressed:
-
@mlunoe Source: !62018 (diffs, comment 581851695) Yes, there seems to be some overlap here. I've tried to map your implementations with what is available
vue_shared/components/filtered_search_bar/filtered_search_utils.js
. You can see an example usage of these incode_review_analytics/components/filter_bar.vue
. -
@mlunoe started a discussion: Suggestion (beyond scope of this MR): I believe
filterToQueryObject
does something similar returning an object with thefilterName
as key and value(s) as value. -
@mlunoe started a discussion: Suggestion (beyond scope of this MR): I believe
processFilters
does something similar to this gathering filters by type and providing operator and value. This can be used in combination withfilterToQueryObject
. -
@mlunoe started a discussion: Suggestion (beyond scope of this MR): This seems similar to
urlQueryToFilter
turning the URL query into a filter object -
@mlunoe started a discussion: Suggestion (beyond scope of this MR): We can use
url_sync
to sync the query to the URL -
@mlunoe started a discussion: Suggestion (beyond scope of this MR): I believe sort could be handled as a special case of the regular filters by adding an option for default value in
the utils
or falling back to the default value if the filter value is empty -
@mlunoe started a discussion: Suggestion (beyond scope of this MR): Note that
url_sync
handles this for us as well