Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

- FSE: Add welcome guide
- Update theme styles for the code block
- Add feature flag to toggle the new site editor sidebar
- Add templates list page for site editor
- Cover Block: Fix default background dim
- E2E: Add more Cover block tests
- Cover Block: Fix regressions
- Post Comments Form: ensure typography styles are applied to child elements
- Navigation: Fix space-between
- Fix background colours in nested submenus.
- Fix duplicate custom classnames in navigation submenu block
- Fix colour rendering in Navigation overlay
- Fix: Add ability to opt out of Core color palette V2
- Change @package to WordPress in block-library
- Make the core color palette opt-in for themes with not theme.json
- Remove textdomain from calendar block
- Page List block: fix space before href attribute
- Try: Let Featured Image block inherit dimensions, look like a placeholder
- [Global Styles]: Add block icon next to blocks list
- Page List: Use core entities instead of direct apiFetch
- Site Editor: Stabilize export endpoint
- Fix mobile horizontal scrollbar.
- Multi-entity save: Only set site entity to pending if really saving
- Add page list to navigation direct insert conditions
- Implement "Add New" for templates list in Site Editor
- Post Featured Image: Remove withNotices HOC
- Fix page list missing button styles when set to open on click.
- Make appender fixed position to avoid jumps in the UI
- Color UI component: reorder palettes and update names (core by defaults, user by custom)
- Remove the Styles link in Site Editor
- GlobalStyles sidebar: do not show default palette if theme opts-out
- Only render the site editor canvas when the global styles are ready.
- Global Styles: rename core origin key to default for presets
- Clarify i18n context for PostTemplateActions's "New" label
- Revert erroneous native editor package version bumps
- Try: Hide the columns inserter in pattern previews.
- Fix site editor region navigation
- Update navigation sidebar responsiveness
- Add _wp_array_set and _wp_to_kebab_case to 5.8 compat
- Make user able to change all color palette origins
- Site Editor: Update hrefs to not specifically refer to themes.php?page=gutenberg-edit-site
- Site Editor: Validate the postType query argument
- Navigation: Scale submenu icon.
- Move the theme editor under tools for FSE themes
- Deprecate navigation areas

See #54487.


git-svn-id: https://develop.svn.wordpress.org/trunk@52232 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson
2021-11-23 05:38:45 +00:00
parent 4dea8f5945
commit a86125d5c1
18 changed files with 679 additions and 516 deletions

View File

