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: 5191 - knowledge panel image card now clickable #5220

Merged
merged 2 commits into from
May 5, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • The knowledge panel image card is now clickable, but only if the linkUrl field is populated.
  • This applies in particular to "signal conso" image.
  • Products need to be refreshed, because before off-dart 3.7.0 we didn't store the linkUrl field.

Screenshots

smoothie page linked page
Screenshot_20240505_112852 Screenshot_20240505_112528_Chrome

Fixes bug(s)

Impacted files

  • knowledge_panel_image_card.dart: now using the optional linkUrl field for click operation
  • pubspec.lock: wtf
  • pubspec.yaml: upgraded to off-dart 3.7.0

Impacted files:
* `knowledge_panel_image_card.dart`: now using the optional `linkUrl` field for click operation
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to off-dart 3.7.0
@codecov-commenter
Copy link

codecov-commenter commented May 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 8.68%. Comparing base (4d9c7fc) to head (eaa670a).
Report is 99 commits behind head on develop.

Files Patch % Lines
...l/knowledge_panels/knowledge_panel_image_card.dart 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5220      +/-   ##
==========================================
- Coverage     9.54%   8.68%   -0.87%     
==========================================
  Files          325     327       +2     
  Lines        16411   16575     +164     
==========================================
- Hits          1567    1440     -127     
- Misses       14844   15135     +291     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

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

Great 👍
We're going to invest time to make Knowledge panels more extensible as part of the Open Beauty Facts, Open Products Facts fusion.
Anything that make them more resilient client side will be useful as well.

@monsieurtanuki monsieurtanuki merged commit db20b51 into openfoodfacts:develop May 5, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Please have a look if it does fix #5217 too.

Great 👍 We're going to invest time to make Knowledge panels more extensible as part of the Open Beauty Facts, Open Products Facts fusion. Anything that make them more resilient client side will be useful as well.

If we want to be resilient we need to be stupid and store JSON as is.
Instead of using more elaborate OOP like classes early in the process, we need to use OOP "just in time", which gives more flexibility and more resilience.
That would be only for knowledge panels, right?
cf. openfoodfacts/openfoodfacts-dart#900

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

Successfully merging this pull request may close these issues.

Make linked images in knowledge panels clickable
3 participants