You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leverage sub-knowledge panels towards the road to Scores
The server side now provides hints for editing
Mockup
Why
The user should never be in a dead end.
How
The API should be available on the .net and .org server https://world.openfoodfacts.org/api/v2/product/4006922007543.json?fields=knowledge_panels
This extends the knowledge panels API to add a new "action" element that contains a list of actions such as "add_categories", "add_ingredients_text", "add_nutrition_facts". Clients can then add buttons or links to directly add or edit the corresponding data.
e.g. ingredients panel when we don't have ingredients:
Nutri-Score panel when we are missing the category + nutrition facts:
nutriscore: {
elements: [
{
element_type: "text",
text_element: {
html: "La catégorie du produit doit être spécifiée afin de calculer le Nutri-Score.
",
type: "warning"
}
},
{
element_type: "text",
text_element: {
html: "Les données nutritionnelles du produit doivent être spécifiées afin de calculer le Nutri-Score.
",
type: "warning"
}
},
{
action_element: {
actions: [
"add_categories",
"add_nutrition_facts"
],
html: "Could you add the information needed to compute the Nutri-Score?"
},
element_type: "action"
},
The text was updated successfully, but these errors were encountered:
What
Mockup
Why
How
The API should be available on the .net and .org server
https://world.openfoodfacts.org/api/v2/product/4006922007543.json?fields=knowledge_panels
This extends the knowledge panels API to add a new "action" element that contains a list of actions such as "add_categories", "add_ingredients_text", "add_nutrition_facts". Clients can then add buttons or links to directly add or edit the corresponding data.
e.g. ingredients panel when we don't have ingredients:
Nutri-Score panel when we are missing the category + nutrition facts:
The text was updated successfully, but these errors were encountered: