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

[SF] [ViewSettingsDialog] ViewSettingsDialog isn't internationalizable #4539

Closed
1 of 4 tasks
Neeeko opened this issue Dec 31, 2021 · 1 comment · Fixed by #4772
Closed
1 of 4 tasks

[SF] [ViewSettingsDialog] ViewSettingsDialog isn't internationalizable #4539

Neeeko opened this issue Dec 31, 2021 · 1 comment · Fixed by #4772

Comments

@Neeeko
Copy link

Neeeko commented Dec 31, 2021

Bug Description

The current implementation of the ViewSettingsDialog won't work in internationalized applications as the only thing the confirm event returns is the text attribute related to the selected ui5-sort-item or ui5-filter-item-option.

For example, if I want to filter by "Name" in "Descending" order in English, the confirm event will return

{
    sortOrder: "Descending",
    sortBy: "Name"
}

while if the application is translated in French, it will return

{
    sortOrder: "Décroissant",
    sortBy: "Nom"
}

Thus, preventing us to make an API call with these criteria as the code isn't supposed to know that "Décroissant" means "Descending" and that the field we want to apply these filters to is "name" instead of "Nom".

Expected Behavior

There are a few possible solutions:

  1. As for SAPUI5 ViewSettingsItem, you could add the ability to provide a key that will be returned alongside the item text attribute when firing the confirm event.
  2. In the confirm event, instead of only returning the text attribute, you could also return the whole HTMLElement that has been selected (similar to the List). This would allow developers to add whatever they want to the element dataset.

Context

  • UI5 Web Components version: 1.0.1
  • Affected component: ViewDetailsDialog

Priority

  • Low
  • Medium
  • High
  • Very High

Stakeholder Info (if applicable)

  • Organization: SuccessFactors
@TeodorTaushanov
Copy link
Member

@SAP/ui5-webcomponents-topic-b, can you check this one?

@Todor-ads Todor-ads self-assigned this Dec 31, 2021
ilhan007 pushed a commit that referenced this issue Feb 25, 2022
…cel events (#4772)

The confirm event now contains two more fields:
sortByItem selected item (reference to element)
sortDescending Boolean result for SortOrder (if is true - Descending order is selected)

Fixes: #4539
ilhan007 pushed a commit that referenced this issue Mar 18, 2022
…cel events (#4772)

The confirm event now contains two more fields:
sortByItem selected item (reference to element)
sortDescending Boolean result for SortOrder (if is true - Descending order is selected)

Fixes: #4539
@petyabegovska petyabegovska moved this to Completed in Maintenance - Topic B Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
3 participants