-
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
Block layout: Wide and Full are not available for custom container blocks if __experimentalLayout: constrained is used #43731
Comments
@tellthemachines Here is the same report, but instead I use the Test Case 1: Core group block
Test Case 2: Core group block
@tellthemachines It's nice that the SIDE NOTE: If my custom container block is nested inside the core/group block, the " |
@tellthemachines Another bug. 🐛 Adding a new custom container block, with the following settings in the
Only if I manually change the " |
@andrewserong thanks for response. I have now separated it and created a new issue. |
Thanks for the detailed report @CreativeDive ! I've worked out the problem with The issue with "wide" and "full" not being available for child blocks does seem like a bug; I'm still looking into it. |
@tellthemachines thanks a lot. Nice to get |
Ok, so it turns out the
This doesn't feel like an ideal API, and I think we should explore ways of improving it so that, like other block supports, we don't need to manually feed the settings to the inner blocks. However, we're two weeks away from Beta 1 for the next release so it's unlikely this will be addressed before the cutoff. Layout support is still an experimental feature, so we can technically still make breaking changes to it, but this gets harder to do the more folks use it for their custom blocks 😅 My best advice here is go ahead and use this if you're keen to experiment (and let us know if anything doesn't work as expected! this type of feedback is very valuable) but please keep an eye out for future changes, especially until Layout becomes a stable feature. |
@tellthemachines @carolinan @annezazu I totally disagree with this decision. We are not all React developers and a large number of WordPress users depend on your decisions. You took away " Is this really a decision that you want to limit Wordpress users not to change a block to full width just because it is an inner block? Please reconsider your decision and give us back " You want a user feedback for this experimental feature. But many users who don't use the group core block can't give you any feedback. The WordPress world is not just a group block. We also use other custom blocks and can't test the new feature if it doesn't work. |
@tellthemachines I would prefer to discuss the reasons why it would be better for user feedback to get this feature working in 6.1. |
Hi there, |
@sascha-bleech I feel with you. The issue has been reported for months, but it seems nobody here is interested in identifying and fixing real user issues. I have raised the issue several times, but there is absolutely no progress to be seen here. |
Closing as this has been fixed in #47477 |
Tested in Gutenberg 14 RC2.
@tellthemachines thank you, it's very important to know how the things should be working to test if everything is working fine or not.
Now I can get you the full bug report.
Test Case 1: Custom container block
"layout": { "contentSize": "840px", "wideSize": "1100px"}
is set intheme.json
."__experimentalLayout": { "type": "constrained" }
is set in theblock.json
inside thesupport
object.----> "Inner blocks respect content width" is NOT enabled by default.
----> Is this a bug ? 🐛
Test Case 2: Custom container block
"attributes": { "layout": { "type": "object", "default": { "type": "constrained" } } },
is set in theblock.json
----> "Inner blocks respect content width" is enabled by default.
----> The block code does not contain
"type":"constrained"
--------> I think that is correct and expected.
Test Case 3: Custom container block
"attributes": { "layout": { "type": "object", "default": { "type": "constrained" } } },
is set in theblock.json
----> "Inner blocks respect content width" is enabled by default.
----> The inner blocks get the width from the content size field
----> The block code contains
"type":"constrained"
--------> I think that is correct and expected.
wide
" and "full
" should be available for child blocks. I wish it would be like this.----> But it does not work! It seems it's a BUG! 🐛
I will now test the same with the
core/group
block to see a comparison.Originally posted by @CreativeDive in #33374 (comment)
The text was updated successfully, but these errors were encountered: