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: Scan cards share the same UI #5866

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Nov 16, 2024

Hi everyone!

This is a big PR with changes to 39 files (new code + renaming).
⚠️ I haven't translated anything into English. It would be nice if you could do it.

🎥 Video: https://youtu.be/K1lqRVUxayo

What's new

  • All scan cards share the same UI
  • If a barcode was syntactically incorrect, there was simply no card, no error… (fixed ✅)
  • In the code, there were some classes with duplicate names (fixed ✅)
  • In the code, there was an unused "Thanks" state (removed 🗑️)
  • My PR will ease the removal of the carousel (💣)

Side quests:

  • The Hero animation works between the carousel / product page / gallery / details (cf video)

  • From the carousel, the product page shows a minimize button:
    Screenshot_20241116-115720

  • The Compare button on the scanner uses the correct icon:
    Screenshot_20241116-121009

Product found

The obsolete icon is visible from the carousel. Is-it useful (cc @teolemon?)
Untitled

Loading

The animation is still used:
Untitled

New product

Untitled

Error (network)

Untitled

Error (invalid barcode)

Untitled

List of changes:
product_title_card.dart: Pass the heroTag to the picture + use the same layout for all cards (except in the onboarding, where the image is hidden)
smooth_product_base_card.dart: The base card for all scan cards + shared Widgets
smooth_card.dart: The Container is replaced by a Padding (faster)
product_compatibility_helper.dart: Help to format the score with at least 2 digits
strings_helper.dart: Code moved
app_navigator.dart: Provide the back button type for the product page
reinvention_page.dart: Nothing relevant - OnboardingText is moved elsewhere
edit_product_page.dart: A generic barcode Widget is now available
product_compatibility_header.dart: Not used anymore
product_image_viewer.dart: A fix for multiple Heroes animations

@github-actions github-actions bot added 🥫 Product page 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… summary card ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users ranking labels Nov 16, 2024
@github-actions github-actions bot added 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… product scan carousel router labels Nov 16, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2024

Codecov Report

Attention: Patch coverage is 0.80483% with 493 lines in your changes missing coverage. Please review.

Project coverage is 6.81%. Comparing base (4d9c7fc) to head (dd57f6d).
Report is 480 commits behind head on develop.

Files with missing lines Patch % Lines
.../cards/product_cards/smooth_product_base_card.dart 0.00% 112 Missing ⚠️
packages/smooth_app/lib/widgets/smooth_text.dart 0.00% 68 Missing ⚠️
...cards/product_cards/smooth_product_card_found.dart 0.00% 35 Missing ⚠️
.../smooth_app/lib/widgets/smooth_barcode_widget.dart 0.00% 35 Missing ⚠️
...ges/smooth_app/lib/pages/product/summary_card.dart 0.00% 33 Missing ⚠️
...pp/lib/cards/product_cards/product_title_card.dart 0.00% 29 Missing ⚠️
...cards/product_cards/smooth_product_card_error.dart 0.00% 22 Missing ⚠️
...s/smooth_app/lib/pages/scan/scan_product_card.dart 0.00% 20 Missing ⚠️
...s/product_cards/smooth_product_card_not_found.dart 0.00% 19 Missing ⚠️
...rds/product_cards/smooth_product_card_loading.dart 0.00% 16 Missing ⚠️
... and 19 more
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5866      +/-   ##
==========================================
- Coverage     9.54%   6.81%   -2.74%     
==========================================
  Files          325     428     +103     
  Lines        16411   23637    +7226     
==========================================
+ Hits          1567    1611      +44     
- Misses       14844   22026    +7182     

☔ 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.

LGTM @g123k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… 🥫 Product page product scan carousel ranking router 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… summary card
Development

Successfully merging this pull request may close these issues.

3 participants