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: 4424 - longer label for "empty the list" + refactoring #4447

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now we use a new and more explicit label for "empty the list" in popup menu and modal menu.
  • In the process, I refactored, for code clarity.

Screenshot

popup menu model menu
Screenshot_2023-08-04-18-22-42 Screenshot_2023-08-04-18-20-18

Fixes bug(s)

Impacted files

  • all_products_list_page.dart: refactored around ProductListPopupItem
  • app_en.arb: new label for a more explicit "empty the list"
  • app_fr.arb: new label for a more explicit "empty the list"
  • product_list_popup_items.dart: moved there ProductListPopupMenuEntry; added 2 methods to ProductListPopupItem; added 1 implementation of ProductListPopupItem

Impacted files:
* `all_products_list_page.dart`: refactored around `ProductListPopupItem`
* `app_en.arb`: new label for a more explicit "empty the list"
* `app_fr.arb`: new label for a more explicit "empty the list"
* `product_list_popup_items.dart`: moved there `ProductListPopupMenuEntry`; added 2 methods to `ProductListPopupItem`; added 1 implementation of `ProductListPopupItem`
@codecov-commenter
Copy link

Codecov Report

Merging #4447 (99aef32) into develop (1c3921e) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##           develop    #4447   +/-   ##
========================================
  Coverage    10.17%   10.17%           
========================================
  Files          295      295           
  Lines        15087    15081    -6     
========================================
  Hits          1535     1535           
+ Misses       13552    13546    -6     
Files Changed Coverage Δ
...es/smooth_app/lib/pages/all_product_list_page.dart 0.00% <0.00%> (ø)
...pages/product/common/product_list_popup_items.dart 0.00% <0.00%> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

You can test this PR on: Android

];
final List<PopupMenuEntry<ProductListPopupMenuEntry>>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not use the map operator here instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to find something relevant but couldn't find anything.
I'm not at ease with those map/list methods anyway.
My code can be read by anyone, uses OOP and has no copy/paste, which is good enough for me.

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.

Thanks for the rewording

@monsieurtanuki monsieurtanuki merged commit fe79c7b into openfoodfacts:develop Aug 5, 2023
7 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for the review!

@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for the review!

... and @g123k too ;)

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.

Double delete button in some lists
4 participants