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 more actions #7304

Merged
merged 23 commits into from
Dec 6, 2022
Merged

feat: Add more actions #7304

merged 23 commits into from
Dec 6, 2022

Conversation

teolemon
Copy link
Member

@teolemon teolemon commented Sep 6, 2022

What

  • Add more actions to panels
    • start by listing all the actions that are possible in the app
    • Add matching string in the GetText files
    • Packaging - templates/api/knowledge-panels/environment/packaging_recycling.tt.json
      • in the related the sub-knowledge panel
      • in the matching ecoscore sub-knowledge panel if an eco-score is already computed
      • Add differentiated support for packaging photo and packaging text
    • Origins of ingredients - templates/api/knowledge-panels/environment/origins_of_ingredients.tt.json
      • in case there are none, in the Eco-Score sub-knowledge panel section about origins if an eco-score is already computed

@github-actions github-actions bot added the Translations We use a non-standard version of GetText, lack language variants support translate.openfoodfacts.org label Sep 6, 2022
@teolemon teolemon linked an issue Sep 6, 2022 that may be closed by this pull request
48 tasks
@github-actions github-actions bot added 📖 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. labels Sep 6, 2022
@teolemon teolemon changed the title WIP - Add more actions feat: WIP - Add more actions Sep 6, 2022
clarify that some of those sections do not exist on web yet
po/common/common.pot Outdated Show resolved Hide resolved
po/common/common.pot Outdated Show resolved Hide resolved
po/common/common.pot Outdated Show resolved Hide resolved
po/common/common.pot Outdated Show resolved Hide resolved
po/common/common.pot Outdated Show resolved Hide resolved
po/common/common.pot Outdated Show resolved Hide resolved
po/common/common.pot Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Sep 6, 2022

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

@teolemon teolemon marked this pull request as ready for review October 10, 2022 07:44
@teolemon teolemon requested a review from a team as a code owner October 10, 2022 07:44
@teolemon teolemon added the 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling label Oct 10, 2022
@teolemon
Copy link
Member Author

Failed test at tests/unit/templates.t line 42.

failed to fetch template: file error - parse error - api/knowledge-panels/health/ingredients/nova.tt.json line 58: unexpected token (=)

[% IF product.nova_group_error = 'missing_ingredients' %]

@M123-dev
Copy link
Member

M123-dev commented Dec 5, 2022

Is the problem fixed by now

@teolemon
Copy link
Member Author

teolemon commented Dec 6, 2022

No, we need to generate new test outputs for the build to go green, and the PR to be mergeable

Comment on lines 15 to 23
{
"element_type": "action",
"action_element": {
"html": `[% lang("action_add_origins") %]`,
"actions": [
"add_origins",
]
}
},
Copy link
Member

Choose a reason for hiding this comment

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

You broke the json here ;-) (it should be included after "elements")
I'm fixing it.

@github-actions github-actions bot added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 🧪 integration tests 🧪 tests labels Dec 6, 2022
@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2022

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

@alexgarel alexgarel merged commit b68735b into main Dec 6, 2022
@alexgarel alexgarel deleted the add-more-actions branch December 6, 2022 17:05
alexgarel added a commit that referenced this pull request Dec 19, 2022
Translations for actions forgotten in #7304

fixes: #7858
alexgarel added a commit that referenced this pull request Dec 20, 2022
Translations for actions forgotten in #7304
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…) 🌱 Eco-Score https://world.openfoodfacts.org/eco-score-the-environmental-impact-of-food-products 🧪 integration tests 📖 Knowledge panels - Actions 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Nova - Ultra-processed foods NOVA is an indicator for food ultra-processing https://world.openfoodfacts.org/nova 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling Products ⭐ top pull request Top pull request. Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests Translations We use a non-standard version of GetText, lack language variants support translate.openfoodfacts.org
Projects
Status: 👀 PRs
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Add more actions to panels
3 participants