-
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 JavaScript packages for WordPress 6.0 Beta1 release #2564
Update @wordpress JavaScript packages for WordPress 6.0 Beta1 release #2564
Conversation
2875407
to
afc1369
Compare
👋 Failing tests such as these – 5) Tests_Blocks_Render::test_do_block_output with data set #22 ('core__gallery__columns.html', 'core__gallery__columns.server.html')
File '/var/www/tests/phpunit/includes/../data/blocks/fixtures/core__gallery__columns.html' does not match expected value
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
'
-<ul class="wp-block-gallery columns-1 is-cropped">
+<ul class="wp-container-12 wp-block-gallery-11 wp-block-gallery columns-1 is-cropped">
<li class="blocks-gallery-item">
<figure>
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
/var/www/tests/phpunit/tests/blocks/render.php:228 – relate to a change in the Columns block, where we added layout support. See comment: WordPress/gutenberg#37360 (comment) Blocks that opt into layout support are gifted generated classnames 🎁 of One possible approach is to update public function test_do_block_output( $html_filename, $server_html_filename ) {
$html_path = self::$fixtures_dir . '/' . $html_filename;
$server_html_path = self::$fixtures_dir . '/' . $server_html_filename;
foreach ( array( $html_path, $server_html_path ) as $filename ) {
if ( ! file_exists( $filename ) ) {
throw new Exception( "Missing fixture file: '$filename'" );
}
}
$html = do_blocks( self::strip_r( file_get_contents( $html_path ) ) );
// If blocks opt into Gutenberg's layout implementation
// the container will receive an added classname of `wp_unique_id( 'wp-container-' )`
// so we need to normalize the random id.
$normalized_html = preg_replace( '/wp-container-\d+/', 'wp-container-1', $html );
$expected_html = self::strip_r( file_get_contents( $server_html_path ) );
$this->assertSame(
$expected_html,
$normalized_html,
"File '$html_path' does not match expected value"
);
} And then in the columns (and any other offending fixtures) <!-- wp:column -->
<div class="wp-container-1 wp-block-column">
<!-- wp:paragraph -->
<p>Column One, Paragraph One</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Column One, Paragraph Two</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:columns --> |
The new |
ProblemThere's one more puzzle piece to address in regard to class names – the
It was introduced specifically for the gallery block in WordPress/gutenberg#38164 Fixtures from the Gutenberg trunk don't seem to acknowledge that class name: https://github.com/WordPress/gutenberg/blob/trunk/test/integration/fixtures/blocks/core__gallery__columns.html The integration tests implemented in JavaScript pass without a problem, presumably because Solution
|
* Add the @wordpress/preferences package * Rename GUTENBERG_PHASE1 to IS_GUTENBERG_PLUGIN * Remove COMPONENT_SYSTEM_PHASE
This relates to a change in the Columns block that added layout support. See WordPress/gutenberg#37360 (comment). Blocks that opt into layout support are gifted generated classnames of wp_unique_id( 'wp-container-' ). One possible approach is to update test_do_block_output in Tests_Blocks_Render to swap the id for something we expect. It's how Gutenberg approaches it when testing generated classnames in elements support.
…ery-' ) Replace the random-ish output such as wp-block-gallery-12 with a predictable one like wp-block-gallery-1
…k fixtures, and make the PHP tests mindful of the randomness
2f64e6f
to
a36b1ec
Compare
We still need to use
|
The CSS styles are not loading properly in the site editor on this branch – notice how the site logo block looks like: The problem does not occur in trunk: It broke in the very beginning of this branch - right after updating the WordPress packages: c50d107 |
Create *.js.map
*.js
*.css Run in every new block folder: svn propset svn:ignore -F ingorelist.txt . |
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included: - Avatar - Comment Author Name - Comment Content - Comment Date - Comment Edit Link - Comment Rely Link - Comment Template - Comments Pagination - Comments Pagination Next - Comments Pagination Previous - Comments Query Loop - Home Link - Post Author Biography - Query No Results - Read More See more details in #2564. Props zieladam, ramonopoly, ocean90. Fixes #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53157 602fd350-edb4-49c9-b593-d223f7449a82
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included: - Avatar - Comment Author Name - Comment Content - Comment Date - Comment Edit Link - Comment Rely Link - Comment Template - Comments Pagination - Comments Pagination Next - Comments Pagination Previous - Comments Query Loop - Home Link - Post Author Biography - Query No Results - Read More See more details in WordPress/wordpress-develop#2564. Props zieladam, ramonopoly, ocean90. Fixes #55505. Built from https://develop.svn.wordpress.org/trunk@53157 git-svn-id: http://core.svn.wordpress.org/trunk@52746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included: - Avatar - Comment Author Name - Comment Content - Comment Date - Comment Edit Link - Comment Rely Link - Comment Template - Comments Pagination - Comments Pagination Next - Comments Pagination Previous - Comments Query Loop - Home Link - Post Author Biography - Query No Results - Read More See more details in WordPress/wordpress-develop#2564. Props zieladam, ramonopoly, ocean90. Fixes #55505. Built from https://develop.svn.wordpress.org/trunk@53157 git-svn-id: https://core.svn.wordpress.org/trunk@52746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Committed with https://core.trac.wordpress.org/changeset/53157. Awesome work @adamziel wrangling all those tricky changes. Let's tackle the issues with styles in the site editor with a new PR. |
The CSS issue seems to be a missing backport of WordPress/gutenberg#37193
|
Fixed with 1d086c5. |
What?
This huge PR is required to ship WordPress 6.0 Beta 1. It is part of the process described in the developer handbook.
Why?
The WordPress repository contains the Gutenberg files, some of them in a pre-built form.
Releasing a new WordPress version means bringing a new version of the Gutenberg code from the relevant Gutenberg release. In this case, it is v13.0.0-rc.3.
It may seem somewhat awkward to ship a Gutenberg Release Candidate instead of the stable version – it is intentional, though. That's how the process is lined up in the release calendar. Beta 1 is scheduled for today, April 12th, and v13.0.0-rc.3 is the latest available Gutenberg release. The stable Gutenberg version v13.0.0 will only be released later this week and included in an upcoming WordPress 6.0 Beta 2 on April 19th.
How?
Step 0: Pre-requisites
There was some grunt work to perform before this PR could be even created:
Every next step depends upon these.
Step 1: Update WordPress packages
I've updated all the relevant packages
Step 2: Update blocks list
I've made adjustments in all the files that include a list of blocks in some form:
Then also unregistered the init hooks in
tests/phpunit/includes/functions.php
Step 3: build
I've ran the production and the development build:
Step 4: Whack-a-mole
I've spent a while iterating on any emerging problems and CI failures with @gziolo. It is partially documented in the discussion below:
wp-container-\d+
classwp-gallery-\d+
classStep 5: SVN commit
@gziolo listed the
svn:ignore
steps required to commit these changes to the SVN repo.#2564 (comment)
Trac ticket: https://core.trac.wordpress.org/ticket/55505 (created to keep track of the process on the WordPress SVN/Trac side of things)
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.