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

Create a visual interface for advanced search filtering #1371

Open
1 of 59 tasks
Tracked by #991
teolemon opened this issue Mar 28, 2022 · 12 comments
Open
1 of 59 tasks
Tracked by #991

Create a visual interface for advanced search filtering #1371

teolemon opened this issue Mar 28, 2022 · 12 comments
Labels
🎨 Mockups available Some mockups are available for this issue. Please check everything is ok before starting coding. 🎯 P1 🔎 Search
Milestone

Comments

@teolemon
Copy link
Member

teolemon commented Mar 28, 2022

What

Backend readiness

UI approach

  • Rather than the sophisticated mockups inspired by the GitHub advanced search or anything else, I propose we duplicate the advanced search form of the web version as a first step, to get something working as quickly as we can, focusing on the basics
  • https://world.openfoodfacts.org/cgi/search.pl?graph=1

Components

  • (Advanced search) Create a visual interface for filtering by keyword
  • (Advanced search) Create a visual interface for filtering by facet/criteria
    • Add autocomplete modal for facet/criteria type
    • Add operand: "contains/does not contain"
    • Add autocomplete for facet/criteria value field
    • Add/Remove additional criteria
    • image
  • (Advanced search) Create a visual interface for filtering by nutrient
    • Add autocomplete for nutrients
    • Add operands for nutrients
      • name="nutriment_compare_0" id="nutriment_compare_0
      • lt <
      • lte ≤
      • gt >
      • gte ≥
      • eq =
    • Add numeric input for nutrient value
    • image
  • Filter by Ingredients
    • Additives Without With Indifferent
    • Ingredients from palm oil Without With Indifferent
    • Ingredients that may be from palm oil Without With Indifferent
    • Ingredients from or that may be from palm oil Without With Indifferent
    • image
  • (Advanced search) Add "Results in a list of products"
    • Add sorting options
      • sort_by" id="sort_by
      • unique_scans_n Popularity
      • product_name Product name
      • created_t Add date
      • last_modified_t Edit date
      • completeness Completeness
  • (Advanced search) Add "Results on a graph"
    • The graph will show only products for which displayed values are known.
    • Graph title
    • Select what you want to graph on the horizontal axis to obtain a histogram, or select two axis to get a cloud of products (scatter plot).
    • Add a dropdown/select modal for Horizontal axis
    • Add a dropdown/select modal for Vertical axis
    • Add a toggle to use a different colour for "Organic" products
    • Add a toggle to use a different colour for "Fair trade" products
    • Add a toggle to use a different colour for "With sweeteners" products
    • Add a toggle to "Use nutrition grades colours" products
  • (Advanced search) Results on a map
    • Add map title
    • Add hint to what you need to map (origins of ingredients ? packager codes ?)
    • Find a rendering engine able to plot many points
    • Plot points on a map
    • Add tappable markers that open the product on tap
  • (Advanced search) Download results
    • Add note "Download results in XLSX or CSV format. Please note that for performance reasons, you can download up to 10.000 results only."
    • XLSX format - Excel or LibreOffice input type="radio" name="format" value="xlsx" id="format_xlsx" checked=""
    • CSV format - Character set: Unicode (UTF-8) - Separator: tabulation (tab) input type="radio" name="format" value="csv" id="format_csv"

Old mockups

image

Part of

@teolemon
Copy link
Member Author

teolemon commented Mar 28, 2022

@teolemon teolemon changed the title Create a visual interface for filtering Create a visual interface for search filtering Mar 28, 2022
@teolemon teolemon changed the title Create a visual interface for search filtering Create a visual interface for advanced search filtering Mar 28, 2022
@teolemon teolemon added this to the V1.1 milestone Apr 15, 2022
@teolemon teolemon added the P5 label May 25, 2022
@teolemon teolemon added P2 and removed P5 labels Jul 2, 2022
@teolemon
Copy link
Member Author

teolemon commented Jul 6, 2022

Or we could stick to the Web UI as a first iteration, potentially in a separate view from the current search first
image

@teolemon
Copy link
Member Author

I've opened an openfoodfacts-dart issue openfoodfacts/openfoodfacts-dart#515
because I fear we might be lacking full support from the V2 search endpoint

@teolemon
Copy link
Member Author

Bumping to P1

@M123-dev
Copy link
Member

M123-dev commented Aug 3, 2022

Had a lot to do lately, now I'm more active again, if you need a quick review feel free to ping me on them 😄

@teolemon
Copy link
Member Author

teolemon commented Oct 4, 2022

For the record, I just lost 30 min of edits on this issue 😿

@teolemon
Copy link
Member Author

teolemon commented Oct 5, 2022

@monsieurtanuki @M123-dev @g123k I have reworked the "Advanced Search" description, splitting it into tasks, with a new UI approach.
Rather than the sophisticated mockups inspired by the GitHub advanced search or anything else, I propose we duplicate the advanced search form of the web version as a first step, to get something working as quickly as we can, focusing on the basics

@monsieurtanuki
Copy link
Contributor

@teolemon I'm currently glued in the "background task + refresh" issue. I can put it on the shelf and work rather on the advanced search if needed.
My main question is: from where in the UX/UI do we reach the advanced search page?

@monsieurtanuki
Copy link
Contributor

monsieurtanuki commented Oct 5, 2022

@teolemon
Copy link
Member Author

teolemon commented Oct 5, 2022

@monsieurtanuki
Copy link
Contributor

monsieurtanuki commented Oct 5, 2022

@teolemon If I sum up, that would mean, in parallel:

  • creating a new "advanced search" page in dev mode
    • populate that page with whatever UI you want
    • including a "Go!" button, that in a first approach will just sum up the query by printing all parameters (no actual execution)
  • checking that we are able to deal with each parameter on the off-dart side as search query parameters

Then, link all the UI inputs with search query parameters.

Then, code the actual "Go!" action.

@teolemon teolemon added the 🎨 Mockups available Some mockups are available for this issue. Please check everything is ok before starting coding. label Dec 10, 2022
@monsieurtanuki monsieurtanuki removed their assignment Dec 10, 2022
@github-actions github-actions bot added the ⭐ top issue Top issue. label May 29, 2023
@github-actions github-actions bot added ⭐ top issue Top issue. and removed ⭐ top issue Top issue. labels Dec 16, 2023
@github-actions github-actions bot removed the ⭐ top issue Top issue. label Jan 8, 2024
@teolemon teolemon moved this to To Discuss and Validate in 🎨 UXR & Design team Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Mockups available Some mockups are available for this issue. Please check everything is ok before starting coding. 🎯 P1 🔎 Search
Projects
Status: To Discuss and Validate
Status: 💬 To discuss and validate
Development

No branches or pull requests

3 participants