You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
6.7 & v2 of blockApi pushes metaboxes very far away from content #66879
I'm testing 6.7-RC-3, and noticed that when you still have blocks using v2 of the blockApi, that any metaboxes below the content editor are pushed very far away from the bottom of your content (so far that I'm concerned people won't even see them).
Step-by-step reproduction instructions
Have a block registered with v2 of the block API
Have a plugin that adds a metabox below the content
Notice how the gap between content and the metabox is huge (starting only with 6.7)
Screenshots, screen recording, code snippet
Environment info
WP 6.7-RC-3, no Gutenberg plugin.
Theme: Twentytwentyfive (and others)
Windows 10
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
Please confirm which theme type you used for testing.
Strictly speaking, this 40vh space between the content and the meta box was also present in 6.6.2 (See #64639).
Also, if a block using apiVersion 2 is present, the editor works as a non-iframe. And the meta box is not resizable. #66706 aims to enable resizable meta boxes in the non-iframe editor. I think that if this PR is shipped, it will also resolve the issues raised here.
Strictly speaking, this 40vh space between the content and the meta box was also present in 6.6.2
Ah yes, I stand corrected. We didn't notice it there because we had some custom CSS impacting the height of the editor. That CSS was breaking things in 6.7, and when removing it, I noticed this larger gap.
I do like the resizable metabox approach, but it seems that's a ways off. Any chance of getting this height reduced in the meantime? As I mentioned, that gap is SO large that it's super easy for people to miss that metaboxes are even down there. And some contain very important - or even required - fields.
Attached is a screenshot of the editor. There are metaboxes off the screen because the gap is so big. 😮
Any chance of getting this height reduced in the meantime?
I take it you mean in the Gutenberg plugin? In WP the next chance would be 6.7.1 and I hope that we include #66706 there. In the meantime I suppose the plugin could add a condition for the combination of meta boxes and legacy canvas that reduces the height. Then you’d have to be using the plugin on any concerned sites.
Overriding the style seems simple enough. This snippet works from my quick testing:
functionexample_enqueue_editor_content_assets() {
// Used to avoid duplicating the added style since the hook is invoked twice.static$is_added = false;
if ( ! $is_added && is_admin() ) {
$is_added = true;
wp_add_inline_style(
'wp-editor-classic-layout-styles',
'.has-metaboxes .editor-visual-editor:not(.is-iframed) .editor-styles-wrapper::after{ height: 4em }'
);
}
}
add_action( 'enqueue_block_assets', 'example_enqueue_editor_content_assets' );
Activity
t-hamano commentedon Nov 9, 2024
Thanks for the report.
Strictly speaking, this 40vh space between the content and the meta box was also present in 6.6.2 (See #64639).
Also, if a block using apiVersion 2 is present, the editor works as a non-iframe. And the meta box is not resizable. #66706 aims to enable resizable meta boxes in the non-iframe editor. I think that if this PR is shipped, it will also resolve the issues raised here.
cc @stokesman @talldan
MadtownLems commentedon Nov 12, 2024
Ah yes, I stand corrected. We didn't notice it there because we had some custom CSS impacting the height of the editor. That CSS was breaking things in 6.7, and when removing it, I noticed this larger gap.
I do like the resizable metabox approach, but it seems that's a ways off. Any chance of getting this height reduced in the meantime? As I mentioned, that gap is SO large that it's super easy for people to miss that metaboxes are even down there. And some contain very important - or even required - fields.
Attached is a screenshot of the editor. There are metaboxes off the screen because the gap is so big. 😮
stokesman commentedon Nov 12, 2024
I take it you mean in the Gutenberg plugin? In WP the next chance would be 6.7.1 and I hope that we include #66706 there. In the meantime I suppose the plugin could add a condition for the combination of meta boxes and legacy canvas that reduces the height. Then you’d have to be using the plugin on any concerned sites.
Overriding the style seems simple enough. This snippet works from my quick testing: