gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Create SlotFill pattern for inserting Panels where Metaboxes reside.

Open cherrygot-personal opened this issue 3 years ago • 0 comments

What problem does this address?

I was looking for a way to insert a Panel below the post content editing space where usually the metaboxes are rendered. Here's the screenshot of the same for reference. image

There are cases when we want the UI to be span in the most available width possible, for example, inserting a rich text editing field or multiple tabbed form. Squeezing them in the Sidebar sometimes leads to compromises of all sort. It'd be nice if we have a choice to either extend the editor on the side or the bottom, just like the metaboxes.

As of now, this section of the editor is used only to provide backwards compatibility for the old metaboxes. The implementation, as I've read here, https://developer.wordpress.org/block-editor/how-to-guides/metabox/#backward-compatibility uses form actions to save the data.

What is your proposed solution?

The solution is to create a slotFill pattern to extend the area of the metaboxes just like the EditSiteSidebarInspector or PluginPostStatusInfo. One place we can wrap with the SlotFill pattern is https://github.com/WordPress/gutenberg/blob/aa55590ea7eb16cb90dd41531ff10c86d52023c2/packages/edit-post/src/components/layout/index.js#L251-L254

cherrygot-personal avatar Apr 04 '23 15:04 cherrygot-personal