Skip to content

fix(ui5-view-settings-dialog): provide additional filters count description #11042

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

Merged
merged 5 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/fiori/src/ViewSettingsDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
VSD_SORT_TOOLTIP,
VSD_FILTER_TOOLTIP,
VSD_RESET_BUTTON_ACTION,
VSD_FILTER_ITEM_LABEL_TEXT,
} from "./generated/i18n/i18n-defaults.js";

// Template
Expand Down Expand Up @@ -292,6 +293,12 @@ class ViewSettingsDialog extends UI5Element {
}
}

_selectedFiltersLabel(item: FilterItem) {
const text = item.text ? `${item.text},` : "";
const additionalText = item.additionalText ? `${item.additionalText},` : "";
return additionalText ? ViewSettingsDialog.i18nBundle.getText(VSD_FILTER_ITEM_LABEL_TEXT, text, additionalText) : text;
}

get shouldBuildSort() {
return !!this.sortItems.length;
}
Expand Down
1 change: 1 addition & 0 deletions packages/fiori/src/ViewSettingsDialogTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ function ViewSettingsDialogTemplateContent(this: ViewSettingsDialog) {
class="ui5-vsd-filterItemList"
// selected={item.selected} TODO
additionalText={item.additionalText}
accessibleName={this._selectedFiltersLabel(item)}
>{item.text}</ListItemStandard>
))}
</ListItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions packages/fiori/src/i18n/messagebundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ VSD_ORDER_ASCENDING=Ascending
#XBLI: View Settings Dialog sort order list Descending text
VSD_ORDER_DESCENDING=Descending

#XACT: View Settings Dialog filter item announcement text
VSD_FILTER_ITEM_LABEL_TEXT={0} Counter {1}

#XTIT: IllustratedMessage's title for the BeforeSearch illustration
IM_TITLE_BEFORESEARCH=Let''s get some results

Expand Down