SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.47k stars 254 forks source link

[SF] Table - When the column header labels are very long, show them as truncated text instead of increasing the table header height to accommodate them #5672

Closed Vir-Mittal closed 1 year ago

Vir-Mittal commented 1 year ago

Feature Request Description

Original issue for reference - https://github.com/SAP/ui5-webcomponents/issues/5268

Sandbox - https://codesandbox.io/s/table-with-long-column-header-labels-vdrofi?file=/src/App.js

For the Table component, when very long labels are used for the column headers and the screen width is large, the column headers are displayed as expected, taking up as much space as possible -

Table long column labels with large width

However, when the screen width is small, the table header height increases in order to accommodate the long labels -

Table long column labels with small width

Instead of increasing the column header height, would it be possible to show the long labels as truncated text instead, something like this -

Table columns labels with truncated text

This would be similar to how other components such as the Card Header show truncated text when the text is too long

Proposed Solution

Instead of increasing the column header height, would it be possible to show the long labels as truncated text instead, something like this -

Table columns labels with truncated text

Priority

A clear and concise description of the impact/urgency of the required feature.

Stakeholder Info (if applicable)

unazko commented 1 year ago

Hello @SAP/ui5-webcomponents-topic-rl,

Take a look of this feature request.

Best Regards, Boyan

nikolay-kolarov commented 1 year ago

Hi @niyap ,

As discussed, I think this can be done with the current possibilities of the API. Could you please have a look?

Thanks, Nikolay

nikolay-kolarov commented 1 year ago

Hello @Vir-Mittal,

We had a look again in your request. As discussed in the previous issue, this might cause accessibility problems. It is against the Fiori Guidelines and you must not use tooltips for this. Here is the link: https://experience.sap.com/fiori-design-web/using-tooltips/

So, we cannot accept such a feature request.

Still, as discussed you can do this at your own risk with custom code in the application, but we do not recommend it due to the reasoning above.

Thanks, Nikolay

jatinthaker commented 1 year ago

SF will look into a custom implementation based on the guidance above. We can then circle back with UI5 WC to determine wider application. Will discuss further with Stefan and Stoehr.