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

Feat: add panel_group element and environment_card panel #5958

Merged
merged 3 commits into from
Oct 11, 2021

Conversation

stephanegigandet
Copy link
Contributor

Replaces #5955 with a clean commit history.

--

Some changes discussed with Jasmeet, in order to build the Environment card as designed by Tim.

The environment card is going to be itself a knowledge panel, of a special type "card", which will make it shown expanded, and we can round corners etc.

In it we have elements that are panel groups: groups that contain multiple panels. For instance the "Labels" panel group may contain an organic panel + a fair trade panel. This is to be able to display "section names" like we have in the mockup.

Mockup:

image

Current web display:

image

@stephanegigandet stephanegigandet added the 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels label Oct 11, 2021
@stephanegigandet stephanegigandet requested a review from a team as a code owner October 11, 2021 08:14
msgstr "Carbon footprint"

msgctxt "carbon_footprint_per_100g_of_product"
msgid "g CO² per 100g of product"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use a placeholder for languages which change the order of words ?

Suggested change
msgid "g CO² per 100g of product"
msgid "%s g CO² per 100g of product"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@jasmeet0817
Copy link
Contributor

Hello, possible to see a sample json response ? Can review the PR from API perspective, but probably better I leave the code review to Alex:)

@stephanegigandet
Copy link
Contributor Author

Hello, possible to see a sample json response ? Can review the PR from API perspective, but probably better I leave the code review to Alex:)

Hi @jasmeet0817 , yes, you can see it on the dev server (login and password: off ) : https://uk.openfoodfacts.dev/api/v2/product/3017620422003/nutella-ferrero?fields=knowledge_panels

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stephanegigandet stephanegigandet merged commit e10ec23 into main Oct 11, 2021
@stephanegigandet stephanegigandet deleted the panels2 branch October 11, 2021 14:21
@jasmeet0817
Copy link
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants