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: Hunger Games brand link on the product page when a brand is defined #7828

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

teolemon
Copy link
Member

@teolemon teolemon commented Dec 10, 2022

What

  • Hunger Games brand link on the product page when a brand is defined
  • Emulate a nice Power User Script feature

Screenshot of the Power User Script version being emulated

image

@teolemon teolemon added hunger games Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. labels Dec 10, 2022
@teolemon teolemon marked this pull request as ready for review December 12, 2022 12:19
@teolemon teolemon requested a review from a team as a code owner December 12, 2022 12:19
@stephanegigandet
Copy link
Contributor

I think something like this needs to be discussed more broadly, if we add power user features to the website, then the website becomes more complex and difficult to understand for newcomers. There are certainly some solutions to consider, like having a contributor mode that can be toggled. I suggest we open an issue for it.

@teolemon
Copy link
Member Author

@teolemon
Copy link
Member Author

Based on feedback by @stephanegigandet , I will restrict that to moderators

<p id="field_[% field %]">
<span class="field">[% name %][% sep %]: </span>
<span class="field_value" id="field_[% field %]_value">[% value %]</span>
<sup>[<a href="https://hunger.openfoodfacts.org/questions?value_tag=[% field %]&amp;type=brand" title="Help with this brand on Hunger Games">Help with this brand on Hunger Games</a>]</sup>
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not as simple, [% value %] contains a comma separated list of links, so we can't construct an hunger game URL like that.

e.g. if we have 2 brands, [% value %] will generate this:

Activia, Danone

@sonarcloud
Copy link

sonarcloud bot commented Dec 14, 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

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Mar 15, 2023
Copy link

sonarcloud bot commented Nov 9, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fields hunger games power tools for contributors Power User Script ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants