-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Recommendation panels (global + country specific) for health: alcohol and pulses #6272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo a comment on a potential bug
}, | ||
[% END %] | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est normal qu'il soit là lui ?
templates/web/panels/panel.tt.html
Outdated
@@ -149,6 +149,17 @@ <h4 class="panel_title"> | |||
<img src="[% image_element.url %]" alt="[% image_element.alt %]"> | |||
[% IF image_element.link_url.defined %]</a>[% END %] | |||
|
|||
[% IF image_element.source_url.defined %] | |||
<div class="image_source" style="font-style:italic">[% lang("source") %][% sep %]: | |||
<a href="[% text_element.source_url %]">[% image_element.source_text %] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it href="[% image_element.source_url %]"
? or is it the IF above ill defined ? I'm a bit confused…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right, my mistake, thanks!
Kudos, SonarCloud Quality Gate passed!
|
This is a first implementation of panels to make recommendations based on products (e.g. categories, ingredients, nutrients) and users (based on country, language, and maybe later on personal preferences).
The first recommendations are examples, to see how it looks on the web and in the app, experiment with ways to define them etc.
Those first recommendations are related to health and shown in the health card, below the Nutri-Score panel, but we could also have other kinds of recommendations, for instance related to the environment.
The first recommendation is for alcoholic beverages. By default, we show the WHO recommendation, and for users in France with the French language, we show instead the recommendation from the French health agency.
in France:
The second one is to suggest eating more pulses, and this one is specific to France.
Note: there should be an extra link in the panel to indicate the source of the recommendation, but the implementation is in another PR: #6270