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

Create a Knowledge Panel Facets section with high-level explanation and a link to the Knowledge Panel Facets API #7746

Closed
2 tasks
Tracked by #7446
teolemon opened this issue Nov 22, 2022 · 3 comments
Labels
📚 Documentation Documentation issues improve the project for everyone. good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. 📖 Knowledge Panels - For facets 🎯 P1 Road to Doc ⭐ top issue Top issue.

Comments

@teolemon
Copy link
Member

teolemon commented Nov 22, 2022

What

Code pointer

Part of

@teolemon teolemon added the 📚 Documentation Documentation issues improve the project for everyone. label Nov 22, 2022
@teolemon
Copy link
Member Author

cc @sumit-158

@teolemon teolemon added good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. 📖 Knowledge Panels - For facets labels Nov 22, 2022
@teolemon teolemon moved this to 📋 Backlog in Knowledge Panels for Facets Nov 30, 2022
@github-actions github-actions bot added the ⭐ top issue Top issue. label Dec 1, 2022
@alexgarel
Copy link
Member

alexgarel commented Jan 18, 2023

How to do it:

  • create a js file to call the facets knowledge panel API and inject the html in the page
  • include this js in the facet page generated by the server (the js function should be called with parameters either given through the template mechanism or using the page url)
    • see display_tag in Display.pm
  • add some css rules for the html to be rendered correctly
    • you can ask for changes in generated html if needed on facets knowledge panel repository

@alexgarel
Copy link
Member

@sumit-158 as found the place to put it: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/templates/web/pages/tag/tag.tt.html
it’s called by display_tag in Display.pm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 Documentation Documentation issues improve the project for everyone. good first issue Welcome to Open Food Facts. This issue should be approachable if you're new. Get in touch for help. 📖 Knowledge Panels - For facets 🎯 P1 Road to Doc ⭐ top issue Top issue.
Projects
Archived in project
Status: No status
Development

No branches or pull requests

3 participants