-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dialog header content wraps below title, or is pushed outside dialog #4309
Comments
Normally this css should work as a workaround:
|
The problematic CSS was added by #3654. It makes sense for footer where users often tend to place several buttons and expect them to wrap in multiple lines on small screens. But we probably should not apply it to |
I did add that CSS intentionally (allow the header content to wrap), thinking it would be the most flexible and least brittle. But perhaps it should be changed, if we assume the most common use for the header content area is just a close button. |
I do see the rationale in that, but I feel that it's optimizing for the wrong thing. The way I see the
In case 1, you probably don't want the close button (or the other buttons) to wrap below title. |
Description
If the dialog's title is too long to fit next to the
header-content
part (containing typically a close button), theheader-content
part wraps below the title, which looks silly, and is hardly what the developer intended:Even worse, if the title contains a sufficiently long substring, the
![image](https://user-images.githubusercontent.com/4611559/183082684-a61e212c-6ec8-4c35-bda3-b5364752dd2c.png)
header-content
part can be pushed entirely outside the dialog:Expected outcome
Header-content stays next to the title no matter what.
flex-wrap: nowrap
on the header part.overflow:hidden
and, ideally,text-overflow:ellipsis
on the title part.Minimal reproducible example
Wrapping:
Pushing outside:
Replace title with "ASufficientlyLongDialogTitleThatPushesTheHeader-contentPartOutside"
Steps to reproduce
Make the viewport of the above dialog sufficiently narrow for the title to wrap / push outside.
Environment
Vaadin version(s): 23.1
Browsers
Issue is not browser related
The text was updated successfully, but these errors were encountered: