Skip to content

Move search triggering out of the provider list components into a shared search state #4367

Open

Description

@AlexAndBear

Initial Checklist

  • I understand this is a feature request and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Idea

The search flow goes back and forth between apps: the search bar (web-app-search) pushes a route, the files search list (web-app-files, the provider's list component) watches the query, builds the term from its filters and emits search, then web-app-search/views/List.vue runs the search and passes the result back as a prop.

Because "when to search" and "which query params belong to the search" live in the provider's list component, resubmitting the same search needs a workaround (app.search.submit event, see #4365), and every list provider has to reimplement the filter/term/route handling.

Proposal: a shared search state (e.g. a small store with submit()) that the search bar triggers and the results page runs, so the URL just mirrors the state. Provider list components would only render results and filters.

Things to consider:

  • this changes the documented search extension API (SearchList in web-pkg/src/components/Search/types.ts, the search-extensions docs)
  • opencloud-eu/web-extensions (calculator) implements listSearch and would need an update
  • deep links, back/forward, pagination and sorting must keep working
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type:MaintenanceE.g. technical debt, packaging, etc.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions