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: #2773 - appropriate "clear?" and "delete?" messages for user lists #2778

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • app_en.arb: labels for user lists (clear? + delete?)
  • app_fr.arb: labels for user lists (clear? + delete?)
  • product_list_page.dart: now using the new "clear?" label for user lists
  • product_list_user_dialog_helper.dart: now localizing with the new "delete?" label for user lists

What

  • The "delete user list?" label was a hard-coded English string: now it's localized.
  • There was no "clear user list?" label: now there is.

Screenshot

case screen
delete user list Capture d’écran 2022-08-11 à 18 47 53
clear user list Capture d’écran 2022-08-11 à 18 48 52
clear history Capture d’écran 2022-08-11 à 18 49 30

Fixes bug(s)

… for user lists

Impacted files:
* `app_en.arb`: labels for user lists (clear? + delete?)
* `app_fr.arb`: labels for user lists (clear? + delete?)
 * `product_list_page.dart`: now using the new "clear?" label for user lists
 * `product_list_user_dialog_helper.dart`: now localizing with the new "delete?" label for user lists
@codecov-commenter
Copy link

Codecov Report

Merging #2778 (348f58e) into develop (2ea0da3) will decrease coverage by 1.73%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop   #2778      +/-   ##
==========================================
- Coverage     8.86%   7.12%   -1.74%     
==========================================
  Files          161     218      +57     
  Lines         6623   10650    +4027     
==========================================
+ Hits           587     759     +172     
- Misses        6036    9891    +3855     
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 62.26% <0.00%> (-20.72%) ⬇️
...p/lib/generic_lib/dialogs/smooth_alert_dialog.dart 15.11% <0.00%> (-19.10%) ⬇️
...mooth_app/lib/data_models/product_preferences.dart 21.68% <0.00%> (-9.75%) ⬇️
packages/smooth_app/lib/main.dart 14.65% <0.00%> (-3.24%) ⬇️
.../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%) ⬇️
...ackages/smooth_app/lib/pages/scan/scan_header.dart 2.50% <0.00%> (-2.27%) ⬇️
...p/lib/pages/onboarding/consent_analytics_page.dart 0.00% <0.00%> (-1.57%) ⬇️
... and 237 more

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

@@ -215,8 +215,9 @@ class ProductListUserDialogHelper {
final bool? deleted = await showDialog<bool>(
context: context,
builder: (final BuildContext context) => SmoothAlertDialog(
title: 'Delete list?',
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing the title?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The point of this PR is to put an appropriate label:

  • in this particular case, the title was no localized
  • we need to be able to say "do you want to clear THIS list?" and/or "do you want to clear the HISTORY?"
  • we could keep this title, but that would mean that 1. we should localize it and 2. it would be kind of duplicate with the more detailed message "clear this list" / "clear the history"

Copy link
Member

Choose a reason for hiding this comment

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

In my opinion having a title, even a generic one, could make the decision faster. As a user I'd first like to read "Are you sure?" and then if I need an extended explanation I'm reading the body.

It's a personal preference though, nothing blocking so feel free to merge!

@monsieurtanuki
Copy link
Contributor Author

Thank you @VaiTon for your review!
I wouldn't vote against your idea of adding an "Are you sure?" title, but I'm not convinced enough to change my PR :)

@monsieurtanuki monsieurtanuki merged commit 3deb4cb into openfoodfacts:develop Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Bulk deletion references history in lists
3 participants