openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
633 stars 371 forks source link

Add one-click filtering of search results by product category #8074

Open DamienMAYAUX opened 1 year ago

DamienMAYAUX commented 1 year ago

Currently, the results of an advanced search can easily be sorted by one of 5 criteria in two clicks (picture). However, it is not possible to further filter the results by, for instance, product category, without performing a new advanced search with that specific criterion. This makes the results quite difficult to explore manually for a human

First idea : 1) include left of the search product pictures a list of the most frequent product categories, sorted by decreasing frequency in the database (as of today, no need to update this ordering over time) 2) when a category is clicked in the list, only products belonging to this category remain on screen (filtering) 3) the first category of the list could be named "Full results" or something similar, so that unfiltering remains possible.

Second idea, slightly more general : 1) add a button next to the "sort" button with a filter logo 2) when clicked, the button opens a scroll down menu with some possible filtering criteria - for instance, a product category, or nutriscore. This is similar to the current "sort" menu, and filtering by product category could be choosen as the default option. 3) when a criterion is clicked in the scroll down menus, the list of its possible levels appears left of the products pictures as described in the first idea.

illustration

Jayabrata18 commented 1 year ago

I want to work on the issue.

alexgarel commented 1 year ago

Hi @Jayabrata18 I don't know what @stephanegigandet think, but we would like to do it in a future global project around search.

stephanegigandet commented 1 year ago

Right, this will be part of a larger project, it should not be tackled on its own.

github-actions[bot] commented 8 months ago

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts