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
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
662 stars 390 forks source link

Design proposal : make the list of categories of a product a navigation feature instead of an informative list #3359

Open stephanegigandet opened 4 years ago

stephanegigandet commented 4 years ago

What

On the product page, we display lists of tags for different facets like brands, labels, countries where sold etc. Most of those are intended to convey information: the product has this label, it's sold in this country etc. And while we have made those values links, the value they have is to be seen, not clicked.

I think one facet is different: the list of categories. They don't really convey useful information (I already know that my milk chocolate bar is a milk chocolat bar and also a chocolate bar and also a snack). But instead it can be used as a very useful navigation feature, to see other milk chocolate bars.

So I think it could be a good idea to move the list of categories to the top of the page, and use a breadcrumb display, that is more clearly recognized as a navigation feature.

e.g. something like this:

image

One thing to be considered is that some categories have multiple parents, so there isn't a strict path to the top. So we may need to choose to display some categories and not all. One way to solve that could be to decide that there is one main parent.

This proposal can apply for both the web site and the app.

Part of

hangy commented 4 years ago

That's a good idea, and would make this kind of hierarchy more accessable.

We probably need to display several breadcrumbs, since a product might belong to several categories where the trees might not merge until something generic like "plant based foods", and which one is the most important category depends on the user's intention: when viewing an apple pie, I may be primarily navigating through apple based foods, or my main concern could be vegetarian fruit pies. (Could building a single breadcrumb be a NP-hard problem?)

stephanegigandet commented 4 years ago

In practice the categories of a single product is a directed acyclic graph. (e.g. something like that: https://dagrejs.github.io/project/dagre-d3/latest/demo/interactive-demo.html )

I'm not sure if we can really make a small enough (and if possible text based) representation of it, that's why I was toying with the idea of simplifying it to display only one breadcrumb path : pick only one leaf category, and then for each level, pick only one parent.

VaiTon commented 4 years ago

Or maybe if there are multiple parents we could just display "multiple parents...".

github-actions[bot] commented 4 years ago

Stale issue message

github-actions[bot] commented 9 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