Skip to content

Commit fd3596d

Browse files
Merge changes published in the Gutenberg plugin "trunk" branch
1 parent 7d4f436 commit fd3596d

File tree

329 files changed

+2939
-1387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+2939
-1387
lines changed

backport-changelog/6.9/9542.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/9542
2+
3+
* https://github.com/WordPress/gutenberg/pull/71264

changelog.txt

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,155 @@
11
== Changelog ==
22

3+
= 21.5.0-rc.1 =
4+
5+
6+
## Changelog
7+
8+
### Features
9+
10+
#### Block Library
11+
- Query Title: Add "Post Type Label" variation. ([71167](https://github.com/WordPress/gutenberg/pull/71167))
12+
13+
14+
### Enhancements
15+
16+
- DataForm: Panel layout can open as `dropdown` or `modal`. ([71212](https://github.com/WordPress/gutenberg/pull/71212))
17+
- Move Style above Navigation in Command Pallete. ([71265](https://github.com/WordPress/gutenberg/pull/71265))
18+
- Update `@tannin/sprintf` for full precision typing support in `@wordpress/i18n`'s sprintf. ([71185](https://github.com/WordPress/gutenberg/pull/71185))
19+
20+
#### DataViews
21+
- Add `enableMoving` option to the `table` layout to allow or disallow column moving left and right. ([71120](https://github.com/WordPress/gutenberg/pull/71120))
22+
- Add smaller preview size to dataviews grid layout. ([71077](https://github.com/WordPress/gutenberg/pull/71077))
23+
- Allow hiding configuration. ([71173](https://github.com/WordPress/gutenberg/pull/71173))
24+
- DataForm: Add `array` control. ([71136](https://github.com/WordPress/gutenberg/pull/71136))
25+
- DataForm: Add new `card` layout. ([71100](https://github.com/WordPress/gutenberg/pull/71100))
26+
- DataViews story: Rename "Non-interactive" to "Minimal UI". ([71178](https://github.com/WordPress/gutenberg/pull/71178))
27+
- Try adding optional infinite scroll to dataviews. ([70955](https://github.com/WordPress/gutenberg/pull/70955))
28+
29+
#### Block Library
30+
- Add View button to navigation link blocks. ([70986](https://github.com/WordPress/gutenberg/pull/70986))
31+
- Cover Block: Fix placeholder interaction in contentOnly mode. ([70157](https://github.com/WordPress/gutenberg/pull/70157))
32+
- Rename Accordions block to Accordion. ([71222](https://github.com/WordPress/gutenberg/pull/71222))
33+
- Video: Enable autoplay for video on `iOS` devices. ([69380](https://github.com/WordPress/gutenberg/pull/69380))
34+
35+
#### Components
36+
- Calendar component: Adjusts the justification for the first and last days of the week. ([71005](https://github.com/WordPress/gutenberg/pull/71005))
37+
- Form components: Support async validation. ([71184](https://github.com/WordPress/gutenberg/pull/71184))
38+
- Primary button: Update disabled state to be less prominent. ([70674](https://github.com/WordPress/gutenberg/pull/70674))
39+
- Update gradient-parser from 1.0.2 to 1.1.1. ([71186](https://github.com/WordPress/gutenberg/pull/71186))
40+
41+
#### Write mode
42+
- Hide Cut/Copy commands in Write Mode (contentOnly). ([71063](https://github.com/WordPress/gutenberg/pull/71063))
43+
- Restrict formatting controls in write mode (contentOnly). ([71058](https://github.com/WordPress/gutenberg/pull/71058))
44+
45+
#### Themes
46+
- Support providing border radius presets. ([67544](https://github.com/WordPress/gutenberg/pull/67544))
47+
48+
49+
### Bug Fixes
50+
51+
- Block Comments: Remove period in comment UI text. ([71234](https://github.com/WordPress/gutenberg/pull/71234))
52+
- Elements: Support unitless value in CSS custom properties. ([70704](https://github.com/WordPress/gutenberg/pull/70704))
53+
- Fix horizontal overflow caused by long parent page names in Post Panel. ([71117](https://github.com/WordPress/gutenberg/pull/71117))
54+
55+
#### DataViews
56+
- Fix DataViews primary actions horizontal layout consistency. ([71274](https://github.com/WordPress/gutenberg/pull/71274))
57+
- Preview size picker falls back to the smallest available size. ([71218](https://github.com/WordPress/gutenberg/pull/71218))
58+
59+
#### Components
60+
- DateCalendar, DateRangeCalendar: Use px instead of rem units, better theming support. ([71248](https://github.com/WordPress/gutenberg/pull/71248))
61+
- MenuItem: Make accessible when disabled. ([71251](https://github.com/WordPress/gutenberg/pull/71251))
62+
63+
#### Block Library
64+
- Media & Text: Retain 'useFeaturedImage' value during transformations. ([71093](https://github.com/WordPress/gutenberg/pull/71093))
65+
- Post Excerpts Block: Fix "read more" theme override. ([71179](https://github.com/WordPress/gutenberg/pull/71179))
66+
67+
#### Write mode
68+
- Fix: Hide crop and dimensions controls in site-logo block when in Write Mode. ([71061](https://github.com/WordPress/gutenberg/pull/71061))
69+
- Fix: Hide heading level and alignment controls in site-title block when in contentOnly mode. ([71057](https://github.com/WordPress/gutenberg/pull/71057))
70+
71+
#### Block Editor
72+
- Editor: Fix drag and drop to the top of the page. ([71241](https://github.com/WordPress/gutenberg/pull/71241))
73+
74+
#### CSS & Styling
75+
- Fields Components: Add missing style resets for fieldset elements. ([71217](https://github.com/WordPress/gutenberg/pull/71217))
76+
77+
#### Post Editor
78+
- DocumentBar: Only show template icon when back button is not present. ([71183](https://github.com/WordPress/gutenberg/pull/71183))
79+
80+
#### Icons
81+
- Fix viewbox for table and formatting related icons. ([71155](https://github.com/WordPress/gutenberg/pull/71155))
82+
83+
#### Design Tools
84+
- Fix duotone `cleanEmptyObject` attributes. ([71151](https://github.com/WordPress/gutenberg/pull/71151))
85+
86+
#### Paste
87+
- Classic block: Prevent event bubbubbling on paste. ([71148](https://github.com/WordPress/gutenberg/pull/71148))
88+
89+
90+
### Experiments
91+
92+
- al: Enable Command Palette in admin dashboard. ([71030](https://github.com/WordPress/gutenberg/pull/71030))
93+
94+
#### Block Library
95+
- Accordion Blocks: Make block icons internal. ([71229](https://github.com/WordPress/gutenberg/pull/71229))
96+
97+
98+
### Documentation
99+
100+
- DataForm: Update stories. ([71268](https://github.com/WordPress/gutenberg/pull/71268))
101+
- FormTokenField: Improve use case stories. ([71121](https://github.com/WordPress/gutenberg/pull/71121))
102+
- Social: Include developer blog tutorial in README. ([71266](https://github.com/WordPress/gutenberg/pull/71266))
103+
- Storybook: Move validated form components into main grouping. ([71181](https://github.com/WordPress/gutenberg/pull/71181))
104+
- Storybook: Remove `experimental` category in favor of a badge. ([70540](https://github.com/WordPress/gutenberg/pull/70540))
105+
- block.json schema: Make the apiVersion field required and only allow 3. ([71107](https://github.com/WordPress/gutenberg/pull/71107))
106+
107+
108+
### Code Quality
109+
110+
#### Block Library
111+
- Accordion: Refactor settings panel to use ToolsPanel. ([71225](https://github.com/WordPress/gutenberg/pull/71225))
112+
- File Block: Follow HTML API best practices. ([71034](https://github.com/WordPress/gutenberg/pull/71034))
113+
114+
#### Widgets Editor
115+
- Widget Area Block: Apply API version 3. ([71110](https://github.com/WordPress/gutenberg/pull/71110))
116+
117+
118+
### Tools
119+
120+
#### Testing
121+
- Automated Testing: Re-enable storybook smoke test. ([71126](https://github.com/WordPress/gutenberg/pull/71126))
122+
- Fix flaky 'navigable-toolbar' end-to-end test. ([71158](https://github.com/WordPress/gutenberg/pull/71158))
123+
- Site editor e2e: Ensure dismissal notice waits for the first occurrence of an updated/published notice. ([71197](https://github.com/WordPress/gutenberg/pull/71197))
124+
- Upgrade Playwright to v1.54.2. ([70503](https://github.com/WordPress/gutenberg/pull/70503))
125+
126+
#### Build Tooling
127+
- Dynamically set `node-version-file` input. ([71090](https://github.com/WordPress/gutenberg/pull/71090))
128+
129+
130+
### Various
131+
132+
#### Icons
133+
- Deprecate moreHorizontalMobile. ([71172](https://github.com/WordPress/gutenberg/pull/71172))
134+
135+
#### Block Library
136+
- Add Accordions Block. ([64119](https://github.com/WordPress/gutenberg/pull/64119))
137+
138+
139+
## First-time contributors
140+
141+
The following PRs were merged by first-time contributors:
142+
143+
- @elazzabi: DataForm: Add `array` control. ([71136](https://github.com/WordPress/gutenberg/pull/71136))
144+
145+
146+
## Contributors
147+
148+
The following contributors merged PRs in this release:
149+
150+
@andrewserong @BogdanUngureanu @BugReportOnWeb @ciampo @desrosj @elazzabi @getdave @gigitux @im3dabasia @jasmussen @jffng @karthikeya-io @Mamaduka @mikachan @mikejolley @mirka @mrleemon @oandregal @p-jackson @priethor @R1shabh-Gupta @ramonjd @shimotmk @Sukhendu2002 @t-hamano @tellthemachines @USERSATOSHI @yogeshbhutkar @youknowriad
151+
152+
3153
= 21.4.0 =
4154

5155
## Changelog

docs/reference-guides/core-blocks.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,50 @@ This page lists the blocks included in the block-library package.
88

99
<!-- START TOKEN Autogenerated - DO NOT EDIT -->
1010

11-
## Accordion Header
11+
## Accordion
1212

13-
Accordion header. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion-header))
13+
Displays a group of accordion headers and associated expandable content. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion))
1414

15-
- **Name:** core/accordion-header
15+
- **Name:** core/accordion
1616
- **Experimental:** true
1717
- **Category:** design
18-
- **Parent:** core/accordion-item
19-
- **Supports:** anchor, border, color (background, gradient, text), interactivity, shadow, spacing (margin, padding), typography (fontSize, textAlign), ~~align~~
20-
- **Attributes:** iconPosition, level, levelOptions, openByDefault, showIcon, textAlignment, title
18+
- **Allowed Blocks:** core/accordion-content
19+
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradient, text), interactivity, layout, shadow, spacing (blockGap, margin, padding), ~~html~~
20+
- **Attributes:** allowedBlocks, autoclose, iconPosition, showIcon
2121

22-
## Accordion
22+
## Accordion Content
2323

24-
A single accordion that displays a header and expandable content. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion-item))
24+
Displays a section of content in an accordion, including a header and expandable content. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion-content))
2525

26-
- **Name:** core/accordion-item
26+
- **Name:** core/accordion-content
2727
- **Experimental:** true
2828
- **Category:** design
29-
- **Parent:** core/accordions
29+
- **Parent:** core/accordion
3030
- **Allowed Blocks:** core/accordion-header, core/accordion-panel
3131
- **Supports:** align (full, wide), color (background, gradient, text), interactivity, shadow, spacing (blockGap, margin)
3232
- **Attributes:** openByDefault
3333

34-
## Accordion Panel
34+
## Accordion Header
3535

36-
Accordion Panel ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion-panel))
36+
Displays an accordion header. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion-header))
3737

38-
- **Name:** core/accordion-panel
38+
- **Name:** core/accordion-header
3939
- **Experimental:** true
4040
- **Category:** design
41-
- **Parent:** core/accordion-item
42-
- **Supports:** border, color (background, gradient, text), interactivity, shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight)
43-
- **Attributes:** allowedBlocks, isSelected, openByDefault, templateLock
41+
- **Parent:** core/accordion-content
42+
- **Supports:** anchor, border, color (background, gradient, text), interactivity, shadow, spacing (margin, padding), typography (fontSize, textAlign), ~~align~~
43+
- **Attributes:** iconPosition, level, levelOptions, openByDefault, showIcon, textAlignment, title
4444

45-
## Accordions
45+
## Accordion Panel
4646

47-
A group of Accordion headers and associated expandable content. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordions))
47+
Displays an accordion panel. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/accordion-panel))
4848

49-
- **Name:** core/accordions
49+
- **Name:** core/accordion-panel
5050
- **Experimental:** true
5151
- **Category:** design
52-
- **Allowed Blocks:** core/accordion-item
53-
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradient, text), interactivity, layout, shadow, spacing (blockGap, margin, padding), ~~html~~
54-
- **Attributes:** allowedBlocks, autoclose, iconPosition, showIcon
52+
- **Parent:** core/accordion-content
53+
- **Supports:** border, color (background, gradient, text), interactivity, shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight)
54+
- **Attributes:** allowedBlocks, isSelected, openByDefault, templateLock
5555

5656
## Archives
5757

@@ -336,7 +336,7 @@ A form. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/blo
336336
- **Experimental:** true
337337
- **Category:** common
338338
- **Allowed Blocks:** core/paragraph, core/heading, core/form-input, core/form-submit-button, core/form-submission-notification, core/group, core/columns
339-
- **Supports:** anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~className~~
339+
- **Supports:** anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight)
340340
- **Attributes:** action, email, method, submissionMethod
341341

342342
## Input Field

docs/reference-guides/data/data-core-block-editor.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,8 +1869,9 @@ Action that updates attributes of multiple blocks with the specified client IDs.
18691869
_Parameters_
18701870

18711871
- _clientIds_ `string|string[]`: Block client IDs.
1872-
- _attributes_ `Object`: Block attributes to be merged. Should be keyed by clientIds if uniqueByBlock is true.
1873-
- _uniqueByBlock_ `boolean`: true if each block in clientIds array has a unique set of attributes
1872+
- _attributes_ `Object`: Block attributes to be merged. Should be keyed by clientIds if `options.uniqueByBlock` is true.
1873+
- _options_ `Object`: Updating options.
1874+
- _options.uniqueByBlock_ `[boolean]`: Whether each block in clientIds array has a unique set of attributes.
18741875

18751876
_Returns_
18761877

gutenberg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.
66
* Requires at least: 6.7
77
* Requires PHP: 7.2
8-
* Version: 21.4.0
8+
* Version: 21.5.0-rc.1
99
* Author: Gutenberg Team
1010
* Text Domain: gutenberg
1111
*

lib/blocks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ function gutenberg_reregister_core_block_types() {
4646
'embed',
4747
),
4848
'block_names' => array(
49-
'accordion-item.php' => 'core/accordion-item',
50-
'accordions.php' => 'core/accordions',
49+
'accordion-content.php' => 'core/accordion-content',
50+
'accordion.php' => 'core/accordion',
5151
'archives.php' => 'core/archives',
5252
'avatar.php' => 'core/avatar',
5353
'block.php' => 'core/block',
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
/**
3+
* Enqueues the assets required for the Command Palette.
4+
*/
5+
function gutenberg_enqueue_command_palette_assets() {
6+
if ( ! is_admin() ) {
7+
return;
8+
}
9+
10+
wp_enqueue_script( 'wp-commands' );
11+
wp_enqueue_style( 'wp-commands' );
12+
wp_enqueue_script( 'wp-core-commands' );
13+
wp_add_inline_script( 'wp-core-commands', 'wp.coreCommands.initializeCommandPalette();' );
14+
}
15+
16+
if ( has_filter( 'admin_enqueue_scripts', 'wp_enqueue_command_palette_assets' ) ) {
17+
remove_filter( 'admin_enqueue_scripts', 'wp_enqueue_command_palette_assets', 9 );
18+
}
19+
add_filter( 'admin_enqueue_scripts', 'gutenberg_enqueue_command_palette_assets', 9 );

lib/compat/wordpress-6.9/customizer-preview-custom-css.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function ( match, beforeComment, oldValue, afterComment ) {
4949
JS;
5050
wp_add_inline_script(
5151
'customize-preview',
52-
sprintf( '( %s )( %s )', $js_function, wp_json_encode( $setting_id ) )
52+
sprintf( '( %s )( %s )', $js_function, wp_json_encode( $setting_id, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) )
5353
);
5454
}
5555

lib/experimental/posts/load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function gutenberg_posts_dashboard() {
4444
// Preload server-registered block schemas.
4545
wp_add_inline_script(
4646
'wp-blocks',
47-
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
47+
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');'
4848
);
4949

5050
/** This action is documented in wp-admin/edit-form-blocks.php */
@@ -61,7 +61,7 @@ function gutenberg_posts_dashboard() {
6161
'wp.domReady( function() {
6262
wp.editSite.initializePostsDashboard( "gutenberg-posts-dashboard", %s );
6363
} );',
64-
wp_json_encode( $editor_settings )
64+
wp_json_encode( $editor_settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
6565
)
6666
);
6767
wp_enqueue_script( 'wp-edit-site' );

lib/load.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function gutenberg_is_experiment_enabled( $name ) {
8181

8282
// WordPress 6.9 compat.
8383
require __DIR__ . '/compat/wordpress-6.9/customizer-preview-custom-css.php';
84+
require __DIR__ . '/compat/wordpress-6.9/command-palette.php';
8485

8586
// Experimental features.
8687
require __DIR__ . '/experimental/block-editor-settings-mobile.php';

0 commit comments

Comments
 (0)