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: 5205 - new "my prices" page #5347

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now the "my prices" page is local - with still an optional link to the web app.
  • A good opportunity to refactor a similar page - the "product prices" page.

Screenshots

product prices my prices
Screenshot_1717868497 Screenshot_1717868458

Fixes bug(s)

Files

Deleted files:

  • product_price_item.dart
  • product_prices_page.dart

New files:

  • get_prices_model.dart: Model that stores what we need to know for "get latest prices" queries.
  • price_button.dart: Simple price button: displaying data with optional action.
  • price_count_widget.dart: Price Count display.
  • price_data_widget.dart: Price Data display (no product data here).
  • price_product_widget.dart: Price Product display (no price data here).
  • prices_page.dart: Page that displays the latest prices according to a model.

Impacted files:

  • labeler.yml: deleted and new files
  • prices_card.dart: refactored using new classes
  • product_prices_list.dart: refactored using new classes
  • user_preferences_account.dart: refactored using new classes

Deleted files:
* `product_price_item.dart`
* `product_prices_page.dart`

New files:
* `get_prices_model.dart`: Model that stores what we need to know for "get latest prices" queries.
* `price_button.dart`: Simple price button: displaying data with optional action.
* `price_count_widget.dart`: Price Count display.
* `price_data_widget.dart`: Price Data display (no product data here).
* `price_product_widget.dart`: Price Product display (no price data here).
* `prices_page.dart`: Page that displays the latest prices according to a model.

Impacted files:
* `labeler.yml`: deleted and new files
* `prices_card.dart`: refactored using new classes
* `product_prices_list.dart`: refactored using new classes
* `user_preferences_account.dart`: refactored using new classes
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.

👍

@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 7.53%. Comparing base (4d9c7fc) to head (8917386).
Report is 170 commits behind head on develop.

Files Patch % Lines
...oth_app/lib/pages/prices/price_product_widget.dart 0.00% 30 Missing ⚠️
...smooth_app/lib/pages/prices/price_data_widget.dart 0.00% 28 Missing ⚠️
...kages/smooth_app/lib/pages/prices/prices_page.dart 0.00% 19 Missing ⚠️
...ages/smooth_app/lib/pages/prices/price_button.dart 0.00% 17 Missing ⚠️
...ooth_app/lib/pages/prices/product_prices_list.dart 0.00% 16 Missing ⚠️
...ib/pages/preferences/user_preferences_account.dart 0.00% 15 Missing ⚠️
...mooth_app/lib/pages/prices/price_count_widget.dart 0.00% 14 Missing ⚠️
...kages/smooth_app/lib/pages/prices/prices_card.dart 0.00% 14 Missing ⚠️
.../smooth_app/lib/pages/prices/get_prices_model.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5347      +/-   ##
==========================================
- Coverage     9.54%   7.53%   -2.01%     
==========================================
  Files          325     377      +52     
  Lines        16411   18968    +2557     
==========================================
- Hits          1567    1430     -137     
- Misses       14844   17538    +2694     

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

@monsieurtanuki monsieurtanuki merged commit 13072eb into openfoodfacts:develop Jun 8, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!
With that refactoring, #5198 will be very easy to implement ;)

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 'My Prices' view from the Open Prices web app
3 participants