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

fix: Green-Score attributes/panels titles and subtitles #11244

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

stephanegigandet
Copy link
Contributor

A few fixes/changes:

  • we still had a "A-PLUS" instead of "A+" in a knowledge panel title
  • separated title and subtitle
  • for not-applicable, changed the "short description" so that it includes the non-applicable category (e.g. "sodas"), and display it directly in the attribute subtitle. (it's a bit longer, but probably worth displaying directly).

@stephanegigandet stephanegigandet requested a review from a team as a code owner January 15, 2025 10:43
@github-actions github-actions bot added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🧪 tests 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. Attributes https://wiki.openfoodfacts.org/Product_Attributes 🧪 integration tests 🌐 Translations labels Jan 15, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 49.26%. Comparing base (79e63cd) to head (e84cd26).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/ProductOpener/Attributes.pm 0.00% 2 Missing ⚠️
lib/ProductOpener/KnowledgePanels.pm 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11244   +/-   ##
=======================================
  Coverage   49.25%   49.26%           
=======================================
  Files          78       78           
  Lines       22418    22417    -1     
  Branches     5372     5372           
=======================================
  Hits        11043    11043           
+ Misses      10019    10018    -1     
  Partials     1356     1356           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Thanks !

Comment on lines 5391 to +5393
msgctxt "attribute_environmental_score_not_applicable_description_short"
msgid "Not yet applicable for the category"
msgstr "Not yet applicable for the category"
msgid "Not applicable for the category"
msgstr "Not applicable for the category"
Copy link
Member

Choose a reason for hiding this comment

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

Are we still using it then ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this just changes the message for some categories like sodas and water. We might get a Green-Score for them at some point, but we don't necessarily want people to think it will come soon.

@stephanegigandet stephanegigandet merged commit 1eb84a5 into main Jan 15, 2025
18 checks passed
@stephanegigandet stephanegigandet deleted the greenscore branch January 15, 2025 16:53
stephanegigandet pushed a commit that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.55.0](v2.54.0...v2.55.0)
(2025-01-17)


### Features

* determine packaging components in contact with food
([#11238](#11238))
([c5cda35](c5cda35))
* serve content without header and footer for mobile app
([#11245](#11245))
([662a96b](662a96b))


### Bug Fixes

* Green-Score attributes/panels titles and subtitles
([#11244](#11244))
([1eb84a5](1eb84a5))
* more positive messages for Nova 4
([#11231](#11231))
([79e63cd](79e63cd))
* Update fundraiser text to 2025
([#11248](#11248))
([b88f43e](b88f43e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) Attributes https://wiki.openfoodfacts.org/Product_Attributes 🧪 integration tests 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests 🌐 Translations
Development

Successfully merging this pull request may close these issues.

3 participants