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.51k stars 260 forks source link

ui5-table: column header alignment #6479

Open kaistephanrichter opened 1 year ago

kaistephanrichter commented 1 year ago

Feature Request Description

The table column headers currently are all left-aligned by default and there is no way to directly control the alignment, e.g. for columns that contain currency values, to be right aligned. In the playground you can find that this can be achieved by accessing the shadow DOM and setting the text-align on the th-element there.

ui5-table ui5-table-column.table-header-text-alignment::part(column){
   text-align: end;
}

This is very hidden for a feature that will be needed very often if column header should be formatted properly.

Proposed Solution

I suggest adding a property to the ui5-table-column-element that allows the developer to control the horizontal alignment.

Proposed Alternatives

You could also think about setting the content type and derive the alignment from there but this seems a bit too oppinionated..

Priority

Right now, everyone who wants to properly format the table header has to access the shadow DOM and therefore creates dependencies on the internal implementation of the web component. this might lead to incompatibilities for future versions. Formatting the column header is required for good usability.

Stakeholder Info (if applicable)

niyap commented 1 year ago

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

Could you please take a look of that feature request and analyse if it is feasible ?

Thank you in advance!

Kind Regards, Niya

hristop commented 1 year ago

Hi @kaistephanrichter ,

We are writing to inform you about an important development regarding our ui5-table component. After careful consideration and received feedback, we have decided to focus on re-implementing and improving the existing table component based on the gathered feature requests and requirements. Here are some details about this decision and how it may affect our ongoing development efforts.

The decision was made based on several factors, including scalability, performance, accessibility and the ability to meet future feature requirements. Our team has recognised the limitations of the current table component and after careful consideration, we concluded that it would be more effective to develop a new table component from scratch rather than invest more time in enhancing the current one.

While this decision allows us to provide a better user experience and meet evolving needs, I want to acknowledge that it may have some implications for the feature requests that have been made for the current ui5-table component. We understand that stakeholders have invested time and effort in suggesting improvements and new features. Rest assured that we value your input, and we will make every effort to take these feature requests into consideration during the development of the new ui5-table component.

However, it is important to note that the new table component may introduce backward incompatible changes. These changes may impact the way the current table component functions, including its API and visual representation. We understand that this may require adjustments and adaptations on your end. Our team will strive to provide documentation and guidance to facilitate a smooth transition to the new table component.

We are excited about the opportunities this transition will bring and the positive impact it will have on our product.

Should you have any questions or concerns regarding this transition or its implications, please don't hesitate to reach out.

Thank you for your understanding and continued support as we embark on this important transition. Unfortunately for now we are not able to provide concrete timelines but we are currently working on a first preview version of the new WebComponent which should already offer a first impression of the concepts behind. We have gathered the feature requests and we surely have them in mind while developing the new component.

Best Regards, Hristo

simlin commented 3 months ago

Hi @kaistephanrichter ,

In the 2.0 version of the UI5 Web Components we introduced a new Table component: https://sap.github.io/ui5-webcomponents/nightly/components/Table/

The table is still in an experimental phase and certain APIs might slightly change. Nevertheless we ask you to try out the new component already now. The earlier we get some feedback the better :)

The functionality you requested is currently in development and will be available th the new table soon.

Best Regards Jens