-
Notifications
You must be signed in to change notification settings - Fork 274
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
[Dialog]: Dialog width calculation does not take Button Text Width into consideration #10012
Comments
Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository. |
Hi team, |
Hi. The given code is from your sourcecode in But using the new Toolbar instead of a Bar leads to moving the action into an overflow menu instead of cropping |
Hi @gitgdako , |
As stated
I would expect the text not to be truncated to a reasonable max width... or not to be truncated ever and leave it to the dev to define a maxwidth. Just setting the min-width automatically is a dirty fix imo and should just be the solution in case you dont want to put too much time into this. Especially needing to override in case you want a smaller dialog is not pretty |
I explicitly stated that I do NOT want to specify the width for every single Dialog. UI5 is pretty good in calculating necessary sizes and for the specified buttons this was working well in 1.x |
Hello @SAP/ui5-webcomponents-topic-b , Looks like the We have had similar problems in another component. Based on that experience, I see 2 possible solutions:
Best regards, |
Hi @wvudako , After a discussion with our architect, a solution was raised. The default [ui5-dialog] [ui5-bar][slot="footer"] {
container-type: unset;
} Best Regards, |
Describe the bug
{ Dialog, Bar } from '@ui5/webcomponents-react';
Source Doc:
Dialog: https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/modals-popovers-dialog--docs
Dialog Styling with MessageViewButton:
https://experience.sap.com/wp-content/uploads/sites/56/2021/11/message-popover_overview_1.96.png
https://experience.sap.com/fiori-design-web/messaging/#message-popover
Using a dialog as described in your documentation with a small content and long Button Text, the Button Text is truncated.
This is even more of an issue if as described in the linked Fiori Doc you have a Save and a Close Button as well as Space for the MessageViewButton.
In the stackblitz as well as in your storybook the dialog has a min-width of 20rem, which our local implementation does not get automatically, therefore amplifying the issue. Setting that value was our fix for now as well
I am very sure that this behaviour has changed from webcomponents 2.2 to 2.3 (maybe the min-width got lost), but we can not easily verify that. Either way this is likely a webcomponents issue
Isolated Example
https://stackblitz.com/edit/github-lqbaqm
Reproduction steps
Expected Behaviour
(Up to a reasonable max-width) the content of the footer is taking into consideration when calculating the dialog width
Screenshots or Videos
No response
UI5 Web Components for React Version
2.2.0
UI5 Web Components Version
2.3.0
Browser
Chrome
Operating System
Windows 11
Additional Context
No response
Relevant log output
No response
Organization
No response
Declaration
The text was updated successfully, but these errors were encountered: