-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Modal: Height is bigger than needed and tooltip is wrong positioned #8561
Comments
@mmtr The height issue can easily be fixed by yourself. If this is something we want to change in gutenberg is something @jasmussen should say. Add a
I'm not able to reproduce the tooltip issue though. |
@xyfi Thanks for suggestion for fixing the height issue! I'm wondering if this height is the default one the package should provide or is it better if the height doesn't exceed by default the needed one by the content. Regarding the tooltip issue, you can reproduce it here: |
I think it's important to have good defaults, and right now the modal is designed for lots of real estate. I think it might be good that modals are born with the same dimensions for consistency. When I looked at the modal code, I recall there being some challenges with making the dimensions fit the content. Remember, this has to work across mobile, small tablets up to desktops, including big screens. That doesn't mean it's not possible, just that I recall this being difficult to pull off. I may be wrong. I know that Matías had an idea to add a |
Re: the height issue: I'd tend to think the height thing should be reviewed. Instead of setting it explicitly, the height should be determined by the content. A
|
Hm probably also the scrolling mechanism of the modal content should be reviewed. |
tooltip position bug appears to be identical to the one i reported in #8468 |
Describe the bug
When rendering a
Modal
component outside Gutenberg, the height of the component is bigger than the one needed for fitting the content.Also, the tooltip related to the Close dialog button is wrong positioned.
To Reproduce
Execute the code below in a new React project after installing
@wordpress/components
and@wordpress/compose
.Expected behavior
The modal height should be the minimum needed for fitting the content. The tooltip message that appears when hovering the close button should appear above the button.
Screenshots

Desktop:
Additional context
Issue found while working on #8338 and Automattic/wp-calypso#26367
The text was updated successfully, but these errors were encountered: