Skip to content

Search in top bar should start a new search #306

@tuukka

Description

@tuukka

What

I'd expect a search in the top bar to always start a new search instead of refining any existing search.

Steps to reproduce the behavior:

  1. Go to https://search.openfoodfacts.net/
  2. Type in "categories:teas" and press enter.
  3. Decide you want to search something else, replace the previous text with "categories:pastas" and press enter.
  4. Observe the error: You don't get pastas as a result, mainly because it's trying to search for both teas and pastas at the same time (but also because this currently causes a 500 error at the backend.)

Expected behavior

I would expect a search in the top bar to always start a new search (and reset any existing search).

To refine an existing search, I would expect there to be another search field with an indication such as "Refine your search". How search refinement should work (logical "AND", "OR" etc.) is a topic for another issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog (ready for dev)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions