-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
fix: 5744 - cached donation_campaign fr.svg en.svg #5748
Conversation
New file: * `donation_campaign__fr.svg` Impacted files: * `abstract_cache.dart`: now we may cache svg files including their folder names * `svg_cache.dart`: potentially folder names for cached svg files
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5748 +/- ##
==========================================
- Coverage 9.54% 7.07% -2.48%
==========================================
Files 325 411 +86
Lines 16411 22246 +5835
==========================================
+ Hits 1567 1574 +7
- Misses 14844 20672 +5828 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g123k @stephanegigandet @monsieurtanuki we could go for the full path of the image ?
We don't need to cache this image and the same goes for |
I don't think we can afford very long filenames in flutter asset folders, therefore I wouldn't recommend that (with a limited added value, too).
I wouldn't say we don't need to cache these images, as they're supposed to be displayed quickly and on the home page. |
Honestly, I would prefer to fix things correctly by displaying the news only if the image is available/loaded. Hence, we don't embed unnecessary things (e.g.: why do we store the FR variant for non-French users?) and we never forget them indefinitely. Minor fix:
|
Not very relevant anymore as donation campaign svg filenames are less ambiguous now. |
What
fr.svg
for https://raw.githubusercontent.com/openfoodfacts/smooth-app_assets/refs/heads/main/prod/tagline/android/assets/donation_campaign/fr.svg ), we have the possibility to include its folder in the cached svg filename (e.g.donation_campaign__fr.svg
)Fixes bug(s)
Files
New file:
donation_campaign__fr.svg
Impacted files:
abstract_cache.dart
: now we may cache svg files including their folder namessvg_cache.dart
: potentially folder names for cached svg files