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

refactor: upgrade to off-dart 2.0.0 #3495

Merged

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • paged_to_be_completed_product_query.dart: renamed State as ProductState
  • paged_user_product_query.dart: created local UserSearchType instead of deprecated off-dart UserProductSearchType; used ProductSearchQueryConfiguration instead of deprecated UserProductSearchQueryConfiguration
  • pubspec.lock: wtf
  • pubspec.yaml: upgrade to off-dart 2.0.0
  • user_preferences_account.dart: now using new local class UserSearchType
  • and reduced all off-dart imports to a single import 'package:openfoodfacts/openfoodfacts.dart';

What

  • This PR just deals with the upgrade to off-dart 2.0.0 and its breaking changes.

Part of

Impacted files:
* `paged_to_be_completed_product_query.dart`: renamed `State` as `ProductState`
* `paged_user_product_query.dart`: created local `UserSearchType` instead of deprecated off-dart `UserProductSearchType`; used `ProductSearchQueryConfiguration` instead of deprecated `UserProductSearchQueryConfiguration`
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 2.0.0
* `user_preferences_account.dart`: now using new local class `UserSearchType`
* and reduced all off-dart imports to a single `import 'package:openfoodfacts/openfoodfacts.dart';`
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner January 2, 2023 09:45
@github-actions github-actions bot added 📈 Analytics We use Sentry and Matomo, with an opt-in system database dependencies food preferences Hunger Games ✏️ Editing - Nutrition input 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page ranking 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… summary card 🧪 Tests User lists 👥 User management Account login, signup, signout labels Jan 2, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #3495 (1de15e0) into develop (2242821) will increase coverage by 0.07%.
The diff coverage is 56.00%.

@@             Coverage Diff             @@
##           develop    #3495      +/-   ##
===========================================
+ Coverage    11.09%   11.16%   +0.07%     
===========================================
  Files          262      262              
  Lines        12831    12840       +9     
===========================================
+ Hits          1424     1434      +10     
+ Misses       11407    11406       -1     
Impacted Files Coverage Δ
...h_app/lib/background/abstract_background_task.dart 0.00% <ø> (ø)
...th_app/lib/background/background_task_details.dart 0.00% <ø> (ø)
...pp/lib/cards/product_cards/product_title_card.dart 0.00% <ø> (ø)
...cards/product_cards/smooth_product_card_found.dart 0.00% <ø> (ø)
...oth_app/lib/data_models/continuous_scan_model.dart 0.85% <ø> (ø)
...es/smooth_app/lib/data_models/fetched_product.dart 25.00% <ø> (ø)
...kages/smooth_app/lib/data_models/product_list.dart 1.26% <ø> (ø)
...mooth_app/lib/data_models/product_preferences.dart 23.25% <ø> (ø)
...p/lib/data_models/query_product_list_supplier.dart 0.00% <ø> (ø)
...smooth_app/lib/data_models/up_to_date_changes.dart 0.00% <ø> (ø)
... and 82 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Impacted file:
* `paged_user_product_query.dart`: fixed bug - now `toBeCompleted` filter is not systematic
Impacted file:
* `paged_user_product_query.dart`: now explicitly using the same version as the rest of the app
Impacted file:
* `paged_user_product_query.dart`: now using the "normal" fields
* `product_query.dart`: now that we use fully v3, we don't need the temporary field list for user-related queries with v2
Copy link
Member

@AshAman999 AshAman999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@monsieurtanuki monsieurtanuki merged commit 7e861f5 into openfoodfacts:develop Jan 2, 2023
@monsieurtanuki
Copy link
Contributor Author

Thank you @AshAman999 for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 Analytics We use Sentry and Matomo, with an opt-in system database dependencies ✏️ Editing - Nutrition input food preferences Hunger Games 🤗 Onboarding We need to onboard users on how the app works, but also on content like Nutri-Score, Eco-Score… Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page ranking 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… summary card 🧪 Tests User lists 👥 User management Account login, signup, signout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants