Skip to content

Conversation

@nfebe
Copy link
Contributor

@nfebe nfebe commented Nov 24, 2025

When date range or person filters were applied, providers that didn't support these filters were automatically disabled in the UI. This made the in-folder filter appear auto-applied and prevented users from searching non-compatible providers.

Remove automatic provider disabling logic from updateDateFilter(), applyPersonFilter(), and removeFilter(). Content filters now apply only to compatible providers via existing compatibility checks while keeping all providers available for selection.

@nfebe nfebe requested a review from a team as a code owner November 24, 2025 14:09
@nfebe nfebe requested review from skjnldsv, sorbaugh and szaimen and removed request for a team November 24, 2025 14:09
@nfebe nfebe added 3. to review Waiting for reviews feature: search labels Nov 24, 2025
@github-project-automation github-project-automation bot moved this to 🏗️ In progress in 📁 Files team Nov 24, 2025
@nfebe nfebe requested review from artonge and susnux November 24, 2025 14:10
@susnux
Copy link
Contributor

susnux commented Nov 24, 2025

Not checked now but is it communicated to user?
So if I enable a filter and a non compatible provider is the filter de-activated or somehow shown as in-active?
I expect confusion of users if filters are selected but not applied because the provider does not support it, meaning the users should know that it is not applied.

@nfebe
Copy link
Contributor Author

nfebe commented Nov 24, 2025

Issue

When users apply date/person filters in unified search, these filters only work on providers that support them. Other providers still return unfiltered results (Previously we tried to avoid sending the search query to these providers at all and this PR will not remove that behavior).

Example: Search "photo" with "Last 7 days" filter

  • Files: Returns photos from last 7 days
  • Comments: Returns ALL comments with "photo" (ignores date filter)

Question

What's the expected behavior?

A) Current: Mixed results
Show both filtered and unfiltered results together

B) Hide incompatible
Only show results from providers that support the filter

C) Visual separation
Show all results but clearly mark which are filtered vs not

Any recommendation from @nextcloud/designers

Cc: @kra-mo

@nfebe
Copy link
Contributor Author

nfebe commented Nov 24, 2025

Not checked now but is it communicated to user?
So if I enable a filter and a non compatible provider is the filter de-activated or somehow shown as in-active?
I expect confusion of users if filters are selected but not applied because the provider does not support it, meaning the users should know that it is not applied.

Yes man you are on track! I was going to add a comment for designers, my initial solution was not to send these queries at all, it seems that might be problematic because the filter is an ad-on to the SEARCH QUERY.

So even though filters are meant to REDUCE results that are already VALID for the SEARCH QUERY in this case we are preventing a search completely for unsupported filters which makes it seem as though there are not results for the SEARCH QUERY to start with.

@szaimen szaimen removed their request for review November 24, 2025 15:48
@kra-mo
Copy link
Member

kra-mo commented Nov 25, 2025

What's the expected behavior?

C is probably the best. But I don't think they need to be separated that clearly given it'd probably be pretty confusing. I'd just show filtered results first, then unfiltered below.

@nfebe nfebe force-pushed the fix/filter-interaction-issues branch from 2f21663 to 36f7d65 Compare December 1, 2025 20:28
@nfebe
Copy link
Contributor Author

nfebe commented Dec 1, 2025

A B
unified-search-a unified-search-b-today

@nfebe nfebe force-pushed the fix/filter-interaction-issues branch 2 times, most recently from 2b70e1f to c60db78 Compare December 1, 2025 20:41
Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

I’d agree with @kra-mo that C) is probably best, given the current situation.

But in the long run, can’t we require from search providers that they support these filters? E.g. date should be supported by all, as it’s relevant for all. Same with people, if it’s shared with them.

@kra-mo
Copy link
Member

kra-mo commented Dec 4, 2025

@nfebe Not sure what you're asking/what the actual difference is there. Could you clarify?

Regardless, the → arrow icons seem weird before the app name. Could the actual icon be shown there? If not, could the arrows at least be made smaller?

And the wording could be trimmed down significantly:

Additional results
Some selected Filters may have been ignored for additional results

Is quite long, and probably incorrect. It could just be a single line:

Partial matches

@nfebe nfebe force-pushed the fix/filter-interaction-issues branch from c60db78 to f70da6c Compare December 8, 2025 13:49
@nfebe
Copy link
Contributor Author

nfebe commented Dec 8, 2025

@nfebe Not sure what you're asking/what the actual difference is there. Could you clarify?

It's just an preview of your implemented recommendation for you feedback. Not a question.

Regardless, the → arrow icons seem weird before the app name. Could the actual icon be shown there? If not, could the arrows at least be made smaller?

That is unrelated I will send a seperate PR and even app priorities as most users are never searching for apps, some apps results must be shown first.

And the wording could be trimmed down significantly:

Additional results
Some selected Filters may have been ignored for additional results

Is quite long, and probably incorrect. It could just be a single line:

Partial matches

Done.

@nfebe nfebe force-pushed the fix/filter-interaction-issues branch from f70da6c to be61ebd Compare December 9, 2025 09:24
@nfebe
Copy link
Contributor Author

nfebe commented Dec 9, 2025

/compile

@nfebe nfebe force-pushed the fix/filter-interaction-issues branch from f3f6a9f to 460d335 Compare December 10, 2025 16:29
@nfebe nfebe requested a review from susnux December 10, 2025 16:30
When date range or person filters were applied, providers that didn't
support these filters were automatically disabled in the UI. This made
the in-folder filter appear auto-applied and prevented users from
searching non-compatible providers.

Remove automatic provider disabling logic from updateDateFilter(),
applyPersonFilter(), and removeFilter(). Content filters now apply only
to compatible providers via existing compatibility checks while keeping
all providers available for selection.

Signed-off-by: nfebe <[email protected]>
Show results from providers that don't support active content filters
(date/person) in a separate "Additional results" section with a note
explaining that some filters may have been ignored.

Changes:
- Add computed properties to separate filtered/unfiltered results
- Track filter compatibility using baseProvider for searchFrom providers
- Deduplicate results by resourceUrl across sections
- Skip in-folder results when at root to avoid duplicating Files results
- Fix providerIsCompatibleWithFilters to check correct filter properties
- Add styling for the unfiltered results section

Signed-off-by: nfebe <[email protected]>
@nfebe nfebe force-pushed the fix/filter-interaction-issues branch from 460d335 to f035ff3 Compare December 10, 2025 16:30
@nfebe
Copy link
Contributor Author

nfebe commented Dec 10, 2025

/compile

Signed-off-by: nextcloud-command <[email protected]>
@nfebe nfebe merged commit 186b12b into master Dec 10, 2025
156 of 163 checks passed
@nfebe nfebe deleted the fix/filter-interaction-issues branch December 10, 2025 19:07
@nfebe
Copy link
Contributor Author

nfebe commented Dec 10, 2025

/backport to stable32

@nfebe
Copy link
Contributor Author

nfebe commented Dec 10, 2025

/backport to stable31

@nfebe
Copy link
Contributor Author

nfebe commented Dec 10, 2025

/backport to stable30

@jancborchardt
Copy link
Member

But in the long run, can’t we require from search providers that they support these filters? E.g. date should be supported by all, as it’s relevant for all. Same with people, if it’s shared with them.

@nfebe can we keep this as a follow-up too?

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

Labels

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

7 participants