Skip to content

Conversation

@ozrendev
Copy link
Contributor

@ozrendev ozrendev commented Nov 1, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

As discussed in PR #7531

Description

Changes the "Clear Filter" button with a text label to a button with an icon. It also moves the position of the button and will not show the button unless one or more filter(s) are applied.

Screenshots

Before
503380496-879bf227-05f3-4e71-9acd-ac79ba4e8338

After
2025-11-01_10-22-57

Testing

Open the Search Filter window
See that the filter button is not visible since no filters are selected
Select one or more filters
See that the Clear Filter icon is now visible
Click the Clear Filter icon to remove all current filters and confirm the icon disappears

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 1, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 1, 2025 12:06
Comment on lines 14 to 22
<FontAwesomeIcon
v-if="searchFilterValueChanged"
class="navIcon clearFilterIcon"
:title="$t('Search Filters.Clear Filters')"
:icon="['fas', 'filter-circle-xmark']"
role="button"
tabindex="0"
@click="clearFilters"
/>
Copy link
Member

@absidue absidue Nov 1, 2025

Choose a reason for hiding this comment

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

Please wrap this icon in a button with no border and a transparent background colour and apply the event listeners and title etc to the button, as they are much more screen reader friendly (e.g. you forgot to add keyboard event handlers here, so it would only be usable for people with a mouse, but buttons do that automatically) and "interactive icons" won't work once we upgrade to FontAwesome 7.

I'm working on doing that for the rest of the "interactive icons" in FreeTube, so please do that here too (would be best if we don't introduce new code that has to be fixed straight away).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, do you have an example of which button component to use? I looked through the code and saw <button>, <ft-button>, <ft-icon-button> so not sure which (if any) of these to use. Thanks

Copy link
Member

Choose a reason for hiding this comment

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

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, I've wrapped the icon now and also removed the hover CSS since it relied on the background color

Copy link
Member

Choose a reason for hiding this comment

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

You can still have hover styling, the transparent background is just so it doesn't get the default button background which is grey, but overriding it to something else on hover is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay cool, wasn't sure about that but I've re-added it

@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 Nov 1, 2025
auto-merge was automatically disabled November 1, 2025 16:24

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 1, 2025 16:24
auto-merge was automatically disabled November 1, 2025 17:06

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 1, 2025 17:06
@absidue
Copy link
Member

absidue commented Nov 1, 2025

@ozrendev Feel free to look at my pull request here for inspiration: #8206

auto-merge was automatically disabled November 1, 2025 18:18

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 1, 2025 18:18
@ozrendev
Copy link
Contributor Author

ozrendev commented Nov 2, 2025

@ozrendev Feel free to look at my pull request here for inspiration: #8206

Perfect, thanks. I basically re-applied the styling from the first commit (but now it more or less copies your implementation of the open filter button)

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Nov 2, 2025
@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 Nov 3, 2025
Co-authored-by: PikachuEXE <git@pikachuexe.net>
auto-merge was automatically disabled November 3, 2025 09:28

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 3, 2025 09:29
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: waiting for review For PRs that are complete, tested, and ready for review

4 participants