From b58af59c40111e661e1841288ce68ef442b28300 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Mon, 1 Nov 2021 09:25:51 +1000 Subject: [PATCH 01/14] Fix font family skip serialization check (#36073) --- packages/block-editor/src/hooks/font-family.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/hooks/font-family.js b/packages/block-editor/src/hooks/font-family.js index 1ee11f6514b113..193896fadf8628 100644 --- a/packages/block-editor/src/hooks/font-family.js +++ b/packages/block-editor/src/hooks/font-family.js @@ -58,7 +58,7 @@ function addSaveProps( props, blockType, attributes ) { if ( hasBlockSupport( blockType, - '__experimentalSkipTypographySerialization' + 'typography.__experimentalSkipSerialization' ) ) { return props; From 954d61a14a42820881223e76bc6dd827ed6e1611 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Mon, 1 Nov 2021 12:44:53 +1300 Subject: [PATCH 02/14] Gallery block: replace gallery experimental setting with a check for use_balanceTags (#34979) Co-authored-by: Glen Davies --- lib/experiments-page.php | 17 ++++------------- .../specs/editor/blocks/gallery.test.js | 4 ++-- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/lib/experiments-page.php b/lib/experiments-page.php index ef9f17dea1057c..bd4ca968073f8a 100644 --- a/lib/experiments-page.php +++ b/lib/experiments-page.php @@ -51,17 +51,6 @@ function gutenberg_initialize_experiments_settings() { 'id' => 'gutenberg-navigation', ) ); - add_settings_field( - 'gutenberg-gallery-refactor', - __( 'Gallery block experiment', 'gutenberg' ), - 'gutenberg_display_experiment_field', - 'gutenberg-experiments', - 'gutenberg_experiments_section', - array( - 'label' => __( 'Test a new gallery block that uses nested image blocks (Warning: The new gallery is not compatible with WordPress mobile apps prior to version 18.2. If you use the mobile app, please update to the latest version to avoid content loss.)', 'gutenberg' ), - 'id' => 'gutenberg-gallery-refactor', - ) - ); register_setting( 'gutenberg-experiments', 'gutenberg-experiments' @@ -108,9 +97,11 @@ function gutenberg_display_experiment_section() { * @return array Filtered editor settings. */ function gutenberg_experiments_editor_settings( $settings ) { - $experiments = get_option( 'gutenberg-experiments' ); + // The refactored gallery currently can't be run on sites with use_balanceTags option set. + // This bypass needs to remain in place until this is resolved and a patch released. + // https://core.trac.wordpress.org/ticket/54130. $experiments_settings = array( - '__unstableGalleryWithImageBlocks' => isset( $experiments['gutenberg-gallery-refactor'] ), + '__unstableGalleryWithImageBlocks' => (int) get_option( 'use_balanceTags' ) !== 1, ); return array_merge( $settings, $experiments_settings ); } diff --git a/packages/e2e-tests/specs/editor/blocks/gallery.test.js b/packages/e2e-tests/specs/editor/blocks/gallery.test.js index e44e7ddf17b5e1..50a10288626c41 100644 --- a/packages/e2e-tests/specs/editor/blocks/gallery.test.js +++ b/packages/e2e-tests/specs/editor/blocks/gallery.test.js @@ -47,7 +47,7 @@ describe( 'Gallery', () => { const filename = await upload( '.wp-block-gallery input[type="file"]' ); const regex = new RegExp( - `\\s*