SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
426 stars 94 forks source link

MessageView: item is truncated in dialog #5990

Closed lochannimje closed 1 day ago

lochannimje commented 5 days ago

Describe the bug

In Safari browser, information/error message is not showing fully, In other browsers, able to see the complete message. The issue is there in web component itself. Kindly do help us here!

image

image

Isolated Example

No response

Reproduction steps

1. 2. 3. ...

Expected Behaviour

It should show the complete message, or the message should go in next line with scrollbar provided.

Screenshots or Videos

image

image

UI5 Web Components for React Version

1.16.3

UI5 Web Components Version

1.14.0

Browser

Safari

Operating System

ios

Additional Context

No response

Relevant log output

No response

Organization

SAP Labs Ltd, Bengaluru

Declaration

Lukas742 commented 5 days ago

Hi @lochannimje

Please follow the guidelines for opening issues. "[Component Name]: [Bug Description]" doesn't give information of the affected component and neither of what the issue is about.

Also, please add a reproducible example, preferably by using this StackBlitz template.

lochannimje commented 4 days ago

Hi @Lukas742 please click the link: https://sap.github.io/ui5-webcomponents-react/?path=/story/user-feedback-messageview--message-view-in-dialog and then click on Open Dialog

image

you can see the highlighted message, it is not showing fully, can see dots there. Expected behaviour: It can show the message fully.

Lukas742 commented 4 days ago

This is not related to the MessageView but the Dialog as it has a width of 400px defined in our example. The linked PR will adjust this. So, in your application you can adjust the behavior of the Dialog to your use-case.

lochannimje commented 1 day ago

Hi @Lukas742, The above issue comes in Safari browser, for other browser it is working as expected. Please help me over here!!

Lukas742 commented 1 day ago

Hi @lochannimje

maybe Safari makes the text a bit bolder, or calculates the dimension of the font somehow differently, but the root cause of this is still the same (at least in our Storybook). We're setting a width (only in our documentation, not in the component itself) of 400px and since the text is longer than that, it gets truncated.
In your application, it's up to you to decide what dimensions you want to use for the Dialog.

https://github.com/SAP/ui5-webcomponents-react/assets/9749730/56353aa7-4378-469d-b1ba-5057ef8bed79

If there's a different issue with the component, please add a reproducible example.

pppwr7 commented 14 hours ago

Hi Lukas742, I see that the Title control is used to display the text in the MessageView in https://github.com/SAP/ui5-webcomponents-react/pull/5993/files. Can't we set the 'wrappingType' property to 'Normal' in the Title control? This could solve the issue for us.

Lukas742 commented 13 hours ago

Hi @pppwr7

unfortunately not, since this behavior is by design. You can see the same behavior in the SAPUI5 implementation (just change one of the titles to a very long one). Titles should be short and meaningful, for further information you can use the detail view.

In case you want to open a feature request for the wrapping behavior, please first open a ticket in central design and include the ID in the feature request.