FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Fix issue 6194

Open SuperAKWA opened this issue 11 months ago • 5 comments

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'.
screen-before-modification

After:

  • Clicking "Apply" now refreshes the search results immediately based on the selected filters.
screen-after-modifications

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 lint and yarn run test to 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.yaml and en-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.

SuperAKWA avatar Jan 24 '25 12:01 SuperAKWA

I recommend deleting your branches & fetching them from scratch, setting git config pull.rebase false, and git cherry-picking the relevant commits.

kommunarr avatar Jan 24 '25 12:01 kommunarr

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jan 24 '25 17:01 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Jan 25 '25 02:01 github-actions[bot]

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 !

SuperAKWA avatar Jan 27 '25 13:01 SuperAKWA

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.

github-actions[bot] avatar Feb 11 '25 01:02 github-actions[bot]

This PR was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Mar 04 '25 02:03 github-actions[bot]