FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

reset selected filters after search

Open ankitchauhan-aka opened this issue 10 months ago • 35 comments

Pull Request Type

  • [ ] Bugfix
  • [x] Feature Implementation
  • [ ] Documentation
  • [ ] Other

Related issue

closes #1693

Description

Testing

  1. Apply filters, You must have a red border that shows filter(s) are selected
  2. Then search for a term in the search box and choose any option from autosuggestion dropdown
  3. After selecting autosuggested options, Filters must be reset to default options.
  4. The red border from the filter icon will be removed

ankitchauhan-aka avatar Apr 28 '24 09:04 ankitchauhan-aka

I tested with these steps and failed

  • Enter something, enter search result via enter/search button
  • Change filter options
  • Press search button again
  • Search result not updated but filter reset

image

@PikachuEXE I'm attaching a test video with the mentioned steps and cannot replicate the issue. Please share similar so I can fix it ASAP and the same happens in YouTube (as I feel we're taking references from there). Like even if we hit search for the same query it resets the filter.

Not sure, If we've a different requirement here.

https://github.com/FreeTubeApp/FreeTube/assets/93604613/af471d9a-7e6a-4375-8307-bb668fb5df5d

ankitchauhan-aka avatar Apr 29 '24 04:04 ankitchauhan-aka

https://github.com/FreeTubeApp/FreeTube/assets/1018543/0f64ab14-8c03-4538-92a8-835ab0072b00

PikachuEXE avatar Apr 29 '24 05:04 PikachuEXE

@PikachuEXE I've implemented a check, not to reset filter for the same query.

ankitchauhan-aka avatar Apr 29 '24 14:04 ankitchauhan-aka

Filter not applied when:

  1. Application starts
  2. apply labels
  3. enter query
  4. hit search

VirtualBoxVM_E7hDKoPbOO.mp4

Fixed.

Thanks for the review.

ankitchauhan-aka avatar Apr 30 '24 04:04 ankitchauhan-aka

It reset filters under strange conditions (e.g. like changing filter below

https://github.com/FreeTubeApp/FreeTube/assets/1018543/b29fa63c-bf96-4fd6-b632-6c5be57e189e

Probably like

  • Search A
  • Enter B
  • Try to set multiple criteria

PikachuEXE avatar Apr 30 '24 06:04 PikachuEXE

@PikachuEXE this is not a bug but intended behavior. There is how YT also behaves. In your example Time Today resets because you clicked on Type Channel. Time is based on upload date. A channel cant have a upload date.

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

github-actions[bot] avatar May 01 '24 00:05 github-actions[bot]

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

github-actions[bot] avatar May 07 '24 16:05 github-actions[bot]

@jasonhenriquez can we get this reviewed now?

ankitchauhan-aka avatar May 07 '24 16:05 ankitchauhan-aka