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

fix: 4925 - consistency for "edit product" app bars #4931

Merged
merged 5 commits into from
Jan 7, 2024

Conversation

monsieurtanuki
Copy link
Contributor

@monsieurtanuki monsieurtanuki commented Dec 28, 2023

What

  • Now all the edit product pages use the same app bar and are called as real pages (i.e. without fullScreenDialog: true)

Screenshots

col 1 col 2
Screenshot_1703752667 Screenshot_1703752674
Screenshot_1703752687 Screenshot_1703752695
Screenshot_1703752701 Screenshot_1703752711
Screenshot_1703752721 Screenshot_1703752736
Screenshot_1703752743 Screenshot_1703752752
Screenshot_1703752760 Screenshot_1703752766
Screenshot_1703752773 Screenshot_1703752782

Fixes bug(s)

Impacted files

  • add_basic_details_page.dart: now using new method buildEditProductAppBar
  • add_other_details_page.dart: now using new method buildEditProductAppBar; removed an irrelevant barcode display
  • edit_new_packagings.dart: now using new method buildEditProductAppBar
  • edit_ocr_page.dart: now using new method buildEditProductAppBar
  • edit_product_page.dart: removed inconsistent fullScreenDialog:true parameters
  • nutrition_page_loaded.dart: now using new method buildEditProductAppBar; removed inconsistent fullScreenDialog:true parameters
  • product_cards_helper.dart: new method buildEditProductAppBar instead of buildProductTitle
  • product_field_editor.dart: removed inconsistent fullScreenDialog:true parameters
  • product_image_gallery_view.dart: now using new method buildEditProductAppBar
  • product_image_other_page.dart: now using new method buildEditProductAppBar
  • simple_input_page.dart: now using new method buildEditProductAppBar
  • simple_input_widget.dart: now we don't display the widget title on a single widget page - in order to avoid title redundancy

Impacted files:
* `add_basic_details_page.dart`: now using new method `buildEditProductAppBar`
* `add_other_details_page.dart`: now using new method `buildEditProductAppBar`; removed an irrelevant barcode display
* `edit_new_packagings.dart`: now using new method `buildEditProductAppBar`
* `edit_ocr_page.dart`: now using new method `buildEditProductAppBar`
* `edit_product_page.dart`: removed inconsistent `fullScreenDialog:true` parameters
* `nutrition_page_loaded.dart`: now using new method `buildEditProductAppBar`; removed inconsistent `fullScreenDialog:true` parameters
* `product_cards_helper.dart`: new method `buildEditProductAppBar` instead of `buildProductTitle`
* `product_field_editor.dart`: removed inconsistent `fullScreenDialog:true` parameters
* `product_image_gallery_view.dart`: now using new method `buildEditProductAppBar`
* `product_image_other_page.dart`: now using new method `buildEditProductAppBar`
* `simple_input_page.dart`: now using new method `buildEditProductAppBar`
* `simple_input_widget.dart`: now we don't display the widget title on a single widget page - in order to avoid title redundancy
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2023

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (72ac084) 9.65% compared to head (9a4f487) 9.65%.

Files Patch % Lines
...mooth_app/lib/pages/product/simple_input_page.dart 0.00% 6 Missing ⚠️
...oth_app/lib/pages/product/simple_input_widget.dart 0.00% 6 Missing ⚠️
...s/smooth_app/lib/helpers/product_cards_helper.dart 0.00% 5 Missing ⚠️
..._app/lib/pages/image/product_image_other_page.dart 0.00% 3 Missing ⚠️
..._app/lib/pages/product/add_basic_details_page.dart 0.00% 3 Missing ⚠️
..._app/lib/pages/product/add_other_details_page.dart 0.00% 3 Missing ⚠️
...oth_app/lib/pages/product/edit_new_packagings.dart 0.00% 3 Missing ⚠️
...es/smooth_app/lib/pages/product/edit_ocr_page.dart 0.00% 3 Missing ⚠️
...h_app/lib/pages/product/nutrition_page_loaded.dart 0.00% 3 Missing ⚠️
.../lib/pages/product/product_image_gallery_view.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #4931   +/-   ##
=======================================
  Coverage     9.65%   9.65%           
=======================================
  Files          323     323           
  Lines        16207   16197   -10     
=======================================
  Hits          1564    1564           
+ Misses       14643   14633   -10     

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

@teolemon
Copy link
Member

The full screen thing is not related to reusability of edition screens in various places, right ?

@monsieurtanuki
Copy link
Contributor Author

The full screen thing is not related to reusability of edition screens in various places, right ?

@teolemon It looks like it was rather connected to a "swipe back" gesture side effect on iOS (cf. #2796).
To be linked with @g123k's #4917 that also deals differently the PopScopes.
If needed I can instead switch them all to fullScreenDialog: true. Or forget the consistency of the back button.
Therefore, indeed "the full screen thing is not related to reusability of edition screens in various places".

@g123k
Copy link
Collaborator

g123k commented Dec 28, 2023

+1 for the removal of the full screen.
On iOS, this is a pain to not have access to the swipe gesture.

@monsieurtanuki
Copy link
Contributor Author

For the record there are only 4 remaining fullscreenDialog: true in the code (after this PR).

This PR was only about making the edit pages consistent.

That said:

@monsieurtanuki monsieurtanuki merged commit c76715d into openfoodfacts:develop Jan 7, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for your review!

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

Successfully merging this pull request may close these issues.

Inconsistent header in the editing sections Inconsistent back/close icons on product edition
5 participants