-
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: launch new Nutri-Score for France (#11123)
This PR removes the display of the old Nutri-Score and displays the new Nutri-Score for all products. For moderators and on the pro platform, we also display the old Nutri-Score below the new one. The PR also adds a panel to briefly list the main improvements, which links to /new-nutri-score (which will be the new address for the https://world.openfoodfacts.org/nutriscore-v2 page) ![image](https://github.com/user-attachments/assets/f4f8a425-0ef4-4cc1-9876-5479e9ae887f) ![image](https://github.com/user-attachments/assets/027da72b-9b31-413c-adc6-5d7197dbd461) --------- Co-authored-by: Open Food Facts Bot <contact@openfoodfacts.org>
- Loading branch information
1 parent
f47fddf
commit e1a7800
Showing
34 changed files
with
2,449 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
templates/api/knowledge-panels/health/nutriscore/nutriscore_new_computation.tt.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"level": "info", | ||
"topics": [ | ||
"health" | ||
], | ||
"title_element": { | ||
"icon_url": "[% static_subdomain %]/images/icons/dist/info.svg", | ||
"icon_size": "small", | ||
"title": "[% edq(lang('nutriscore_new_computation_title')) %]", | ||
"type": "info", | ||
}, | ||
"elements": [ | ||
// Explanation of Nutri-Score | ||
{ | ||
"element_type": "text", | ||
"text_element": { | ||
"type": "info", | ||
"html": `[% lang("nutriscore_new_computation_description") %] | ||
`, | ||
} | ||
}, | ||
{ | ||
"element_type": "text", | ||
"text_element": { | ||
// Display the link to the new Nutri-Score computation page | ||
// on mobile: keep the /nutriscore-v2 link until the app can handle the new URLs | ||
"html": ` | ||
<p>→ <a href="[% IF knowledge_panels_options.knowledge_panels_client == 'web' %]/new-nutri-score[% ELSE %]/nutriscore-v2[% END %]">[% lang('nutriscore_new_computation_link_text') %]</a></p> | ||
` | ||
}, | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.