Skip to content

fix: 7623 - cleaner UI/UX for price adding#7625

Merged
monsieurtanuki merged 4 commits into
openfoodfacts:developfrom
monsieurtanuki:fix/7623
Jul 10, 2026
Merged

fix: 7623 - cleaner UI/UX for price adding#7625
monsieurtanuki merged 4 commits into
openfoodfacts:developfrom
monsieurtanuki:fix/7623

Conversation

@monsieurtanuki

Copy link
Copy Markdown
Contributor

What

The latest version of the price adding introduced inconsistencies and removed features.
This PR fixes the most obvious problems:

  • removal of the redundant "number of products" from the amount card, as it's already there twice in the page
  • removal of the inconsistent "total price" from the amount card, as functionally it cannot be computed
  • addition of the discount type drop down button, that was accidentally removed
  • removal of the "location after image" business rule, as it was inconsistent with the "but you can add products regardless" apparent rule
  • removal of the additional "add product" FAB, that was overlapping with the "send prices" FAB

Screenshots

a b
Screenshot_20260707_085511 Screenshot_20260707_085658

Fixes bug(s)

Files

Deleted files:

  • price_add_product_button.dart
  • price_amount_quantity.dart
  • price_amount_sum.dart

Impacted files:

  • app_localizations.dart: wtf
  • price_amount_card.dart: removed redundant and incorrect data
  • price_amount_card_item.dart: put back the discount type drow down button
  • price_location_card.dart: removed the inconsistent "no edit" mode
  • product_price_add_page.dart: removed the additional "add" FAB

Deleted files:
* `price_add_product_button.dart`
* `price_amount_quantity.dart`
* `price_amount_sum.dart`

Impacted files:
* `app_localizations.dart`: wtf
* `price_amount_card.dart`: removed redundant and incorrect data
* `price_amount_card_item.dart`: put back the discount type drow down button
* `price_location_card.dart`: removed the inconsistent "no edit" mode
* `product_price_add_page.dart`: removed the additional "add" FAB
@codecov-commenter

codecov-commenter commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.06%. Comparing base (4d9c7fc) to head (06253a4).
⚠️ Report is 1463 commits behind head on develop.

Files with missing lines Patch % Lines
...h_app/lib/pages/prices/product_price_add_page.dart 0.00% 8 Missing ⚠️
...ooth_app/lib/pages/prices/price_location_card.dart 0.00% 6 Missing ⚠️
...h_app/lib/pages/prices/price_amount_card_item.dart 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #7625      +/-   ##
==========================================
- Coverage     9.54%   9.06%   -0.49%     
==========================================
  Files          325     646     +321     
  Lines        16411   37511   +21100     
==========================================
+ Hits          1567    3399    +1832     
- Misses       14844   34112   +19268     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@teolemon

Copy link
Copy Markdown
Member

I liked that they mirror a physical receipts, where those are usually visible at the end:
removal of the redundant "number of products" from the amount card, as it's already there twice in the page
removal of the inconsistent "total price" from the amount card, as functionally it cannot be computed

@github-project-automation github-project-automation Bot moved this from 💬 To discuss and validate to 🎊 Done in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jul 10, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Ready in 💸 Open Prices Jul 10, 2026
@monsieurtanuki monsieurtanuki merged commit ffb03d4 into openfoodfacts:develop Jul 10, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in 💸 Open Prices Jul 10, 2026
@monsieurtanuki

Copy link
Copy Markdown
Contributor Author

Thank you @teolemon for your review!

Regarding the number of prices, it's not the number of items purchased as in a receipt: we don't support the number of items bought.
And again, we cannot compute the total price without number of items or with per-kg prices.

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.

Bad UI/UX for price adding

3 participants