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

Make linked images in knowledge panels clickable #5191

Closed
teolemon opened this issue May 2, 2024 · 1 comment · Fixed by #5220
Closed

Make linked images in knowledge panels clickable #5191

teolemon opened this issue May 2, 2024 · 1 comment · Fixed by #5220
Assignees
Labels

Comments

@teolemon
Copy link
Member

teolemon commented May 2, 2024

Problem

  • The new signal conso knowledge panel includes a clickable image
  • It's not currently clickable on mobile
  • Make linked images in knowledge panels clickable

Part of

@monsieurtanuki monsieurtanuki self-assigned this May 3, 2024
@monsieurtanuki
Copy link
Contributor

In KnowledgePanelImageElement, we need to support the link_url field, which is not the case for the moment even in off-dart.
Opening an issue in off-dart first.

      "fr_report_product_signalconso": {
        "elements": [
          {
            "element_type": "text",
            "text_element": {
              "html": "\nVous avez rencontré un problème avec ce produit : \u003Cb\u003Eétiquetage non conforme, produit périmé encore en vente,\nprésence d'un corps étranger, etc.\u003C/b\u003E ?\u003Cbr\u003E\nFaites un signalement à l'entreprise et à la répression des fraudes sur \u003Ca href=\"https://signal.conso.gouv.fr/fr/alimentaire-codebarres/faire-un-signalement?gtin=3700036902794&utm_source=openfoodfacts&utm_campaign=product_page_panel\"\u003ESignalConso\u003C/a\u003E,\nun outil de la Direction générale de la concurrence, de la consommation et de la répression des fraudes (DGCCRF).\n                "
            }
          },
          {
            "element_type": "image",
            "image_element": {
              "alt": "Je fais un signalement sur SignalConso",
              "link_url": "https://signal.conso.gouv.fr/fr/alimentaire-codebarres/faire-un-signalement?gtin=3700036902794&utm_source=openfoodfacts&utm_campaign=product_page_panel",
              "url": "https://static.openfoodfacts.org/images/panels/report_problem/signalconso-button.png"
            }
          }
        ],
        "evaluation": "neutral",
        "expand_for": "large",
        "level": "info",
        "title_element": {
          "icon_url": "https://static.openfoodfacts.org/images/panels/report_problem/signalconso.png",
          "subtitle": "Etiquetage non conforme, vente d'un produit périmé, présence d'un corps étranger, etc.",
          "title": "Faire un signalement sur SignalConso"
        },
        "topics": [
          "problem"
        ]
      },

cf. https://fr.openfoodfacts.org/api/v3/product/3700036902794?fields=knowledge_panels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants