Fix issue 6194
Title
Fix: Implement "Apply Filters" functionality in search filters (#6194)
Pull Request Type
- [ ] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
closes #6194
Description
This pull request implements the functionality to apply filters on the search page. When users modify filters (e.g., duration, time, type) and click on the "Apply" button:
The filter panel closes automatically. The search results are refreshed to reflect the selected filters without requiring an additional click on the search bar. The functionality is achieved by:
Adding a new applyFilters action in utils.js to trigger the search refresh.
Modifying FtSearchFilters.vue to include an "Apply" button with the appropriate behavior.
Updating top-nav.js to handle the search re-execution with the new filter settings.
Screenshots
Before:
- Filters could be adjusted, but there was no 'Apply' button. Clicking the 'Close' button only made the filters window disappear but did not refresh the search. Users had to manually click the search icon in the search bar or press 'Enter'.
After:
- Clicking "Apply" now refreshes the search results immediately based on the selected filters.
Testing
Manual Testing:
- Tested the "Apply" button behavior with various combinations of filters (e.g., duration, time, type, features).
- Verified that the search results refresh correctly based on the applied filters.
Automated Testing:
- Ran
yarn run lintandyarn run testto ensure no issues were introduced.
Lint Results:
No errors or warnings.
Remaining Tests:
All test suites passed successfully.
Desktop
- OS: macOS
- OS Version: Sequoia 15.2
- FreeTube version: Latest development branch (rebased with upstream master)
Additional context
- The PR includes updates to English translations (
en-GB.yamlanden-US.yaml) to add the new "Apply" button label. - Changes were rebased against the latest master branch to include dependencies updated in the upstream repository.
I recommend deleting your branches & fetching them from scratch, setting git config pull.rebase false, and git cherry-picking the relevant commits.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
Hi guys,
I hope you're doing well. I addressed the requested changes and resolved the conflicts earlier this weekend. If there's still an issue or anything else that needs adjusting, please feel free to let me know.
Thank you in advance for your feedback !
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.
This PR was closed because it has been stalled for 14 days with no activity.