From 9ad3ffa8b3248bf9920593f367331c79f702e480 Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Thu, 5 Dec 2024 18:29:08 +0200 Subject: [PATCH 1/7] fix(ui5-view-settings-dialog): adjust reset button announcement --- packages/fiori/src/ViewSettingsDialog.hbs | 2 ++ packages/fiori/src/ViewSettingsDialog.ts | 19 ++++++++++++++++++- .../fiori/src/i18n/messagebundle.properties | 9 +++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/fiori/src/ViewSettingsDialog.hbs b/packages/fiori/src/ViewSettingsDialog.hbs index 74c05afc993c..dadb8dee6ffa 100644 --- a/packages/fiori/src/ViewSettingsDialog.hbs +++ b/packages/fiori/src/ViewSettingsDialog.hbs @@ -41,11 +41,13 @@ ?selected="{{isModeSort}}" icon="sort" mode="Sort" + tooltip="{{_sortButtonTooltip}}" > diff --git a/packages/fiori/src/ViewSettingsDialog.ts b/packages/fiori/src/ViewSettingsDialog.ts index 61554759773d..1b2bc4d6a957 100644 --- a/packages/fiori/src/ViewSettingsDialog.ts +++ b/packages/fiori/src/ViewSettingsDialog.ts @@ -18,13 +18,14 @@ import ListItemStandard from "@ui5/webcomponents/dist/ListItemStandard.js"; import Title from "@ui5/webcomponents/dist/Title.js"; import SegmentedButton from "@ui5/webcomponents/dist/SegmentedButton.js"; import SegmentedButtonItem from "@ui5/webcomponents/dist/SegmentedButtonItem.js"; - import ViewSettingsDialogMode from "./types/ViewSettingsDialogMode.js"; import "@ui5/webcomponents-icons/dist/sort.js"; import "@ui5/webcomponents-icons/dist/filter.js"; import "@ui5/webcomponents-icons/dist/nav-back.js"; import type SortItem from "./SortItem.js"; import type FilterItem from "./FilterItem.js"; +import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js"; +import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js"; import { VSD_DIALOG_TITLE_SORT, @@ -36,6 +37,9 @@ import { VSD_ORDER_ASCENDING, VSD_ORDER_DESCENDING, VSD_FILTER_BY, + VSD_SORT_TOOLTIP, + VSD_FILTER_TOOLTIP, + VSD_RESET_BUTTON_ACTION, } from "./generated/i18n/i18n-defaults.js"; // Template @@ -390,6 +394,18 @@ class ViewSettingsDialog extends UI5Element { return ViewSettingsDialog.i18nBundle.getText(VSD_SORT_BY); } + get _sortButtonTooltip() { + return ViewSettingsDialog.i18nBundle.getText(VSD_SORT_TOOLTIP); + } + + get _filterButtonTooltip() { + return ViewSettingsDialog.i18nBundle.getText(VSD_FILTER_TOOLTIP); + } + + get _resetButtonAction() { + return ViewSettingsDialog.i18nBundle.getText(VSD_RESET_BUTTON_ACTION); + } + get _isPhone() { return isPhone(); } @@ -667,6 +683,7 @@ class ViewSettingsDialog extends UI5Element { this._restoreSettings(this._initialSettings); this._recentlyFocused = this._sortOrder!; this._focusRecentlyUsedControl(); + announce("text", InvisibleMessageMode.Polite); } /** diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index c06fb5686dae..e28bd58d7f3f 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -206,6 +206,15 @@ VSD_CANCEL_BUTTON=Cancel #XFLD: View Settings Dialog Reset button text VSD_RESET_BUTTON=Reset +#XFLD: View Settings Dialog Reset button invisible label text +VSD_RESET_BUTTON_ACTION=Control settings are reset + +#XTOL View Settings Dialog Sort button tooltop text +VSD_SORT_TOOLTIP=Sort + +#XTOL View Settings Dialog Filter button tooltop text +VSD_FILTER_TOOLTIP=Filter + #XBLI: View Settings Dialog Sort Order group header text VSD_SORT_ORDER=Sort Order From f88df9fe039d59b9ee70816fe0d0b6a1e561458b Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Thu, 5 Dec 2024 18:33:56 +0200 Subject: [PATCH 2/7] fix: apply label text from the bundle --- packages/fiori/src/ViewSettingsDialog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori/src/ViewSettingsDialog.ts b/packages/fiori/src/ViewSettingsDialog.ts index 1b2bc4d6a957..0c1d4def9049 100644 --- a/packages/fiori/src/ViewSettingsDialog.ts +++ b/packages/fiori/src/ViewSettingsDialog.ts @@ -683,7 +683,7 @@ class ViewSettingsDialog extends UI5Element { this._restoreSettings(this._initialSettings); this._recentlyFocused = this._sortOrder!; this._focusRecentlyUsedControl(); - announce("text", InvisibleMessageMode.Polite); + announce(this._resetButtonAction, InvisibleMessageMode.Polite); } /** From 19154039a7d47ea7269b0a1cac7a654b3a473e7e Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Thu, 5 Dec 2024 18:35:50 +0200 Subject: [PATCH 3/7] fix: adjust import calls order --- packages/fiori/src/ViewSettingsDialog.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fiori/src/ViewSettingsDialog.ts b/packages/fiori/src/ViewSettingsDialog.ts index 0c1d4def9049..9b8f7cfcde31 100644 --- a/packages/fiori/src/ViewSettingsDialog.ts +++ b/packages/fiori/src/ViewSettingsDialog.ts @@ -18,14 +18,14 @@ import ListItemStandard from "@ui5/webcomponents/dist/ListItemStandard.js"; import Title from "@ui5/webcomponents/dist/Title.js"; import SegmentedButton from "@ui5/webcomponents/dist/SegmentedButton.js"; import SegmentedButtonItem from "@ui5/webcomponents/dist/SegmentedButtonItem.js"; +import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js"; +import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js"; import ViewSettingsDialogMode from "./types/ViewSettingsDialogMode.js"; import "@ui5/webcomponents-icons/dist/sort.js"; import "@ui5/webcomponents-icons/dist/filter.js"; import "@ui5/webcomponents-icons/dist/nav-back.js"; import type SortItem from "./SortItem.js"; import type FilterItem from "./FilterItem.js"; -import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js"; -import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js"; import { VSD_DIALOG_TITLE_SORT, From d35ad3e54bf11db799ca41b64014b9bb81287294 Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Thu, 5 Dec 2024 18:38:08 +0200 Subject: [PATCH 4/7] fix: adjust reset announcement text --- packages/fiori/src/i18n/messagebundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index e28bd58d7f3f..5d51d3edca7c 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -207,7 +207,7 @@ VSD_CANCEL_BUTTON=Cancel VSD_RESET_BUTTON=Reset #XFLD: View Settings Dialog Reset button invisible label text -VSD_RESET_BUTTON_ACTION=Control settings are reset +VSD_RESET_BUTTON_ACTION=Settings are reset #XTOL View Settings Dialog Sort button tooltop text VSD_SORT_TOOLTIP=Sort From 9a528a21cd4dd139ad6f326caf84b14a2c586c9a Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Sat, 7 Dec 2024 12:06:04 +0200 Subject: [PATCH 5/7] fix: adjust reset button activation text --- packages/fiori/src/i18n/messagebundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index 5d51d3edca7c..811c21f75a2f 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -206,7 +206,7 @@ VSD_CANCEL_BUTTON=Cancel #XFLD: View Settings Dialog Reset button text VSD_RESET_BUTTON=Reset -#XFLD: View Settings Dialog Reset button invisible label text +#XMSG: View Settings Dialog Reset button invisible message text VSD_RESET_BUTTON_ACTION=Settings are reset #XTOL View Settings Dialog Sort button tooltop text From aa46ab2652ec24aff3987ab0d4191b4ceded670f Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Tue, 17 Dec 2024 11:32:20 +0200 Subject: [PATCH 6/7] fix: adjust reset action announcement --- packages/fiori/src/i18n/messagebundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index 1672f096e4e5..967f51bc9dac 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -207,7 +207,7 @@ VSD_CANCEL_BUTTON=Cancel VSD_RESET_BUTTON=Reset #XMSG: View Settings Dialog Reset button invisible message text -VSD_RESET_BUTTON_ACTION=Settings are reset +VSD_RESET_BUTTON_ACTION=All settings were reset #XTOL View Settings Dialog Sort button tooltop text VSD_SORT_TOOLTIP=Sort From 9718a64ece20e73b3fc63f275a5d7bd9bfbd639a Mon Sep 17 00:00:00 2001 From: Boyan Rakilovski Date: Wed, 18 Dec 2024 17:39:36 +0200 Subject: [PATCH 7/7] fix: adjust reset action announcement text --- packages/fiori/src/i18n/messagebundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori/src/i18n/messagebundle.properties b/packages/fiori/src/i18n/messagebundle.properties index 967f51bc9dac..05a58ba6e7e1 100644 --- a/packages/fiori/src/i18n/messagebundle.properties +++ b/packages/fiori/src/i18n/messagebundle.properties @@ -207,7 +207,7 @@ VSD_CANCEL_BUTTON=Cancel VSD_RESET_BUTTON=Reset #XMSG: View Settings Dialog Reset button invisible message text -VSD_RESET_BUTTON_ACTION=All settings were reset +VSD_RESET_BUTTON_ACTION=Reset has reverted all settings to initial state #XTOL View Settings Dialog Sort button tooltop text VSD_SORT_TOOLTIP=Sort