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: #2425 - added "all products to be completed" item (in user page) #2441

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

monsieurtanuki
Copy link
Contributor

New files:

  • paged_to_be_completed_product_query.dart: Back-end paged query for all "to-be-completed" products.
  • tmp_to_be_completed_query_configuration.dart: Query Configuration for all to-be-completed products.

Deleted files:

  • contributor_product_query.dart
  • informer_product_query.dart
  • photographer_product_query.dart
  • to_be_completed_product_query.dart

Impacted files

  • app_en.arb: 1 label slightly modified, 1 added label.
  • app_fr.arb: 1 label slightly modified, 1 added label.
  • paged_user_product_query.dart: refactored around UserProductSearchQueryConfiguration.
  • product_list.dart: added a new list - all products to be completed (not just the user's).
  • product_list_page.dart: refactored.
  • product_query_page_helper.dart: refactored.
  • user_preferences_account.dart: added an item for "all to-be-completed"; refactored.

What

  • Added an "all products to be completed" item in user page.
  • In addition to the already existing "user products to be completed".
  • That works only if your app is in English, for reasons regarding the server redirections explained here - Show the Products Edited by the user #2315 (comment)

Screenshot

Capture d’écran 2022-06-30 à 15 19 43

Fixes bug(s)

…(in user page)

New files:
* `paged_to_be_completed_product_query.dart`: Back-end paged query for all "to-be-completed" products.
* `tmp_to_be_completed_query_configuration.dart`: Query Configuration for all to-be-completed products.

Deleted files:
* `contributor_product_query.dart`
* `informer_product_query.dart`
* `photographer_product_query.dart`
* `to_be_completed_product_query.dart`

Impacted files
* `app_en.arb`: 1 label slightly modified, 1 added label.
* `app_fr.arb`: 1 label slightly modified, 1 added label.
* `paged_user_product_query.dart`: refactored around `UserProductSearchQueryConfiguration`.
* `product_list.dart`: added a new list - all products to be completed (not just the user's).
* `product_list_page.dart`: refactored.
* `product_query_page_helper.dart`: refactored.
* `user_preferences_account.dart`: added an item for "all to-be-completed"; refactored.
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner June 30, 2022 13:21
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2022

Codecov Report

Merging #2441 (822e259) into develop (2ea0da3) will decrease coverage by 1.33%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop   #2441      +/-   ##
==========================================
- Coverage     8.86%   7.52%   -1.34%     
==========================================
  Files          161     201      +40     
  Lines         6623    9763    +3140     
==========================================
+ Hits           587     735     +148     
- Misses        6036    9028    +2992     
Impacted Files Coverage Δ
...kages/smooth_app/lib/widgets/attribute_button.dart 0.00% <0.00%> (-92.00%) ⬇️
...s/smooth_app/lib/data_models/user_preferences.dart 8.73% <0.00%> (-23.57%) ⬇️
packages/smooth_app/lib/themes/smooth_theme.dart 60.00% <0.00%> (-22.98%) ⬇️
...p/lib/generic_lib/dialogs/smooth_alert_dialog.dart 15.29% <0.00%> (-18.92%) ⬇️
...mooth_app/lib/data_models/product_preferences.dart 24.65% <0.00%> (-6.78%) ⬇️
packages/smooth_app/lib/main.dart 14.40% <0.00%> (-3.49%) ⬇️
.../smooth_app/lib/pages/onboarding/welcome_page.dart 0.00% <0.00%> (-3.13%) ⬇️
.../smooth_app/lib/pages/onboarding/scan_example.dart 0.00% <0.00%> (-2.28%) ⬇️
...p/lib/pages/onboarding/consent_analytics_page.dart 0.00% <0.00%> (-1.57%) ⬇️
...smooth_app/lib/pages/product/new_product_page.dart 0.00% <0.00%> (-0.88%) ⬇️
... and 201 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5aa231...822e259. Read the comment docs.

Impacted files
* `paged_to_be_completed_product_query.dart`
* `user_preferences_account.dart`
Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

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

The code looks good, thanks @monsieurtanuki thus approving.

But I don't think the profile is the right place for this page any idea @teolemon

@monsieurtanuki monsieurtanuki merged commit 587e943 into openfoodfacts:develop Jun 30, 2022
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for the review!
I agree with you, that's probably not the best place to put it.
Anyone with a better idea will move it later.

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

Successfully merging this pull request may close these issues.

Add "Products that need to be completed link"
4 participants