Skip to content

Commit a6a86e8

Browse files
authored
fix(ui5-view-settings-dialog): provide additional filters count description (#11042)
Fixes: #11040
1 parent e64c124 commit a6a86e8

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

packages/fiori/src/ViewSettingsDialog.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
VSD_SORT_TOOLTIP,
3535
VSD_FILTER_TOOLTIP,
3636
VSD_RESET_BUTTON_ACTION,
37+
VSD_FILTER_ITEM_LABEL_TEXT,
3738
} from "./generated/i18n/i18n-defaults.js";
3839

3940
// Template
@@ -292,6 +293,12 @@ class ViewSettingsDialog extends UI5Element {
292293
}
293294
}
294295

296+
_selectedFiltersLabel(item: FilterItem) {
297+
const text = item.text ? `${item.text},` : "";
298+
const additionalText = item.additionalText ? `${item.additionalText},` : "";
299+
return additionalText ? ViewSettingsDialog.i18nBundle.getText(VSD_FILTER_ITEM_LABEL_TEXT, text, additionalText) : text;
300+
}
301+
295302
get shouldBuildSort() {
296303
return !!this.sortItems.length;
297304
}

packages/fiori/src/ViewSettingsDialogTemplate.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ function ViewSettingsDialogTemplateContent(this: ViewSettingsDialog) {
132132
class="ui5-vsd-filterItemList"
133133
// selected={item.selected} TODO
134134
additionalText={item.additionalText}
135+
accessibleName={this._selectedFiltersLabel(item)}
135136
>{item.text}</ListItemStandard>
136137
))}
137138
</ListItemGroup>

packages/fiori/src/i18n/messagebundle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ VSD_ORDER_ASCENDING=Ascending
261261
#XBLI: View Settings Dialog sort order list Descending text
262262
VSD_ORDER_DESCENDING=Descending
263263

264+
#XACT: View Settings Dialog filter item announcement text
265+
VSD_FILTER_ITEM_LABEL_TEXT={0} Counter {1}
266+
264267
#XTIT: IllustratedMessage's title for the BeforeSearch illustration
265268
IM_TITLE_BEFORESEARCH=Let''s get some results
266269

0 commit comments

Comments
 (0)