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: 5204 - multi-product price addition #5375

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now we can add several product prices in one shot, and even offline.
  • For the time being, it's just that on all the "add a single price" pages we can add and remove products (and their prices).
  • The products are found by barcodes, locally, and from the server if needed.
  • Many possible improvements in next PRs:
    • more obvious "Add prices" / "Add receipt" buttons - but I don't know where to put them in the app
    • more refined product selection - scanner, list of previous "price" products, list of local products, full text search, ...

Screenshots

top middle bottom
Screenshot_1718384964 Screenshot_1718385144 Screenshot_1718385155

Et voilà:
Capture d’écran 2024-06-14 à 19 14 02

Fixes bug(s)

Impacted files

  • app_en.arb: added 3 labels and removed one redundant one
  • app_fr.arb: added 3 labels and removed one redundant one
  • background_task_add_price.dart: now we manage multiple products, in Lists
  • price_amount_card.dart: small UI/UX differences for a single product among several products; minor code simplification
  • price_model.dart: now we manage multiple products
  • price_product_search_page.dart: added "no initial product" case
  • product_price_add_page.dart: now we manage multiple products

Impacted files:
* `app_en.arb`: added 3 labels and removed one redundant one
* `app_fr.arb`: added 3 labels and removed one redundant one
* `background_task_add_price.dart`: now we manage multiple products, in `List`s
* `price_amount_card.dart`: small UI/UX differences for a single product among several products; minor code simplification
* `price_model.dart`: now we manage multiple products
* `price_product_search_page.dart`: added "no initial product" case
* `product_price_add_page.dart`: now we manage multiple products
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.

Woohoo 🎉

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0.96154% with 103 lines in your changes missing coverage. Please review.

Project coverage is 7.38%. Comparing base (4d9c7fc) to head (f9a3e61).
Report is 189 commits behind head on develop.

Current head f9a3e61 differs from pull request most recent head 19f867c

Please upload reports for the commit 19f867c to get more accurate results.

Files Patch % Lines
..._app/lib/background/background_task_add_price.dart 0.00% 43 Missing ⚠️
...kages/smooth_app/lib/pages/prices/price_model.dart 0.00% 21 Missing ⚠️
...smooth_app/lib/pages/prices/price_amount_card.dart 0.00% 20 Missing ⚠️
...h_app/lib/pages/prices/product_price_add_page.dart 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5375      +/-   ##
==========================================
- Coverage     9.54%   7.38%   -2.17%     
==========================================
  Files          325     384      +59     
  Lines        16411   19633    +3222     
==========================================
- Hits          1567    1449     -118     
- Misses       14844   18184    +3340     

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

@monsieurtanuki monsieurtanuki merged commit b300955 into openfoodfacts:develop Jun 14, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your quick review!

Play with it and tell me what you like / don't like.

cc @raphael0202 @raphodn

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

Successfully merging this pull request may close these issues.

Replicate the 'Add Receipts' view from the Open Prices web app
3 participants