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: Injecting Facet-knoweledge-panel #8055

Merged
merged 33 commits into from
Feb 27, 2023

Conversation

sumit-158
Copy link
Member

@sumit-158 sumit-158 commented Jan 31, 2023

What

  • injecting Facet Knowledge Panel through Js and HTML

Screenshot

image

Related issue(s) and discussion

Fixes:

@github-actions github-actions bot added Display product history We have kept 10 years of product revisions. This is useful to monitor edits & product improvements Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. labels Jan 31, 2023
@sumit-158
Copy link
Member Author

sumit-158 commented Feb 1, 2023

@stephanegigandet @alexgarel I have implemented facet-knowledge-panels but need your help to implement other features :-)

  1. To get translated results through the facet-knowledge-panel I need country code and as far as I think the country code can get from this"https://fr.openfoodfacts.org/" so, how can I get it and inject it into "tag.tt.html"?
  2. Currently "[% tag_name %]" from "tag.tt.html" gives a name like "Snacks" but for a better result, the API needs facet_value with lang_code(I'm guessing it's a lang_code) as "en:snacks", "fr:fitou".

@sumit-158 sumit-158 requested review from alexgarel and stephanegigandet and removed request for alexgarel and stephanegigandet February 6, 2023 10:47
@alexgarel alexgarel changed the title build: Injecting Facet-knoweledge-panel feat: Injecting Facet-knoweledge-panel Feb 14, 2023
@sumit-158
Copy link
Member Author

@sumit-158 I resolved the problem.

Thank you! @alexgarel

@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Feb 16, 2023
@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label Feb 17, 2023
@alexgarel
Copy link
Member

@sumit-158 I though you were going to do the "style" before we commit (as suggested here: #8055 (review))

@sumit-158
Copy link
Member Author

@sumit-158 I though you were going to do the "style" before we commit

@alexgarel I'm thinking of doing that in separate pr as this is already too old.

@alexgarel
Copy link
Member

As told today:

  • change layout
  • in the javascript on openfoodfacts-server, by default, open the "hunger-game" and "last-edits" panels

@sumit-158
Copy link
Member Author

As told today:

* change layout

* in the javascript on openfoodfacts-server, by default, open the "hunger-game" and "last-edits" panels

It is done in the latest commit.

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.

Let's merge !

@sonarcloud
Copy link

sonarcloud bot commented Feb 23, 2023

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 4b5bcfa into openfoodfacts:main Feb 27, 2023
@alexgarel
Copy link
Member

Congrats @sumit-158 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Display product history We have kept 10 years of product revisions. This is useful to monitor edits & product improvements Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants