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: UI Improvements for the photo gallery #5852

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Nov 14, 2024

Hi everyone!

Here are a few changes to the photo gallery.
🎥 https://github.com/user-attachments/assets/91d52794-a613-4ee7-97ed-f0a8ff30a38e

  • The "Take a picture" button (was in the FAB) is moved into the AppBar

  • The language picker is also in the AppBar
    IMG_1351

  • The grid layout is changed

  • The indicator on the left is green (up-to-date photo), orange (maybe outdated), red (no picture available)

  • The type is on top and not below

  • The text is not shrunk
    IMG_1351

  • The image is not centered anymore and uses the same effect as the product page.
    IMG_1351

File changes:

  • product_title_card.dart: everything related to the product picture is removed from this file
  • smooth_product_image.dart: the code from product_title_card.dart + new features
  • product_cards_helper.dart: the "ProductAppBar" can have actions and a bottom widget
  • product_image_widget.dart: in the grid, the obsolete icon is now orange
  • product_image_gallery_view.dart: use the new layout
  • product_image_viewer.dart: add a Hero animation
  • app_icons.dart: two variants for the CircledArrow
  • smooth_theme.dart: instead of Theme.of().extension<>…!, we can use context.extension<>()
  • smooth_app_bar.dart: the foreground color was not passed correctly to the title

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 2.59259% with 263 lines in your changes missing coverage. Please review.

Project coverage is 6.90%. Comparing base (4d9c7fc) to head (2cd4a35).
Report is 477 commits behind head on develop.

Files with missing lines Patch % Lines
.../lib/cards/product_cards/smooth_product_image.dart 0.00% 144 Missing ⚠️
.../lib/pages/product/product_image_gallery_view.dart 0.00% 78 Missing ⚠️
packages/smooth_app/lib/resources/app_icons.dart 4.76% 20 Missing ⚠️
...pp/lib/cards/product_cards/product_title_card.dart 0.00% 13 Missing ⚠️
...ooth_app/lib/pages/image/product_image_widget.dart 0.00% 2 Missing ⚠️
...ib/pages/product/product_image_swipeable_view.dart 0.00% 2 Missing ⚠️
...th_app/lib/pages/product/product_image_viewer.dart 0.00% 2 Missing ⚠️
packages/smooth_app/lib/themes/smooth_theme.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5852      +/-   ##
==========================================
- Coverage     9.54%   6.90%   -2.65%     
==========================================
  Files          325     423      +98     
  Lines        16411   23352    +6941     
==========================================
+ Hits          1567    1612      +45     
- Misses       14844   21740    +6896     

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

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @g123k!
Nothing special to report.

Comment on lines +81 to +83
onTap: () async => Navigator.push<void>(
context,
MaterialPageRoute<bool>(
Copy link
Contributor

Choose a reason for hiding this comment

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

void or bool?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, that's a copy/paste from the current code.
I'll fix that

@teolemon teolemon merged commit 9eba6ae into openfoodfacts:develop Nov 14, 2024
6 checks passed
@g123k g123k deleted the product_gallery branch November 18, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants