-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Sync Gutenberg packages #3154
Sync Gutenberg packages #3154
Conversation
@@ -72,7 +72,7 @@ function register_block_core_post_comments_form() { | |||
*/ | |||
function post_comments_form_block_form_defaults( $fields ) { | |||
if ( wp_is_block_theme() ) { | |||
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link" value="%4$s" />'; | |||
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WP_Theme_JSON_Gutenberg::get_element_class_name
was introduced in GB's lib/compat/wordpress-6.1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no class like that in WP core, so we will need to rename it in Gutenberg and workaround in a different way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason that this should not be simply hardcoded? Looking at the source, the values are hardcoded here and then referenced in here.
So, this could become simply:
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />'; | |
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link wp-element-button' . '" value="%4$s" />'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know, but FWIW, there was a Gutenberg PR that introduced that indirection: WordPress/gutenberg#41753.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think that we might encounter other functions that are added to WP_Theme_JSON_Gutenberg
, and for which we also might want to have a solution ready.
I've noticed that get_element_class_name
is specifically defined in WP_Theme_JSON_6_1
, which is located in class-wp-theme-json-6-1.php
. (The WP_Theme_JSON_6_1
class is then "aliased" as WP_Theme_JSON_Gutenberg
in class-wp-theme-json-gutenberg.php
.)
The existence of this versioning-and-aliasing mechanism seems to indicate for me that we can follow as similar pattern as in #43779 (and #3158). I.e.:
wordpress-develop
: Backportget_element_class_name
into Core'sWP_Theme_JSON
.- Gutenberg: Check for the existence of
WP_Theme_JSON::get_element_class_name
(or alternatively, for WP version >= 6.1). If it exists, use it; otherwise, fall back toWP_Theme_JSON_Gutenberg
(orWP_Theme_JSON_6_1
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: @MaggieCabrera has thankfully started backporting the Elements API (including get_element_class_name
): #3206
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I guess we can piggie-back on that PR and add an alias such as wp_theme_element_class_name
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be nicer 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a PR for the Gutenberg part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for wrangling the wp_theme_element_class_name
thing. I can confirm that WP_Theme_JSON
is not for public use (that's why we have the public wrappers for consumers to use).
src/wp-includes/blocks/comments.php
Outdated
*/ | ||
function comments_block_form_defaults( $fields ) { | ||
if ( wp_is_block_theme() ) { | ||
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WP_Theme_JSON_Gutenberg::get_element_class_name
was introduced in GB's lib/compat/wordpress-6.1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in #3154 (comment)
src/wp-includes/blocks/search.php
Outdated
<path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path> | ||
</svg>'; | ||
} | ||
|
||
$button_markup = sprintf( | ||
// Include the button element class. | ||
$button_classes[] = WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WP_Theme_JSON_Gutenberg::get_element_class_name
was introduced in GB's lib/compat/wordpress-6.1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in #3154 (comment)
Now, that you have the latest version of WP packages in this branch, you could try to apply the changes from the #2940 here and run the sync again. It should automatically detect at least the new List Item block. |
); | ||
} | ||
|
||
$styles = gutenberg_style_engine_get_styles( array( 'border' => $border_styles ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wp_style_engine_get_styles
is defined in the @wordpress/style-engine
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that becomes tricky, as we don't have the function and all related logic in WordPress core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be updated now!
TBH I was considering to maybe get this PR in shape and merge it, and only then merge @2940 -- mostly to keep changes a bit more contained. Think that's viable? 😄 |
(I'm happy to try it locally, though 😄 ) |
I would do it locally to check which blocks were added for 6.1 so you can include them manually here. Feel free to keep the changes related to the sync process outside of this PR 👍🏻 |
Ah, gotcha! Makes sense, I'll give that a go -- thank you! |
Hmm. I ran |
d4e7df8
to
7b087f6
Compare
I ran into another problem: I enabled the debugger and figured that the issue seems to be that the
Support for array in |
Good catch. The following PR #3108 should resolve that issue. I want to wrap up the related refactoring this week. |
7b087f6
to
0c38ad8
Compare
502a19a
to
50a3596
Compare
This has now been merged; I've just rebased this PR to include the changes. |
Did it resolve the issue? |
I see e2e tests failing. It looks like the new view file for the Navigation block is not present. My bet is that you need to list it in the webpack config here: wordpress-develop/tools/webpack/blocks.js Lines 152 to 155 in 3381f05
In the long run, we will have to find a more general solution, so it can be automatically detected like for other script and style types. |
Right; I also get two PHP notices when testing locally:
Good guess 😄 The following fixes the first warning: diff --git a/tools/webpack/blocks.js b/tools/webpack/blocks.js
index ab9fd926f0..e2060546ac 100644
--- a/tools/webpack/blocks.js
+++ b/tools/webpack/blocks.js
@@ -151,6 +151,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
entry: {
'file/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/file/view` ),
'navigation/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/navigation/view` ),
+ 'navigation/view-modal': join( baseDir, `node_modules/@wordpress/block-library/build-module/navigation/view-modal` ),
},
output: {
devtoolNamespace: 'wp', (The second one is still there, though.) |
935d4d5
to
165a372
Compare
I know there are quite a few failing tests, but just in case it helps, I believe it's expected that for the main Update: it looks like the expected value for |
a08e0db
to
5da4659
Compare
Didn't work; it seems that the sync script isn't picking up all the It appears that the reason might be that some packages didn't get their dist-tags added upon publishing. @gziolo is helping me resolve this (likely by a forced re-publishing). |
Okay, this seems to be running without any glaring fatals or errors now. @c4rl0sbr4v0 and I will give it a bit of smoke-testing, and @gziolo has kindly agreed to commit to Core once we've covered that. |
|
In the first failing test, the expected value has .wp-block-image{border-top-left-radius: 10px;border-bottom-right-radius: 1em;margin-bottom: 30px;padding-top: 15px;} near the end, whereas the actual value has .wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area{border-top-left-radius: 10px;border-bottom-right-radius: 1em;} So it seems like in actuality, the Tentatively pinging @ramonjd @andrewserong because it might be related to the Style Engine (?) |
Let's just make those tests pass for now. It's far more important to get Beta 1 out. We can iron out the details later. |
Creating and editing a post, page, and template seems to work ✅ I cannot currently add a new template for a specific single post. The console shows I'm pretty sure that the reason is that we're still missing #3221. Edit: Same for pretty much any other template that I try to newly add. |
|
Unit tests are passing. The "Test NPM" job was failing on Windows; re-running. |
FWIW, this was the failing test. diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php
index 928fea9..18391b1 100644
--- a/src/wp-includes/assets/script-loader-packages.php
+++ b/src/wp-includes/assets/script-loader-packages.php
@@ -1 +1 @@
-<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '244c44f9a93417bf7ee1'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '893ac6701ec077e6dcb6'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'f59d87e74ca8fde7e1cf'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '99a75943cc81a0674863'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7bf7275e6b4bcbb1b06b'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '57b629d7d20895f6feb4'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '330661e04977340703c1'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '81fc975ecb2f6513563d'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43a791a8f65b406dcf6e'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '84b31e24a5dcfd9a211a'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => 'f3eecee8c7cf1dd6fe02'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '2c9864f99e54e6a412fb'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '8986842760ed009336e7'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-viewport', 'wp-widgets'), 'version' => 'b165300535f3582f00a2'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '827e018f15f15503125b'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '0cc5547e380ef9f1c7ec'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'efa7260f1463958fe21e'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7fa61079bfa3bb9e4142'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'c969c4fa9f781c46a8b7'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6a6a486214dcad1a08d6'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '574aa48f83cfec8a7d8d'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '429c0a044401d5998532'), 'edit-widgets.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '69391d0ec3a30136b335'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '2841559daaf3eab166c7'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '72d791ff772f57f909bc'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f03a1f6b853601ea5727'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'c8b9af106157c1ccf597'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e98e9677eea626b84eb0'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ce385179f5300ae6db81'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7c78690c4305ba868cfc'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '25dcd1bfd2b5f3c7244a'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '811bdb5f7e5fd110de7e'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '66946665aefd82736ddc'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bce8311b0458ede2ace6'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '626afea4c4aa9e456a99'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '0f66d57d5cdcaff005c0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '8837d483fb9517ce88f6'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '4cd7b4f6c714e2559cfc'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'aae5a666f8cfa0d93709'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '44c460ec46ee90712073'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '38f6e27f8a1e8f693b3e'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a1fd6a8ae8e953fe1e4'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '527db1785e2c14e528f6'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3a0db84366be920dc0c5'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'a41eadb991193e206903'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '48a4ea0fec5d64e9cb58'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1c454988346d2631424'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'adcc475b338c87d6c507'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b1d1222b29af2b25a3d'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c24becf21dc63719cde9'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '7fe633c26840e189bfe8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd40debb9656e971cde0c'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '84b61ae6702ee7f94c59'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4aeb247ba5c38cf72dde'));
+<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '244c44f9a93417bf7ee1'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '893ac6701ec077e6dcb6'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'f59d87e74ca8fde7e1cf'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '99a75943cc81a0674863'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7bf7275e6b4bcbb1b06b'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '57b629d7d20895f6feb4'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '330661e04977340703c1'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '81fc975ecb2f6513563d'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43a791a8f65b406dcf6e'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '84b31e24a5dcfd9a211a'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => 'b3679bd0882f16187c16'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '2c9864f99e54e6a412fb'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '8986842760ed009336e7'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-viewport', 'wp-widgets'), 'version' => 'b165300535f3582f00a2'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '827e018f15f15503125b'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '0cc5547e380ef9f1c7ec'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'efa7260f1463958fe21e'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7fa61079bfa3bb9e4142'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'c969c4fa9f781c46a8b7'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6a6a486214dcad1a08d6'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '574aa48f83cfec8a7d8d'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '429c0a044401d5998532'), 'edit-widgets.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '69391d0ec3a30136b335'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '2841559daaf3eab166c7'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '72d791ff772f57f909bc'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f03a1f6b853601ea5727'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'c8b9af106157c1ccf597'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e98e9677eea626b84eb0'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ce385179f5300ae6db81'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7c78690c4305ba868cfc'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '25dcd1bfd2b5f3c7244a'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '811bdb5f7e5fd110de7e'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '66946665aefd82736ddc'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bce8311b0458ede2ace6'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '626afea4c4aa9e456a99'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '0f66d57d5cdcaff005c0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '8837d483fb9517ce88f6'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '4cd7b4f6c714e2559cfc'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'aae5a666f8cfa0d93709'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '44c460ec46ee90712073'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '38f6e27f8a1e8f693b3e'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a1fd6a8ae8e953fe1e4'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '527db1785e2c14e528f6'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3a0db84366be920dc0c5'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'a41eadb991193e206903'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '48a4ea0fec5d64e9cb58'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1c454988346d2631424'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'adcc475b338c87d6c507'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b1d1222b29af2b25a3d'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c24becf21dc63719cde9'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '7fe633c26840e189bfe8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd40debb9656e971cde0c'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '84b61ae6702ee7f94c59'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4aeb247ba5c38cf72dde')); If I'm not mistaken, the |
I'll commit this branch to We can fix all the remaining issues in |
Committed with https://core.trac.wordpress.org/changeset/54257. Let's tackle everything else with follow-up tasks. |
Thanks for the ping! In relation to your comment above, I think it's related to the specific selectors in image/block.json: Could it be that the tests weren't pulled across yet? Here is the expected string in the Gutenberg test: Edit: looking at the commit to get them to pass, I think no more needs to be done. They appear to reflect the tests expectations in Gutenberg trunk. Thank you! 🙇 |
I finally managed to get both versions of
confirms that the files are real, without any distortions, and that the hashes agree. The diff is nothing like line endings or Unicode characters. The file contains many JS modules, and in the Windows one some modules are just in a different order, nothing else. Namely, there are two pairs of
and
Unix lays them out in this order (first I think it's a webpack bug in sorting the module names. Try to sort names with a console.log([ 'WeekYear/index', 'Week/index' ].sort()); You'll get this result:
Now try the same with Windows separators ( console.log([ 'WeekYear\\index', 'Week\\index' ].sort()); and you'll get the reverse order: [ 'WeekYear\\index', 'Week\\index' ] Forward slash sorts after letters, but backslash sorts before letters! |
This PR serves two purposes:
__experimental
flag inblock.json
. For that to work however, we need the latest version of blocks that includes that flag 🙃Trac ticket: https://core.trac.wordpress.org/ticket/56467
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.