Skip to content

feat(core): reveal unified search filters from the input - #62359

Merged
AndyScherzinger merged 1 commit into
masterfrom
feat/search-filters
Jul 27, 2026
Merged

feat(core): reveal unified search filters from the input#62359
AndyScherzinger merged 1 commit into
masterfrom
feat/search-filters

Conversation

@pringelmann

@pringelmann pringelmann commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a filter entry point to the header search and tightens its focus behavior.

  • A funnel button on the focused, empty input reveals the filter row before you type.
  • The trailing X clears the query when there's text, and closes the search when the field is already empty.
Kooha-2026-07-21-10-35-48.webm

Other fixes made along the way:

  • Focus returns to the input when the popover closes via Escape or the close button; clicking the backdrop closes it without pulling focus back.
  • New reset() on the search controller clears stale state and ignores late responses. Slightly outside this PR's scope, folded in to avoid a separate PR. Ideally this should be refactored to a clean mount-based approach which tears down the modal on close, but that is a big change and out of scope for this redesign.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI (mostly tests & comments)

@pringelmann pringelmann added enhancement feature: search team: IDP Code maintained by 🪪 IDP team labels Jul 21, 2026
@pringelmann pringelmann added this to the Nextcloud 35 milestone Jul 21, 2026
@pringelmann pringelmann self-assigned this Jul 21, 2026
@@ -33,12 +33,12 @@
:wide="true"
@click="itemSelected(element)">
<template #icon>
<NcAvatar v-if="element.isUser" :user="element.user" hide-user-status />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed incorrect prop name

* their internals. A custom input also lets us own the combobox semantics the
* results popover needs. On narrow viewports it collapses to an NcHeaderButton
* to match the other header items.
* A plain <input> rather than NcTextField/NcInputField: those assume a light form

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Asked Claude to sweep over some of my previous comments to make them more concise

width: 16px;
height: 16px;
background-color: currentColor;
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NcActions only exposes one icon slot. Perhaps we should add a second for this type of use case? ([category] label [chevron])

this.stopBackgroundWork()
}

reset(): void {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately the easiest way to remove stale data. As mentioned in PR description: automatic teardown on unmount would be simpler, but out of scope here.

@pringelmann
pringelmann force-pushed the feat/search-filters branch from 44322b1 to dfef6c5 Compare July 21, 2026 09:02
@pringelmann pringelmann added the 3. to review Waiting for reviews label Jul 21, 2026
@pringelmann
pringelmann marked this pull request as ready for review July 21, 2026 09:02
@pringelmann
pringelmann requested a review from a team as a code owner July 21, 2026 09:02
@pringelmann
pringelmann requested review from artonge, kra-mo, kristian-zendato, nfebe, sorbaugh and susnux and removed request for a team July 21, 2026 09:02

@kra-mo kra-mo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice :)

@pringelmann
pringelmann force-pushed the feat/search-filters branch from dfef6c5 to f9244e3 Compare July 21, 2026 09:40
@pringelmann

Copy link
Copy Markdown
Contributor Author

/compile rebase amend

@pringelmann
pringelmann force-pushed the feat/search-filters branch from f9244e3 to d97ba14 Compare July 21, 2026 10:20
@pringelmann

Copy link
Copy Markdown
Contributor Author

/compile rebase amend

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks great!

@pringelmann
pringelmann force-pushed the feat/search-filters branch 2 times, most recently from 72ddc6c to 74643bf Compare July 27, 2026 11:28
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann
pringelmann force-pushed the feat/search-filters branch from 74643bf to f21d652 Compare July 27, 2026 15:43
@AndyScherzinger
AndyScherzinger merged commit a48f766 into master Jul 27, 2026
208 of 218 checks passed
@AndyScherzinger
AndyScherzinger deleted the feat/search-filters branch July 27, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement feature: search team: IDP Code maintained by 🪪 IDP team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filters: Files-style buttons + pre-typing filter

4 participants