-
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
HTML block: The dimensions UI is displayed when the does not support Dimensions. #51723
Comments
Thanks for reporting @shimotmk. I have confirmed and am going to add this to the 6.3 Project Board. |
I'm thinking something like |
This bug applies not only to HTML blocks Shortcode or Classic or It's happening in a custom block. |
I did play around with this yesterday, by adding a specific property to the block.json, e.g.,
It needs a further check in the dimensions hook (packages/block-editor/src/hooks/dimensions.js) and component (packages/block-editor/src/components/global-styles/dimensions-panel.js). I'm not sure if this is the right approach. It's not easy to grok for me, due to the semantic contradiction though, which flows through to the supports components. |
The dev note was published here during the 6.2 cycle. I'm not sure what user documentation would be required or where it would have been published. |
Regarding the actual problem 😄 custom HTML is a bit of an edge case, in that its editor presentation doesn't match the front end and it doesn't necessarily have a single container. I guess this will require some sort of off-switch for the child layout controls, but it's not fully clear where they should reside. The display of these controls is decided by the parent block (for all of its children) inside the layout support, thought the controls themselves display as part of the dimensions panel. This might also be impacted by the changes in #49459. |
I'm going to remove this from the 6.3 board because it's not a regression from this release, but an edge case tied to an existing feature. |
It looks like this bug can be fixed! |
Description
The UI is displayed in a block that does not support Dimension.
Step-by-step reproduction instructions
Click on the custom HTML block and the Dimension panel is displayed.
The values set in the Dimension panel are not saved and have no effect in the front end.
Screenshots, screen recording, code snippet
dimension.mp4
Environment info
WordPress 6.2.2
Gutenberg 16.0.0
Twenty Twenty-Three 1.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: