No `:part()` support for Timeline and TimelineItem components
Bug Description
React components ui5-webcomponents/packages/fiori/src/Timeline.hbs and ui5-webcomponents/packages/fiori/src/TimelineItem.hbs do not have support for the part pseudo element, currently.
Ex: See https://github.com/SAP/ui5-webcomponents/blob/684ccbf995b4cdd8f0db25bb952c3ebebbcd5d0e/packages/fiori/src/TimelineItem.hbs.
Expected Behavior
It would be helpful if these components support for the part pseudo element, as well
Priority
- [ ] Low
- [x] Medium
- [ ] High
- [ ] Very High
Hi @lv75 ,
Indeed, the Timeline and TimelineItem do not have part support currently, but could you explain your use case and also what "parts" do you want to be included?
Kind Regards, Elena
Hi Elena,
By default, the Timeline's and TimelineItem's shadow DOM elements, such asui5-tli-title, ui5-tli-subtitle and ui5-tli-desc, do not wrap the text that is longer than the width of the component. Instead, these elements simply chop the long text and display it on a single line.
This behavior is not always desired, as there are cases when it is necessary to wrap these texts on multiple lines, as in this screenshot:

However, the component does not provide an API to achieve this, so the easier option would be use the :part attribute (pseudo element) to modify the CSS styling of these shadow DOM elements.
So, I think it will be useful if all main shadow DOM elements of these components would support the ':part' attribute for situations such as this, when it is really necessary to intentionally pierce the shadow DOM and modify component's default styling.
Thanks and Best Regards,
- Lucian
Hi @SAP/ui5-webcomponents-team ,
The reported issue is related the timeline/timeline item web components. The reporter wants to enable wrapping on ui5-tli-title, ui5-tli-subtitle and ui5-tli-desc level via :part support.
The issue is reproducible in the playground https://sap.github.io/ui5-webcomponents/master/playground/components/Timeline/ If you change the title, subtitle text with a longer string value and you make the viewport smaller, you will see that the text get cut. The desired behavior is for the text to wrap.
I am not sure if this should be considered a bug, since the reporter suggests support for ":part" attribute for all main shadow DOM elements, where necessary.
Could you please have a look?
Kind Regards, Elena
Hi @lv75
As much as I can understand, you wish to control only the truncating/wrapping behaviour of all the texts. If so I can propose another solution that is future proof and won't need any additional work on your side.
We can implement a wrappingType property on ui5-timeline-item level, which will control the wrapping/truncating behaviour of all texts. The downside of this approach would be the fact that you will not be able to control any other CSS properties.
If this is the case(you only want to control the truncating/wrapping behaviour), we will implement the wrappingType property. Can you confirm that you only want to control the truncating/wrapping behaviour and nothing else?
Hi @lv75
Do you still need these requirements or should we close the feature request?
Closing due to inactivity.