-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update @wordpress packages #2048
Conversation
Could you please add in the PHP changes from these two PRs of yours to this branch? I am not too sure how to do it as things are a little different in Core.
Could you also please double check that I backported the PHP changes in these two PRs of yours properly?
Could you please check to see if I missed any backports from your recent PRs? It was a little difficult to spot changes amongst the refactoring that you were doing. |
WordPress/gutenberg#37315 should fix the test failures, but will need to merge that PR and do another |
@noisysocks Are you okay when I merge the changes from #2009 into this PR? |
@noisysocks I believe I've done all the necessary backports from these "sync" PRs, I left the labels there to sync with |
@noisysocks I've double-checked the PRs you mentioned and are backported fine! As for the other two, pasting the patch below (to be applied by diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php
index 7205ef2f4a..f175eff85d 100644
--- a/src/wp-includes/block-editor.php
+++ b/src/wp-includes/block-editor.php
@@ -311,7 +311,6 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex
array(
'css' => 'variables',
'__unstableType' => 'presets',
- '__experimentalNoWrapper' => true,
),
array(
'css' => 'presets',
diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
index 39c7119fbc..fda548ed54 100644
--- a/src/wp-includes/default-filters.php
+++ b/src/wp-includes/default-filters.php
@@ -563,6 +563,7 @@ add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' );
+add_action( 'enqueue_block_editor_assets', 'wp_enqueue_global_styles_css_custom_properties' );
add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 8313088e67..8384b6b2d8 100644
--- a/src/wp-includes/script-loader.php
+++ b/src/wp-includes/script-loader.php
@@ -2863,3 +2863,12 @@ function wp_add_iframed_editor_assets_html() {
echo "<script>window.__editorAssets = $editor_assets</script>";
}
+
+/**
+ * Function that enqueues the CSS Custom Properties coming from theme.json.
+ */
+function wp_enqueue_global_styles_css_custom_properties() {
+ wp_register_style( 'global-styles-css-custom-properties', false, array(), true, true );
+ wp_add_inline_style( 'global-styles-css-custom-properties', wp_get_global_stylesheet( array( 'variables' ) ) );
+ wp_enqueue_style( 'global-styles-css-custom-properties' );
+} The way I've tested it is by loading the site editor with TwentyTwentyTwo active. Then, go to the global styles sidebar, navigate to the palette editor, chose the gradients tab, and verify that they look like this (before this PR they would have been greyed out): I've also tested that visiting |
Not a problem. I've merged your branch into my one.
Thanks!
Thank you! I've applied the patch. I'm just going to do another round of npm publishing so that we have WordPress/gutenberg#37341 and WordPress/gutenberg#37315. I see that @hellofromtonya fixed the failing test in 1272182 by updating the assertion but IMO the test failure was legitimate. WordPress/gutenberg#37315 is the proper fix. I'll commit when ready and when tests pass 🙂 |
This reverts commit 1272182.
Committed! Thanks everyone. https://core.trac.wordpress.org/changeset/52364 |
Update packages to include these bug fixes from Gutenberg:
gutenberg_is_fse_theme
function to usewp_is_block_theme
gutenberg#37161appearanceTools
works gutenberg#37254Trac ticket: https://core.trac.wordpress.org/ticket/54487
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.