From 04a31139a6be7343dfd6e00eb85db8455f962b30 Mon Sep 17 00:00:00 2001 From: validcube Date: Fri, 13 Oct 2023 18:12:37 +0700 Subject: [PATCH 1/5] REFACTor(Accessibility): Tooltip for reseting patch option:wq --- assets/i18n/en_US.json | 1 + lib/ui/views/patch_options/patch_options_view.dart | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index f61c619226..e51748e8be 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -136,6 +136,7 @@ "selectAllPatchesWarningContent": "You are about to select all patches, that includes non-suggested patches and can cause unwanted behavior." }, "patchOptionsView": { + "resetOptionsTooltip": "Reset options", "viewTitle": "Patch options", "saveOptions": "Save", diff --git a/lib/ui/views/patch_options/patch_options_view.dart b/lib/ui/views/patch_options/patch_options_view.dart index 0608da24a3..7a21eb4901 100644 --- a/lib/ui/views/patch_options/patch_options_view.dart +++ b/lib/ui/views/patch_options/patch_options_view.dart @@ -48,6 +48,10 @@ class PatchOptionsView extends StatelessWidget { icon: const Icon( Icons.history, ), + tooltip: FlutterI18n.translate( + context, + 'patchOptionsView.resetOptionsTooltip', + ), ), ], ), From 43ffff42b1b3c26cbf831088c8cdeabe4ee52801 Mon Sep 17 00:00:00 2001 From: validcube Date: Fri, 13 Oct 2023 18:33:12 +0700 Subject: [PATCH 2/5] refactor(Accessibility): provide sufficient constrast --- lib/ui/views/patch_options/patch_options_viewmodel.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui/views/patch_options/patch_options_viewmodel.dart b/lib/ui/views/patch_options/patch_options_viewmodel.dart index 7a4cb9d847..fa64f7339d 100644 --- a/lib/ui/views/patch_options/patch_options_viewmodel.dart +++ b/lib/ui/views/patch_options/patch_options_viewmodel.dart @@ -165,7 +165,7 @@ class PatchOptionsViewModel extends BaseViewModel { .map((e) { return CustomCard( padding: const EdgeInsets.all(4), - backgroundColor: Theme.of(context).colorScheme.secondaryContainer, + backgroundColor: Theme.of(context).colorScheme.surface, onTap: () { addOption(e); Navigator.pop(context); @@ -186,7 +186,8 @@ class PatchOptionsViewModel extends BaseViewModel { e.description, style: TextStyle( fontSize: 14, - color: Theme.of(context).colorScheme.onSecondaryContainer, + color: + Theme.of(context).colorScheme.onSecondaryContainer, ), ) ], From ac2afe71bb65894beeb29dfefa8437805c141b15 Mon Sep 17 00:00:00 2001 From: validcube Date: Fri, 13 Oct 2023 18:39:44 +0700 Subject: [PATCH 3/5] refactor(Accessibility): cleanup from previous commit --- lib/ui/views/patch_options/patch_options_viewmodel.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ui/views/patch_options/patch_options_viewmodel.dart b/lib/ui/views/patch_options/patch_options_viewmodel.dart index fa64f7339d..6942331b76 100644 --- a/lib/ui/views/patch_options/patch_options_viewmodel.dart +++ b/lib/ui/views/patch_options/patch_options_viewmodel.dart @@ -186,10 +186,9 @@ class PatchOptionsViewModel extends BaseViewModel { e.description, style: TextStyle( fontSize: 14, - color: - Theme.of(context).colorScheme.onSecondaryContainer, + color: Theme.of(context).colorScheme.onSurface, ), - ) + ), ], ), ), From 30fdee908d05732762a04bb8645190d9d348359c Mon Sep 17 00:00:00 2001 From: validcube Date: Sun, 15 Oct 2023 17:10:55 +0700 Subject: [PATCH 4/5] refactor(Accessibility): OK to Dismiss --- assets/i18n/en_US.json | 1 + lib/ui/views/patch_options/patch_options_viewmodel.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index e51748e8be..7369b82e4e 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -1,6 +1,7 @@ { "okButton": "OK", "cancelButton": "Cancel", + "dismissButton": "Dismiss", "quitButton": "Quit", "updateButton": "Update", "enabledLabel": "Enabled", diff --git a/lib/ui/views/patch_options/patch_options_viewmodel.dart b/lib/ui/views/patch_options/patch_options_viewmodel.dart index 6942331b76..1886a99da3 100644 --- a/lib/ui/views/patch_options/patch_options_viewmodel.dart +++ b/lib/ui/views/patch_options/patch_options_viewmodel.dart @@ -147,7 +147,7 @@ class PatchOptionsViewModel extends BaseViewModel { ), actions: [ CustomMaterialButton( - label: I18nText('okButton'), + label: I18nText('dismissButton'), onPressed: () { Navigator.of(context).pop(); }, From 00e49dba0cdcc71e07edad417800a6e2d4f1a4de Mon Sep 17 00:00:00 2001 From: validcube Date: Sun, 15 Oct 2023 17:28:35 +0700 Subject: [PATCH 5/5] refactor: apply suggestions from reviewer Co-authored-by: Palm --- assets/i18n/en_US.json | 2 +- lib/ui/views/patch_options/patch_options_viewmodel.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index 7369b82e4e..0feb5c2134 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -137,7 +137,7 @@ "selectAllPatchesWarningContent": "You are about to select all patches, that includes non-suggested patches and can cause unwanted behavior." }, "patchOptionsView": { - "resetOptionsTooltip": "Reset options", + "resetOptionsTooltip": "Reset patch options", "viewTitle": "Patch options", "saveOptions": "Save", diff --git a/lib/ui/views/patch_options/patch_options_viewmodel.dart b/lib/ui/views/patch_options/patch_options_viewmodel.dart index 1886a99da3..b8813d4941 100644 --- a/lib/ui/views/patch_options/patch_options_viewmodel.dart +++ b/lib/ui/views/patch_options/patch_options_viewmodel.dart @@ -147,7 +147,7 @@ class PatchOptionsViewModel extends BaseViewModel { ), actions: [ CustomMaterialButton( - label: I18nText('dismissButton'), + label: I18nText('cancelButton'), onPressed: () { Navigator.of(context).pop(); },