finder-frontend icon indicating copy to clipboard operation
finder-frontend copied to clipboard

Implement `FiltersPresenter#reset_url`

Open csutter opened this issue 1 year ago • 0 comments

This returns the URL used for the "Clear all" link on both the filter summary and filter panel in the new "all content" finder UI.

  • Add real implementation for FiltersPresenter#reset_url, merging the query parameters for every applied facet and then removing them from the current URL
  • Refactor duplication into a #applied_filters private method

Note this code could be simpler if we just removed all query params except the keyword, but then we would also lose any other query parameters that are unrelated to the filtering/sorting.

Review app testing

  • Go to a page with lots of applied filters
  • Try out both the "Clear all filters" links (next to "Apply filters" in the filter panel, and underneath the filter tags in the summary)

csutter avatar Oct 04 '24 12:10 csutter