feat: persistent filters
Description
Use localstorage to save filters and orderBy settings in discover tv/movie pages.
Screenshot (if UI-related)
To-Dos
- [ ] Successful build
yarn build - [ ] Translation keys
yarn i18n:extract - [ ] Database migration (if required)
Issues Fixed or Closed
- Closes #3889
One issue I can imagine with this is that the sliders on the home page all apply filters when clicked on. These would then persist and override any of the expected persistent filters. This might be super confusing.
On top of that I would probably like to improve how we show filters are active on the movies/tv list. It's a bit hard to actually realize you have filters active (especially if you didn't actively set them).
I agree that this is absolutely critical. I was about to abandon Jellyseerr until I saw this PR. However @sct is right that it is not fully integrated. I added this pr and rebuilt. What happens is the slider links do nothing, you just return to your previously defined filters.
Perhaps the best desired functionality would be that the slider link overwrites only the persistent filter for the filter category it is in. For example, a genre link from the main discover page would overwrite the persistent genres, but not the persistent languages or other active filters.
This would not be hard to implement. Just read the query params from the url, and merge with the savedFilters.
Does that sound like the right approach?
I will close this PR now since the concerns haven't been addressed. Please feel free to re-open this PR if we can make the relevant changes and I'll be happy to review it.