Skip to content

add search filter reset button#7531

Merged
FreeTubeBot merged 4 commits intoFreeTubeApp:developmentfrom
ozrendev:add-filter-reset-btn
Jun 17, 2025
Merged

add search filter reset button#7531
FreeTubeBot merged 4 commits intoFreeTubeApp:developmentfrom
ozrendev:add-filter-reset-btn

Conversation

@ozrendev
Copy link
Contributor

@ozrendev ozrendev commented Jun 7, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #7396

Description

Add button that clears active search filters

Screenshots

Before
2025-06-07_23-27-30

After
2025-06-07_23-24-27

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 7, 2025 21:28
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 7, 2025
</FtFlexBox>
<div class="searchFilterCloseButtonContainer">
<FtButton
:label="$t('Clear filters')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need an entry in static/locales/en-US.yaml so people can translate

Suggested change
:label="$t('Clear filters')"
:label="$t('Search Filters.Clear Filters')"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick response, have committed those changes

auto-merge was automatically disabled June 8, 2025 07:10

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 8, 2025 07:10
Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I looks like that the close and clear filters button use different kinds of red
  • Change secondary theme to Dracula green and see that words in clear filters label is white. See that the words within the buttons of the Data settings are black

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jun 8, 2025
@ozrendev
Copy link
Contributor Author

ozrendev commented Jun 8, 2025

  • I looks like that the close and clear filters button use different kinds of red

    • Change secondary theme to Dracula green and see that words in clear filters label is green. See that the words within the buttons of the Data settings are black

The clear filters button is using the secondary color var as I thought this would be less confusing. I can change it to the primary color though or whichever is suitable?

@efb4f5ff-1298-471a-8973-3d47447115dc

Please read my comment again. I do not have anything against the secondary color theme. I have an issue with the text within it

auto-merge was automatically disabled June 8, 2025 19:43

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 8, 2025 19:43
@ozrendev
Copy link
Contributor Author

ozrendev commented Jun 8, 2025

Ah okay I got it now, should be fixed

2025-06-08_22-36-47

@PikachuEXE
Copy link
Member

I think you misunderstood
Expected: (See button at bottom right with black text
image

New button:
image

Fetching results. Please wait: Fetching results. Please wait
Fetch more results: Fetch more results
There are no more results for this search: There are no more results for this search
Clear Filters: Clear filters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most of the places use capitalized words
e.g. settings page
image

Suggested change
Clear Filters: Clear filters
Clear Filters: Clear Filters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely misunderstood, this should follow expected behavior. I left the close button as-is from before

2025-06-09_09-04-42

auto-merge was automatically disabled June 9, 2025 07:06

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) June 9, 2025 07:06
@PikachuEXE PikachuEXE added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Jun 9, 2025
@efb4f5ff-1298-471a-8973-3d47447115dc

Probably very out of scope: I need someone else to verify because i dont know if its my panel put if my secondary color theme is set to Red the Close button got a different shade of Red then the Clear Filters button

@PikachuEXE
Copy link
Member

Dunno what you are talking about
image

Using IPS panel

@efb4f5ff-1298-471a-8973-3d47447115dc

Ok disregard what i said. Ty for testing :)

