Skip to content

feat: filter favorites by tags and always show the tag filter - #3554

Merged
AlexAndBear merged 3 commits into
mainfrom
feat/favorites-tag-filter
Oct 5, 2026
Merged

AlexAndBear merged 3 commits into
mainfrom
feat/favorites-tag-filter

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Description

Adds a tag filter to the favorites view, like the one in the search results. Favorites are already loaded through the search (is:favorite), so the selected tags are just another condition of that query.

What changed Why
loaderFavorites.ts reads q_tags and adds tag:("a" OR "b") to the search query, the same syntax the search uses Filters on the server, combined with the existing type and last modified filters
Favorites.vue shows a "Tags" filter between "Type" and "Last Modified" (multiple selection, searchable), with the tags from graph.tags.listTags(). It's only shown if the server supports tags (capabilityStore.filesTags), the tags load in parallel to the favorites Same filter as in the search results
The tag filter is always shown if the server supports tags, also in the search results (before it was hidden as long as no tag existed). Without tags the filter explains how to add them: "No tags yet. Add tags to files and folders in the details panel to filter by them." A filter that only appears after the first tag is hard to discover, the hint tells users where tags come from
ItemFilter.vue got an optional noItemsMessage that replaces the empty list and the option filter Generic empty state for filters, used by the tag filters in favorites and search
q_tags reloads the favorites and counts as an active filter for the empty state hint Consistent with the other filters, the filter is part of the URL
Unit tests for the loader query (new loaderFavorites.spec.ts) and the view Covers the query and when the filter is shown
Favorites filtered by a tag

No tags yet

Search (desktop) Favorites (mobile)
Empty tag filter in the search Empty tag filter in the favorites on mobile

Related Issue

How Has This Been Tested?

  • test environment: local dev server (pnpm vite) against the docker-compose backend, Chromium at 1440px and 412px
  • test case 1: favorites with four entries, one of them tagged "favtest": selecting "favtest" in the tag filter shows only that file, the URL contains q_tags=favtest and the search request is tag:("favtest") AND is:favorite
  • test case 2: the tag filter is only shown and the tags are only loaded if the server supports tags
  • test case 2b: with no tags (tag request answered with an empty list), the tag filter in favorites and search shows the hint instead of an empty list, on desktop and in the mobile bottom sheet
  • test case 3: pnpm test:unit --run packages/web-app-files packages/web-pkg, vue-tsc --noEmit

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear self-assigned this Oct 3, 2026
@AlexAndBear AlexAndBear changed the title feat: filter favorites by tags feat: filter favorites by tags and always show the tag filter Oct 4, 2026
@AlexAndBear
AlexAndBear force-pushed the feat/favorites-tag-filter branch from 18a1b0d to ea3c097 Compare October 5, 2026 12:54
@AlexAndBear
AlexAndBear merged commit 73ba25a into main Oct 5, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the feat/favorites-tag-filter branch October 5, 2026 16:49
@openclouders openclouders mentioned this pull request Oct 5, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants