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: 5128 - visible dates on raw image grid items #5144

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now the upload date is displayed on top of raw image grid items.
  • The background of the tag is white if not expired (less than 1 year old), or red
  • That works only for products refreshed after the app upgrade, as we use a new field (upload timestamp) that wasn't retrieved before.
  • In case we don't have an upload timestamp, we display no tag at all, only the image (like before).
  • We should probably somehow display that upload date in other places, like the full uploaded image page.
  • Probably also on the "main" images, but that could be source of confusion, because the last modified date of a main image may be very different from the upload timestamp of the underlying raw image.

Screenshot

Screenshot_1712486978

Part of

Impacted files

  • product_image_gallery_other_view.dart: display the upload date on top of raw image grid items
  • product_image_gallery_view.dart: unrelated minor refactoring
  • pubspec.lock: wtf
  • pubspec.yaml: upgrade to off-dart 3.5.0 in order to get the uploaded timestamp of raw images
  • smooth_image.dart: unrelated minor refactoring

Impacted files:
* `product_image_gallery_other_view.dart`: display the upload date on top of raw image grid items
* `product_image_gallery_view.dart`: unrelated minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 3.5.0 in order to get the uploaded timestamp of raw images
* `smooth_image.dart`: unrelated minor refactoring
@monsieurtanuki
Copy link
Contributor Author

@jusdekiwi ping

@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 9.52%. Comparing base (4d9c7fc) to head (5d7d88c).
Report is 61 commits behind head on develop.

Files Patch % Lines
.../pages/image/product_image_gallery_other_view.dart 0.00% 17 Missing ⚠️
.../lib/pages/product/product_image_gallery_view.dart 0.00% 3 Missing ⚠️
...p/lib/generic_lib/widgets/images/smooth_image.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5144      +/-   ##
==========================================
- Coverage     9.54%   9.52%   -0.03%     
==========================================
  Files          325     327       +2     
  Lines        16411   16541     +130     
==========================================
+ Hits          1567    1576       +9     
- Misses       14844   14965     +121     

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

@jusdekiwi
Copy link

Seems super great!! I love it :D @monsieurtanuki

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.

We'll probably have to rethink things for moderation but Looks good.

@monsieurtanuki monsieurtanuki merged commit 1922d39 into openfoodfacts:develop Apr 8, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon @jusdekiwi for your review and comments!

@jusdekiwi
Copy link

Thank you for you work @monsieurtanuki ! :D

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.

4 participants