Add block-based widgets editor#1284
Closed
noisysocks wants to merge 2 commits intoWordPress:masterfrom
Closed
Conversation
1dc94ed to
2c74335
Compare
0e59af9 to
b62af1c
Compare
1116dbd to
7dcbf65
Compare
Member
Author
|
Not sure why tests on PHP 8 are hanging. It seems to be happening on all branches. I verified locally that tests pass using PHP 8. |
7dcbf65 to
3b06789
Compare
Contributor
tellthemachines
left a comment
There was a problem hiding this comment.
Looks good, and works well ✅ Left a few questions below.
youknowriad
reviewed
May 25, 2021
Contributor
youknowriad
left a comment
There was a problem hiding this comment.
I think this landed already but I left a few comments that might or might not result in follow-up commits :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trac ticket: https://core.trac.wordpress.org/ticket/51506
Supersedes #603.
Requires #1293.
This moves the the block-based widget editors over from Gutenberg into Core.
Broadly speaking, there's four parts to this:
@wordpress/edit-widgets,@wordpress/customize-widgets, and@wordpress/widgetsare added as dependencies. These packages contain the block editors.Supporting infrastructure such as
WP_Widget_Blockhas been copied over from Gutenberg.wp-admin/widgets.phphas been modified to branch between the old form-based editorwp-admin/widgets-form.phpand the new block-based editorwp-admin/widgets-form-blocks.phpdepending onget_theme_support( 'widgets-block-editor' )anduse_widgets_block_editor.WP_Customize_Widgetshas been modified to useWP_Sidebar_Block_Editor_Controlwhich contains the block editor instead ofWP_Widget_Area_Customize_Controldepending onget_theme_support( 'widgets-block-editor' )anduse_widgets_block_editor.This PR contains
WP_REST_Sidebars_ControllerandWP_REST_Widget_Utils_Controllerso that it's easier to test, but these parts should be committed separately. @TimothyBJacobs is working on it.How to test
npm run env:startnpm run env:installnpm run devwidgets.phpblock editor.customize.phpblock editor.Tasks remaining
WP_Customize_Widgets::enqueue_scriptscan be skipped if block editor is enabled.should_load_block_editor_scripts_and_stylesfilter is not run in Customizer.This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.