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: 5418 - Prices - "Are you sure you want to exit?" feature #5737

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now, if we changed something in the "add price" page, we cannot go to the previous page unless we answer the "Are you sure you want to exit?" question.

Screenshot

Screenshot_1729869944

Fixes bug(s)

Impacted files

  • price_add_product_card.dart: now accessing amount items through specific methods
  • price_amount_card.dart: now accessing amount items through specific methods
  • price_amount_model.dart: new hasChanged getter
  • price_model.dart: new hasChanged getter; now giving access to amount items through specific methods
  • price_proof_card.dart: minor refactoring
  • product_price_add_page.dart: used WillPopScore2 in order to check for changes against back gesture; now accessing amount items through specific methods
  • user_preferences_prices.dart: usage of AppNavigator for a better management of back gesture

Impacted files:
* `price_add_product_card.dart`: now accessing amount items through specific methods
* `price_amount_card.dart`: now accessing amount items through specific methods
* `price_amount_model.dart`: new `hasChanged` getter
* `price_model.dart`: new `hasChanged` getter; now giving access to amount items through specific methods
* `price_proof_card.dart`: minor refactoring
* `product_price_add_page.dart`: used `WillPopScore2` in order to check for changes against back gesture; now accessing amount items through specific methods
* `user_preferences_prices.dart`: usage of `AppNavigator` for a better management of back gesture
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 6.98%. Comparing base (4d9c7fc) to head (c88a91f).
Report is 384 commits behind head on develop.

Files with missing lines Patch % Lines
...h_app/lib/pages/prices/product_price_add_page.dart 0.00% 49 Missing ⚠️
...kages/smooth_app/lib/pages/prices/price_model.dart 0.00% 27 Missing ⚠️
...mooth_app/lib/pages/prices/price_amount_model.dart 0.00% 13 Missing ⚠️
...smooth_app/lib/pages/prices/price_amount_card.dart 0.00% 4 Missing ⚠️
...lib/pages/preferences/user_preferences_prices.dart 0.00% 3 Missing ⚠️
...h_app/lib/pages/prices/price_add_product_card.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5737      +/-   ##
==========================================
- Coverage     9.54%   6.98%   -2.57%     
==========================================
  Files          325     406      +81     
  Lines        16411   21699    +5288     
==========================================
- Hits          1567    1516      -51     
- Misses       14844   20183    +5339     

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

@teolemon teolemon merged commit 44ce678 into openfoodfacts:develop Oct 25, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
3 participants