Performance: Split Classic block and Meta Boxes to their own package #32665
Labels
[Block] Classic
Affects the Classic Editor Block
[Feature] Meta Boxes
A draggable box shown on the post editing screen
[Package] Edit Post
/packages/edit-post
[Type] Performance
Related to performance efforts
What problem does this address?
We still have some legacy dependencies present in the block editor that were added to bridge the Classic Editor:
They are always present in the post editor even when they are never used on the website having a huge impact on the size of assets that every user has to download to edit content, example:
https://github.com/WordPress/wordpress-develop/blob/611d953e1509e20bf6a7d40f5710c0ce24b88b89/src/wp-includes/script-loader.php#L242-L247
editor
script dependency and several TinyMCE scripts and stylesheets to make them work. It impacts not only the post editor but also other screens like the new widgets editor screen.postbox
script dependency to operate properly, but in many cases, they depend on TinyMCE and all its assets.What is your proposed solution?
I discussed with @youknowriad that it'd a good idea to split Classic block and Meta Boxes handling to their own package, e.g.,
edit-post-compat
and tweak the condition to load that package iteratively (to deprecate it over time). The first step could be to make the Classic block and Meta Boxes opt-out on the site.The ideal scenario would be that the Classic block is available from the Block Directory and everyone can consume it from there when necessary.
Related work
There is a related issue #29681 created by @sarayourfriend for the Classic block that tried to load this block asynchronously which is still unresolved. I believe that both issues still make sense as they address a similar problem but different use cases. Related PRs: #21684, #29681.
There is also a WordPress Trac ticket: https://core.trac.wordpress.org/ticket/48654 which considers a solution/endpoint to lazy-load scripts and styles. It has also a work in progress PR in Gutenberg: #21244.
The Classic block gets removed for the list of blocks in the widgets editor as of #32800.
The text was updated successfully, but these errors were encountered: