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

Support field KnowledgePanelImageElement.link_url #919

Closed
monsieurtanuki opened this issue May 3, 2024 · 0 comments · Fixed by #920
Closed

Support field KnowledgePanelImageElement.link_url #919

monsieurtanuki opened this issue May 3, 2024 · 0 comments · Fixed by #920
Assignees

Comments

@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

Originally posted by @monsieurtanuki in openfoodfacts/smooth-app#5191 (comment)

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

Successfully merging a pull request may close this issue.

1 participant