-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix nested cover block bug #28114
Fix nested cover block bug #28114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to also get a review from @jasmussen or @kjellr.
The rule was added here: https://github.com/WordPress/gutenberg/pull/17143/files#diff-9e449d4b8bd69c9771de8e20c9a1d78798a6934f99e3bfc432df6ceb23def7f4R8 — maybe a quick sanity check from @senadir? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I can't really remember why I introduced that (it was a long time ago), my best guess was to ensure compatibility with the resizableBox component |
Seems like there are a lot of benefits to trying it. Let's keep an eye out for any bugs that might ensue. |
There is a failing e2e test that may be related:
I will try looking into this. |
If the test turns particularly gnarly, you can try |
Noting that this seems to have caused #28242. Tentative fix by @jasmussen here: #28287. (Thanks Joen!) |
I had to restore the An interim fix, adding If you can provide some demo content that produces the issue you see with a cover block inside a column, I'd be happy to try and look for an alternate fix. |
Thanks @jasmussen. This is the post content that causes the issue:
You'll need a Jetpack site to test it on. There are more details here: Automattic/themes#2976 |
This PR removes
height: 100%
from the default styles of the cover block.I'm not certain, but I think this line causes more issues than the uses cases that make it worth keeping. In particular it causes a bug when a cover block appears inside of a flex container (like a columns block), causing the height the cover to take up 100% of a container which may contain other blocks — pushing those blocks outside of the document flow:
Another example of this bug: Automattic/themes#2976 (comment)
How to test