@FreeTubeBot FreeTubeBot merged commit 159efc7 into FreeTubeApp:development Jun 17, 2025
6 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 17, 2025
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Jun 23, 2025
* development: (214 commits)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (French)
  Translated using Weblate (French)
  add search filter reset button (FreeTubeApp#7531)
  ! Fix variant selection when no variant's audio role marked as main (FreeTubeApp#7571)
  Make sure description isn't null when extracting chapters from description (FreeTubeApp#7505)
  Translated using Weblate (French)
  Bump stefanzweifel/git-auto-commit-action from 5 to 6 (FreeTubeApp#7564)
  Translated using Weblate (Swedish)
  Bump the eslint group with 3 updates (FreeTubeApp#7567)
  Bump sass from 1.89.1 to 1.89.2 (FreeTubeApp#7565)
  Bump shaka-player from 4.14.15 to 4.14.18 (FreeTubeApp#7566)
  Bump postcss from 8.5.4 to 8.5.5 in the stylelint group (FreeTubeApp#7568)
  Bump electron-builder from 26.0.16 to 26.0.17 (FreeTubeApp#7569)
  Translated using Weblate (English (United Kingdom))
  add beta to asset name (FreeTubeApp#7512)
  Translated using Weblate (Dutch)
  Translated using Weblate (Dutch)
  Fix builds failing due to broken Weblate keys (FreeTubeApp#7560)
  Translated using Weblate (Persian)
  ...

# Conflicts:
#	package.json
#	src/renderer/helpers/api/local.js
@efb4f5ff-1298-471a-8973-3d47447115dc
FreeTube_qDlZNi1r5o

Summoning @kommunarr @ozrendev @pkrasicki for this discussion. The image above shows how this currently looks like in dev branch. Only real change compared to this PR is that the cancel button is now always white which is consistent within the whole application.

From my daily use of this feature something feels a bit off and i would like to share that with you to see if its just a me problem or something bigger (UI/UX issue).

Everytime i apply a filter i somehow automatically gravitate towards the Clear Filters button as if my brain thinks that is has search now functionality applied to it. First i thought it must be because it is a different color compared to the cancel button but now i think this is happening because it is a similar style button as the close button and the positioning of this button.

So in my mind this could be solved if the functionally is visually moved somewhere else in the filters modal and maybe a different style of button. idk something that is used often to clear stuff.

Does this make sense at all or am i just used to this placement from other applications/websites and try to apply it here?

@PikachuEXE
Copy link
Member

PikachuEXE commented Oct 21, 2025

I agree Clear Filters shouldn't be styled as main action (the one that should be would be a new button for "Search, though I tried once and implementing it seems difficult...

Edit: issue related to adding search #6194 also see attempted PR's linked to that issue

@pkrasicki
Copy link
Contributor

Here:
freetube-search-filters

But you might want to add a text label to this button that says "Reset".

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Oct 25, 2025

I found this icon. Would this icon portrait the action better?
firefox_9mPYricr4v

Edit: @pkrasicki i like the positioning of the icon in your screenshot!

@pkrasicki
Copy link
Contributor

Yeah, that one is better.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Oct 25, 2025

@pkrasicki Would you like to PR it if others approve of this placement and icon?

@PikachuEXE @kommunarr @ozrendev thoughts on discussion?

@pkrasicki
Copy link
Contributor

Not really, it's just a quick mockup I did in Gimp. You might also want to consider repositioning the refresh button on subscriptions page: #6293 (reply in thread).

@PikachuEXE
Copy link
Member

If it's shown always and it's shown as disabled by default then I guess it's easy enough to learn that it's a reset button

@efb4f5ff-1298-471a-8973-3d47447115dc

If it's shown always and it's shown as disabled by default then I guess it's easy enough to learn that it's a reset button

i agree

@pkrasicki
Copy link
Contributor

I would display it only when it's needed. And if the icon doesn't make it clear what the button does on its own, add a text label, so that it looks like one of those buttons:

freetube-video-share-buttons

Fine, here is another mockup:

freetube-search-filters2 freetube-search-filters3

@pkrasicki
Copy link
Contributor

pkrasicki commented Oct 25, 2025

Now that I think about it, some things don't make sense in this modal. The "Sort By" column shouldn't be here, it's not a filter. The radio buttons are not a great solution either. Generally a filter is something you add. So it's strange that the user here can select type "All Types", which just means no filter. Same with time and duration.

YouTube's solution looks like this, but it's not great either:

youtube-filters-modal

Edit: I guess it's not that bad when compared to YouTube, I just think it could be better.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Oct 25, 2025

Every time an user applies a filter on YT it performs a search. If we would copy this behavior over than FT users will be ratelimited way faster because it will do multiple requests. We have implemented something that applies to our usecase.

Regarding how it should look like. I think we need to be consistent here. The filter icon in the top nav is just an icon and when you hover on it you will see the description of it. IMO we should do the same with the Clear filters icon.

We could make it disabled by default or make it appear once a filter has been chosen.

@ozrendev
Copy link
Contributor Author

We could make it disabled by default or make it appear once a filter has been chosen.

Yeah I agree having the filter icon appear when a filter is selected should give the user enough feedback to know it's a clear icon (with tooltip)

I know it's just a mockup, but also having the icon a bit bigger (same size as the current filter icon) would help. The position looks good!

@efb4f5ff-1298-471a-8973-3d47447115dc

@ozrendev would you like to create a pr for it?

@ozrendev
Copy link
Contributor Author

@ozrendev would you like to create a pr for it?

Yeah, I'll do this soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Search Filters Reset Button

6 participants