Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish implementing the category picker to enable Nutri-Score and Eco-Score computation #1156

Open
teolemon opened this issue Feb 20, 2022 · 21 comments

Comments

@teolemon
Copy link
Member

What

  • category >> Category
  • Add a confirmation step before saving
    • Potentially, we'll have several categories, which checkbox carry slightly better.
  • The division lines are helpful to convey hierarchy and the ability to deep dive (like in a File Explorer)
  • The tags on top (with the already selected cats), and the ability to search within the full tree are useful for power users and people like @stephanegigandet who don't like delving progressively within 12 levels of hierarchy (I'm not sure if this one was already implemented)

Screenshot

image

image

@monsieurtanuki
Copy link
Contributor

For the record, my goal in #944 / #1148 was not to override @gspencergoog's #987.

@teolemon
Copy link
Member Author

I am sorry about the conflicts caused. I've just tried rebase, but I'm too unsure about how to resolve the last conflict traversed.

@monsieurtanuki
Copy link
Contributor

@teolemon This morning I've just pulled the latest version of develop and could see that #1148 was merged, with no conflict.
Not related: could you provide me with examples of products that have more than 1 category?

@teolemon
Copy link
Member Author

eg: frozen foods + green peas
eg: New category we don't know about + More generic category we know about
It's not a problem going away anytime soon

@teolemon
Copy link
Member Author

teolemon commented Feb 21, 2022

@monsieurtanuki
Copy link
Contributor

The conflicts come from when we (re)moved smooth_ui_library to the smooth_app package.

@monsieurtanuki
Copy link
Contributor

e.g. frozen foods + green peas

Got it.

By the way on the website the end-user just types in a category name: no tree, no refined "even better category" search.
How do you expect the smoothie end-user to do more things than on the website, with less space?

We should rather implement first the "type in / search" feature in order to match the website, shouldn't we?

@teolemon
Copy link
Member Author

@teolemon
Copy link
Member Author

I would probably add autocompletion in the topbar of that demo pad by @gspencergoog

@monsieurtanuki
Copy link
Contributor

@teolemon I've already seen what @gspencergoog's category filter look like, I just don't think it is appropriate for categories:

  1. I do not think we can be in the case of several siblings being checked at the same time, that's why I prefer radio buttons to check boxes
  2. each line ends with a "children" button even when there's no child - that could at least be fixed
  3. from what you wrote earlier different categories may mean different axis (e.g. frozen & green peas), and I don't see myself as an end-user going all the way down to the root (after having clicked on the correct "frozen" item) to climb all the way up on a different branch (in order to click on the correct "green peas" item): not good for input. And if I click on a selected item on the top, that does not bring me to its location: not good for updates either.

@teolemon
Copy link
Member Author

  1. I do not think changing the form of the controls should be the prime system (beyond the fact that I do not like Radio buttons). The right way would probably to trigger a warning on double select at the same level. This point does not matter much to me at this point.
  2. Yes, you are right.
  3. Yes, delving in the hierarchy is something that will be done in some cases, and searching is the second mode of interaction. I was thinking you could tap on the free space next to the colored chips on top, to search for another value (with autocompletion…and return to add it)

@monsieurtanuki
Copy link
Contributor

My latest suggestion:
Simulator Screen Shot - iPhone 8 Plus - 2022-02-22 at 18 33 39

@teolemon
Copy link
Member Author

So:

  • Your UI is good, interesting and to the point for the specific use case of category refinement, and it mirrors some other UIs I have seen.
  • The category picker (whose name should really be the tag picker, with a category config) was designed to be versatile, with Make the most use of the tag picker #1075 in mind (using it for Stores, Labels, Packaging shapes, Packaging materials, Brands, Origins, countries of sales, since it's all the time the taxonomy model). I do believe that with the addition of "search to select", and of the "+" button to allow adding untaxonomized values (thus preserving one of our strenghts, flexibility), it will be a powerhorse, even for people who don't want to delve in hierarchies.

@monsieurtanuki
Copy link
Contributor

Thank you @teolemon for your comments.
I had understood the purpose of the tag picker, and my latest UI could also adapt to any taxonomy with name, parents and children. The fact that the "conflicted" version was not merged is probably not a good sign: good things were done but eventually the UX was unfortunately not there. Believe me, if I could implement all the taxonomies with the previous tag picker and be satisfied with the result I would do it.

@monsieurtanuki
Copy link
Contributor

With an autocomplete text search:
Simulator Screen Shot - iPhone 8 Plus - 2022-02-23 at 08 40 54

@monsieurtanuki
Copy link
Contributor

Regarding a unique generic tag picker, there are flaws:

  1. some taxonomies have parents and children with deep levels (e.g. TaxonomyCategory), some don't at all (e.g. TaxonomyAllergen)
  2. some taxonomies can obviously have co-checked siblings (e.g. TaxonomyLabel), for others it's rather the exception (e.g. TaxonomyCategory)

@teolemon
Copy link
Member Author

  • I have added mockups in Make the most use of the tag picker #1075 for the various taxonomies
  • You're right on both points, we probably need a configuration mode for which picker allow single/multiple values (I'm more thinking of the case of Packaging, where you build the packaging with pairs of 1 material and 1 shape.

@monsieurtanuki
Copy link
Contributor

monsieurtanuki commented Feb 24, 2022

@teolemon teolemon changed the title Category picker improvements Finish implementing the category picker to enable Nutri-Score and Eco-Score computation Apr 22, 2022
@teolemon
Copy link
Member Author

Those 2 issues have been fixed. At this point, I'm open to any solution that provides a viable road to scores when Robotoff can't do the job.

@teolemon teolemon added this to the V1 milestone Apr 27, 2022
@teolemon
Copy link
Member Author

image

@teolemon teolemon removed this from the V1 milestone Jun 18, 2022
@teolemon teolemon added this to the V1.1 milestone Jun 18, 2022
@M123-dev
Copy link
Member

What things here are still missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 💬 To discuss and validate
Development

No branches or pull requests

3 participants