@@ -76,7 +76,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
* @ticket 53397
*/
public function test_get_settings_presets_are_keyed_by_origin() {
$core_origin = new WP_Theme_JSON(
$default_origin = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
@@ -103,9 +103,9 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
),
),
),
'core'
'default'
);
$no_origin = new WP_Theme_JSON(
$no_origin = new WP_Theme_JSON(
array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
@@ -134,15 +134,15 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
)
);
$actual_core = $core_origin->get_raw_data();
$actual_default = $default_origin->get_raw_data();
$actual_no_origin = $no_origin->get_raw_data();
$expected_core = array(
$expected_default = array(
'version' => WP_Theme_JSON::LATEST_SCHEMA,
'settings' => array(
'color' => array(
'palette' => array(
'core' => array(
'default' => array(
array(
'slug' => 'white',
'color' => 'white',
@@ -154,7 +154,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'core/group' => array(
'color' => array(
'palette' => array(
'core' => array(
'default' => array(
array(
'slug' => 'white',
'color' => 'white',
@@ -196,7 +196,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
),
);
$this->assertEqualSetsWithIndex( $expected_core, $actual_core );
$this->assertEqualSetsWithIndex( $expected_default, $actual_default );
$this->assertEqualSetsWithIndex( $expected_no_origin, $actual_no_origin );
}
@@ -593,7 +593,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
),
),
),
'core'
'default'
);
$this->assertEquals(
@@ -1298,20 +1298,22 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'color' => array(
'custom' => true,
'palette' => array(
array(
'name' => 'Red',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'green',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => '#0000ff',
'user' => array(
array(
'name' => 'Red',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'green',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => '#0000ff',
),
),
),
),
@@ -1323,20 +1325,22 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'color' => array(
'custom' => true,
'palette' => array(
array(
'name' => 'Yellow',
'slug' => 'yellow',
'color' => '#ff0000',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#00ff00',
),
array(
'name' => 'Orange',
'slug' => 'orange',
'color' => '#0000ff',
'user' => array(
array(
'name' => 'Yellow',
'slug' => 'yellow',
'color' => '#ff0000',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#00ff00',
),
array(
'name' => 'Orange',
'slug' => 'orange',
'color' => '#0000ff',
),
),
),
),
@@ -1354,20 +1358,22 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'settings' => array(
'color' => array(
'palette' => array(
array(
'name' => 'Red',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'green',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => '#0000ff',
'user' => array(
array(
'name' => 'Red',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'green',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => '#0000ff',
),
),
),
),
@@ -1375,20 +1381,22 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'core/group' => array(
'color' => array(
'palette' => array(
array(
'name' => 'Yellow',
'slug' => 'yellow',
'color' => '#ff0000',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#00ff00',
),
array(
'name' => 'Orange',
'slug' => 'orange',
'color' => '#0000ff',
'user' => array(
array(
'name' => 'Yellow',
'slug' => 'yellow',
'color' => '#ff0000',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#00ff00',
),
array(
'name' => 'Orange',
'slug' => 'orange',
'color' => '#0000ff',
),
),
),
),
@@ -1409,49 +1417,53 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'settings' => array(
'color' => array(
'palette' => array(
array(
'name' => 'Red/><b>ok</ok>',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'a" attr',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => 'var(--color, var(--unsafe-fallback))',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
'user' => array(
array(
'name' => 'Red/><b>ok</ok>',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'a" attr',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => 'var(--color, var(--unsafe-fallback))',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
),
),
),
),
'typography' => array(
'fontFamilies' => array(
array(
'name' => 'Helvetica Arial/><b>test</b>',
'slug' => 'helvetica-arial',
'fontFamily' => 'Helvetica Neue, Helvetica, Arial, sans-serif',
),
array(
'name' => 'Geneva',
'slug' => 'geneva#asa',
'fontFamily' => 'Geneva, Tahoma, Verdana, sans-serif',
),
array(
'name' => 'Cambria',
'slug' => 'cambria',
'fontFamily' => 'Cambria, Georgia, serif',
),
array(
'name' => 'Helvetica Arial',
'slug' => 'helvetica-arial',
'fontFamily' => 'var(--fontFamily, var(--unsafe-fallback))',
'user' => array(
array(
'name' => 'Helvetica Arial/><b>test</b>',
'slug' => 'helvetica-arial',
'fontFamily' => 'Helvetica Neue, Helvetica, Arial, sans-serif',
),
array(
'name' => 'Geneva',
'slug' => 'geneva#asa',
'fontFamily' => 'Geneva, Tahoma, Verdana, sans-serif',
),
array(
'name' => 'Cambria',
'slug' => 'cambria',
'fontFamily' => 'Cambria, Georgia, serif',
),
array(
'name' => 'Helvetica Arial',
'slug' => 'helvetica-arial',
'fontFamily' => 'var(--fontFamily, var(--unsafe-fallback))',
),
),
),
),
@@ -1459,25 +1471,27 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'core/group' => array(
'color' => array(
'palette' => array(
array(
'name' => 'Red/><b>ok</ok>',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'a" attr',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => 'var(--color, var(--unsafe--fallback))',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
'user' => array(
array(
'name' => 'Red/><b>ok</ok>',
'slug' => 'red',
'color' => '#ff0000',
),
array(
'name' => 'Green',
'slug' => 'a" attr',
'color' => '#00ff00',
),
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => 'var(--color, var(--unsafe--fallback))',
),
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
),
),
),
),
@@ -1492,19 +1506,23 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'settings' => array(
'color' => array(
'palette' => array(
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
'user' => array(
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
),
),
),
),
'typography' => array(
'fontFamilies' => array(
array(
'name' => 'Cambria',
'slug' => 'cambria',
'fontFamily' => 'Cambria, Georgia, serif',
'user' => array(
array(
'name' => 'Cambria',
'slug' => 'cambria',
'fontFamily' => 'Cambria, Georgia, serif',
),
),
),
),
@@ -1512,10 +1530,12 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
'core/group' => array(
'color' => array(
'palette' => array(
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
'user' => array(
array(
'name' => 'Pink',
'slug' => 'pink',
'color' => '#FFC0CB',
),
),
),
),

View File

@@ -147,8 +147,8 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase {
* @ticket 52991
*/
public function test_switching_themes_recalculates_data() {
// By default, the theme for unit tests is "default",
// which doesn't have theme.json support.
// The "default" theme doesn't have theme.json support.
switch_theme( 'default' );
$default = WP_Theme_JSON_Resolver::theme_has_support();
// Switch to a theme that does have support.