Skip to content

Commit

Permalink
Merge changes published in the Gutenberg plugin "release/19.3" branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gutenbergplugin committed Sep 19, 2024
1 parent c90d920 commit 35a83ad
Show file tree
Hide file tree
Showing 585 changed files with 13,846 additions and 6,141 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ module.exports = {
},
],
'no-restricted-syntax': [ 'error', ...restrictedSyntax ],
'jsdoc/check-tag-names': [
'error',
{
definedTags: [ 'jest-environment' ],
},
],
},
overrides: [
{
Expand Down Expand Up @@ -315,6 +321,7 @@ module.exports = {
...[
'BorderBoxControl',
'BorderControl',
'BoxControl',
'ComboboxControl',
'CustomSelectControl',
'DimensionControl',
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: Build Gutenberg Plugin Zip
on:
pull_request:
push:
branches: [trunk]
branches:
- trunk
- 'release/**'
- 'wp/**'
workflow_dispatch:
inputs:
version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
- uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c # v2.6.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: '{build/**/*.min.js,build/**/*.css}'
pattern: '{build/**/*.min.js,build/**/*.css,build-module/**/*.min.js}'
clean-script: 'distclean'
4 changes: 2 additions & 2 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Java
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
distribution: 'corretto'
java-version: '17'
Expand All @@ -47,7 +47,7 @@ jobs:
run: npm run native test:e2e:setup

- name: Gradle cache
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0

- name: AVD cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand Down
6 changes: 3 additions & 3 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@wordpress/stylelint-config/scss",
"extends": "@wordpress/stylelint-config/scss-stylistic",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": null,
Expand All @@ -21,7 +21,7 @@
}
],
"font-weight-notation": null,
"max-line-length": null,
"@stylistic/max-line-length": null,
"no-descending-specificity": null,
"property-disallowed-list": [
[ "order" ],
Expand All @@ -34,7 +34,7 @@
"value-keyword-case": null,
"scss/operator-no-unspaced": null,
"scss/selector-no-redundant-nesting-selector": null,
"scss/at-import-partial-extension": null,
"scss/load-partial-extension": null,
"scss/no-global-function-names": null,
"scss/comment-no-empty": null,
"scss/at-extend-no-missing-placeholder": null,
Expand Down
1 change: 1 addition & 0 deletions backport-changelog/6.7/7139.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/7139

* https://github.com/WordPress/gutenberg/pull/64504
* https://github.com/WordPress/gutenberg/pull/65280
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7298.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7298

* https://github.com/WordPress/gutenberg/pull/65099
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7314.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7314

* https://github.com/WordPress/gutenberg/pull/64167
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7336.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7336

* https://github.com/WordPress/gutenberg/pull/65071
18 changes: 4 additions & 14 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,16 @@ npm run build
php bin/generate-gutenberg-php.php > gutenberg.tmp.php
mv gutenberg.tmp.php gutenberg.php

build_files=$(
ls build/*/*.{js,js.map,css,asset.php} \
build/block-library/blocks/*.php \
build/block-library/blocks/*/block.json \
build/block-library/blocks/*/*.{js,js.map,css,asset.php} \
build/edit-widgets/blocks/*/block.json \
build/widgets/blocks/*.php \
build/widgets/blocks/*/block.json \
build/style-engine/*.php \
)


# Generate the plugin zip file.
status "Creating archive... 🎁"
zip -r gutenberg.zip \
zip --recurse-paths --no-dir-entries \
gutenberg.zip \
gutenberg.php \
lib \
packages/block-serialization-default-parser/*.php \
post-content.php \
$build_files \
build \
build-module \
readme.txt \
changelog.txt \
README.md
Expand Down
2 changes: 2 additions & 0 deletions bin/packages/get-babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports = ( environment = '', file ) => {
name: `WP_BUILD_${ environment.toUpperCase() }`,
},
};
// Add `/* wp:polyfill */` magic comment where needed.
callerOpts.caller.addPolyfillComments = true;
switch ( environment ) {
case 'main':
// To be merged as a presetEnv option.
Expand Down
640 changes: 640 additions & 0 deletions changelog.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/getting-started/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To complete this tutorial, you will need:
If you don't have one or more of these items, the [Block Development Environment](https://developer.wordpress.org/block-editor/getting-started/devenv/) documentation will help you get started. Come back here once you are all set up.

<div class="callout callout-info">
This tutorial uses <a href="https://developer.wordpress.org/block-editor/getting-started/devenv/get-started-with-wp-env/"><code>wp-env</code></a> to create a local WordPress development environment. However, feel free to use alternate local development tools if you already have one that you prefer.
This tutorial uses <a href="https://developer.wordpress.org/block-editor/getting-started/devenv/get-started-with-wp-env/"><code>wp-env</code></a> to create a local WordPress development environment. However, feel free to use any development environment that meets the abovementioned prerequisites.
</div>

## Scaffolding the block
Expand Down Expand Up @@ -250,7 +250,7 @@ At this point, the block's icon and description are correct, and block supports

### Updating edit.js

The [`edit.js`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/file-structure-of-a-block/#edit-js) file controls how the block functions and appears in the Editor. Right now, the user sees the message " Copyright Date Block – hello from the editor!". Let's change that.
The [`edit.js`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/file-structure-of-a-block/#edit-js) file controls how the block functions and appears in the Editor. Right now, the user sees the message "Copyright Date Block – hello from the editor!". Let's change that.

Open the file and see that the `Edit()` function returns a paragraph tag with the default message.

Expand Down Expand Up @@ -647,10 +647,10 @@ While the Editor looks great, the starting year functionality has yet to be adde
Start by adding a variable called `$display_date` and replicate what you did in the `Edit()` function above.
This variable should display the value of the `startingYear` attribute and the `$current_year` variable separated by an em dash, or just the `$current_year` is the `showStartingYear` attribute is `false`.
This variable should display the value of the `startingYear` attribute and the `$current_year` variable separated by an em dash, or just the `$current_year` if the `showStartingYear` attribute is `false`.
<div class="callout callout-tip">
<p>Three variables are exposed in the <code>render.php</code>, which you can use to customize the block's output:</p>
<p>Three variables are exposed in <code>render.php</code>, which you can use to customize the block's output:</p>
<ul>
<li><code>$attributes</code> (array): The block attributes.</li>
<li><code>$content</code> (string): The block default content.</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-api-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This document lists the changes made between the different API versions.

## Version 3 (>= WordPress 6.3)
- The post editor will be iframed if all registered blocks have a Block API version 3 or higher and the editor has no classic meta boxes below the blocks. Adding version 3 support means that the block should work inside an iframe, though the block may still be rendered outside the iframe if not all blocks support version 3.
- The post editor will be iframed if all registered blocks have a Block API version 3 or higher. Adding version 3 support means that the block should work inside an iframe, though the block may still be rendered outside the iframe if not all blocks support version 3.

## Version 2 (>= WordPress 5.6)

Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function Edit( props ) {
return (
<div>
<TextControl
label={ __( 'Record ID:' ) }
label={ __( 'Record ID' ) }
value={ recordId }
onChange={ ( val ) =>
setAttributes( { recordId: Number( val ) } )
Expand Down
8 changes: 4 additions & 4 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ A calendar of your site’s posts. ([Source](https://github.com/WordPress/gutenb
- **Supports:** align, color (background, link, text), interactivity (clientNavigation), typography (fontSize, lineHeight)
- **Attributes:** month, year

## Categories List
## Terms List

Display a list of all categories. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/categories))
Display a list of all terms of a given taxonomy. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/categories))

- **Name:** core/categories
- **Category:** widgets
- **Supports:** align, interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** displayAsDropdown, label, showEmpty, showHierarchy, showLabel, showOnlyTopLevel, showPostCounts
- **Attributes:** displayAsDropdown, label, showEmpty, showHierarchy, showLabel, showOnlyTopLevel, showPostCounts, taxonomy

## Code

Expand Down Expand Up @@ -493,7 +493,7 @@ Add a submenu to your navigation. ([Source](https://github.com/WordPress/gutenbe
- **Name:** core/navigation-submenu
- **Category:** design
- **Parent:** core/navigation
- **Supports:** interactivity (clientNavigation), ~~html~~, ~~reusable~~
- **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Attributes:** description, id, isTopLevelItem, kind, label, opensInNewTab, rel, title, type, url

## Page Break
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/slotfills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import { __ } from '@wordpress/i18n';
*/
const SiteEditorDocumentSettingPanel = () => {
// Retrieve information about the current post type.
const { isViewable } = useSelect( ( select ) => {
const isViewable = useSelect( ( select ) => {
const postTypeName = select( editorStore ).getCurrentPostType();
const postTypeObject = select( coreStore ).getPostType( postTypeName );

Expand Down
8 changes: 5 additions & 3 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.
* Requires at least: 6.5
* Requires PHP: 7.2
* Version: 19.2.0-rc.1
* Version: 19.3.0-rc.1
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand All @@ -15,6 +15,8 @@
### BEGIN AUTO-GENERATED DEFINES
defined( 'GUTENBERG_DEVELOPMENT_MODE' ) or define( 'GUTENBERG_DEVELOPMENT_MODE', true );
### END AUTO-GENERATED DEFINES
defined( 'GUTENBERG_MINIMUM_WP_VERSION' ) or define( 'GUTENBERG_MINIMUM_WP_VERSION', '6.5' );


gutenberg_pre_init();

Expand All @@ -26,7 +28,7 @@
function gutenberg_wordpress_version_notice() {
echo '<div class="error"><p>';
/* translators: %s: Minimum required version */
printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.9' );
printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), GUTENBERG_MINIMUM_WP_VERSION );
echo '</p></div>';

deactivate_plugins( array( 'gutenberg/gutenberg.php' ) );
Expand Down Expand Up @@ -67,7 +69,7 @@ function gutenberg_pre_init() {
// Compare against major release versions (X.Y) rather than minor (X.Y.Z)
// unless a minor release is the actual minimum requirement. WordPress reports
// X.Y for its major releases.
if ( version_compare( $version, '5.9', '<' ) ) {
if ( version_compare( $version, GUTENBERG_MINIMUM_WP_VERSION, '<' ) ) {
add_action( 'admin_notices', 'gutenberg_wordpress_version_notice' );
return;
}
Expand Down
Loading

1 comment on commit 35a83ad

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 35a83ad.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10933368415
📝 Reported issues:

Please sign in to comment.