diff --git a/.eslintrc.js b/.eslintrc.js index fd7e9183781eaf..8a44b5ef74a1e6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,6 +51,11 @@ const restrictedImports = [ message: 'Please use Reakit API through `@wordpress/components` instead.', }, + { + name: '@ariakit/react', + message: + 'Please use Ariakit API through `@wordpress/components` instead.', + }, { name: 'redux', importNames: [ 'combineReducers' ], diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 6e5072a91b0018..f6a641a5af9bbe 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,9 @@ f63053cace3c02e284f00918e1854284c85b9132 # Prettier upgrade to 2.6.2. 33d84b036592a5bf31af05b7710f3b2b14163dc4 + +# Prettier upgrade to 2.8.5. +c56e8a1910ed74f405b74bbb12fe81dea974e5c3 + +# Prettier upgrade to 3.0.3. +0bee15148fe4330c20cf372cb46a33693e45cb5f diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 68326eaa23cae1..1f944fa38b4840 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -22,6 +22,7 @@ /packages/block-library/src/comment-template @michalczaplinski /packages/block-library/src/comments @michalczaplinski /packages/block-library/src/table-of-contents @ZebulanStanphill +/packages/block-library/src/image @artemiomorales @michalczaplinski # Duotone /lib/block-supports/duotone.php @ajlende diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index 5c06393ec3c01f..0921d1f9fc79c1 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -69,7 +69,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: token: ${{ secrets.GUTENBERG_TOKEN }} show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -165,7 +165,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: ref: ${{ needs.bump-version.outputs.release_branch || github.ref }} show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -221,7 +221,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 2 ref: ${{ needs.bump-version.outputs.release_branch }} @@ -310,14 +310,14 @@ jobs: if: ${{ endsWith( needs.bump-version.outputs.new_version, '-rc.1' ) }} steps: - name: Checkout (for CLI) - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: path: main ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Checkout (for publishing) - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: path: publish # Later, we switch this branch in the script that publishes packages. diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index f5a28f78590970..d6a9ca83bf3603 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 1 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/check-components-changelog.yml b/.github/workflows/check-components-changelog.yml index 5271b3883c1416..5ab89671c1cf60 100644 --- a/.github/workflows/check-components-changelog.yml +++ b/.github/workflows/check-components-changelog.yml @@ -20,7 +20,7 @@ jobs: - name: 'Get PR commit count' run: echo "PR_COMMIT_COUNT=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index f3c9f64b970728..d46a3077ee7c90 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -24,7 +24,7 @@ jobs: os: [macos-latest, ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/end2end-test.yml b/.github/workflows/end2end-test.yml index 61cb39612fa55d..9bf85a1ac53638 100644 --- a/.github/workflows/end2end-test.yml +++ b/.github/workflows/end2end-test.yml @@ -27,7 +27,7 @@ jobs: totalParts: [3] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -73,7 +73,7 @@ jobs: totalParts: [4] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -119,7 +119,7 @@ jobs: steps: # Checkout defaults to using the branch which triggered the event, which # isn't necessarily `trunk` (e.g. in the case of a merge). - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/enforce-pr-labels.yml b/.github/workflows/enforce-pr-labels.yml index 6dc9cb6b17add0..320ef1375029c3 100644 --- a/.github/workflows/enforce-pr-labels.yml +++ b/.github/workflows/enforce-pr-labels.yml @@ -12,7 +12,7 @@ jobs: with: mode: exactly count: 1 - labels: '[Type] Accessibility (a11y), [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core' + labels: '[Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core' add_comment: true message: "**Warning: Type of PR label error**\n\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}.\n\nRead more about [Type labels in Gutenberg](https://github.com/WordPress/gutenberg/labels?q=type)." exit_type: failure diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 5e417c27bc82f7..b4012ffc19fd45 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -6,7 +6,7 @@ jobs: name: 'Validation' runs-on: ubuntu-latest steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 7813f04874bc2f..875ed28c743aa7 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -32,7 +32,7 @@ jobs: WP_ARTIFACTS_PATH: ${{ github.workspace }}/artifacts steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/php-changes-detection.yml b/.github/workflows/php-changes-detection.yml index 189639c3f47648..2078bb4a1ddfeb 100644 --- a/.github/workflows/php-changes-detection.yml +++ b/.github/workflows/php-changes-detection.yml @@ -10,14 +10,14 @@ jobs: if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} steps: - name: Check out code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Get changed PHP files id: changed-files-php - uses: tj-actions/changed-files@48566bbcc22ceb7c5809ebdd27377309f2c3de8c # v39 + uses: tj-actions/changed-files@8238a4103220c636f2dad328ead8a7c8dbe316a3 # v39.2.0 with: files: | *.{php} diff --git a/.github/workflows/publish-npm-packages.yml b/.github/workflows/publish-npm-packages.yml index 7c2e9412cc1def..3698441458ce0c 100644 --- a/.github/workflows/publish-npm-packages.yml +++ b/.github/workflows/publish-npm-packages.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout (for CLI) if: ${{ github.event.inputs.release_type != 'wp' }} - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: path: cli ref: trunk @@ -39,7 +39,7 @@ jobs: - name: Checkout (for publishing) if: ${{ github.event.inputs.release_type != 'wp' }} - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: path: publish # Later, we switch this branch in the script that publishes packages. @@ -49,7 +49,7 @@ jobs: - name: Checkout (for publishing WP major version) if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }} - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: path: publish ref: wp/${{ github.event.inputs.wp_version }} diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index a34df5282d6d8c..38cf4c66a503f2 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -15,7 +15,7 @@ jobs: steps: # Checkout defaults to using the branch which triggered the event, which # isn't necessarily `trunk` (e.g. in the case of a merge). - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index 1d4e010558a6e1..8a51df3faade2c 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -23,12 +23,12 @@ jobs: steps: - name: checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Java - uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: distribution: 'corretto' java-version: '17' @@ -37,7 +37,7 @@ jobs: uses: ./.github/setup-node - name: Gradle cache - uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc # v2.8.0 + uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1 - name: AVD cache uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 6a03547966fe10..60eb439d1e1c28 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -23,7 +23,7 @@ jobs: native-test-name: [gutenberg-editor-rendering] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 87e936757814ee..7fe07bb2ae7bfd 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -22,7 +22,7 @@ jobs: if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/storybook-pages.yml b/.github/workflows/storybook-pages.yml index d8932b4a4e277b..32683fac2178c3 100644 --- a/.github/workflows/storybook-pages.yml +++ b/.github/workflows/storybook-pages.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index fd021b1b338154..7ce44a6931d9e2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -31,7 +31,7 @@ jobs: node: ['16'] steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -111,7 +111,7 @@ jobs: WP_ENV_CORE: ${{ matrix.wordpress == '' && 'WordPress/WordPress' || format( 'https://wordpress.org/wordpress-{0}.zip', matrix.wordpress ) }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -126,7 +126,7 @@ jobs: # dependency versions are installed and cached. ## - name: Set up PHP - uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f # v2.25.5 + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0 with: php-version: '${{ matrix.php }}' ini-file: development @@ -221,12 +221,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Set up PHP - uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f # v2.25.5 + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0 with: php-version: '7.4' coverage: none @@ -290,7 +290,7 @@ jobs: if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/upload-release-to-plugin-repo.yml b/.github/workflows/upload-release-to-plugin-repo.yml index d7fdb9b3fe3796..2b5ca0e5a85935 100644 --- a/.github/workflows/upload-release-to-plugin-repo.yml +++ b/.github/workflows/upload-release-to-plugin-repo.yml @@ -96,7 +96,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: ref: ${{ matrix.branch }} token: ${{ secrets.GUTENBERG_TOKEN }} diff --git a/bin/cherry-pick.mjs b/bin/cherry-pick.mjs index 91ded84489e68e..0c6a6c613638ba 100644 --- a/bin/cherry-pick.mjs +++ b/bin/cherry-pick.mjs @@ -9,7 +9,7 @@ import { spawnSync } from 'node:child_process'; const LABEL = process.argv[ 2 ] || 'Backport to WP Beta/RC'; const BRANCH = getCurrentBranch(); const GITHUB_CLI_AVAILABLE = spawnSync( 'gh', [ 'auth', 'status' ] ) - ?.stderr?.toString() + ?.stdout?.toString() .includes( '✓ Logged in to github.com as' ); const AUTO_PROPAGATE_RESULTS_TO_GITHUB = GITHUB_CLI_AVAILABLE; diff --git a/bin/plugin/commands/changelog.js b/bin/plugin/commands/changelog.js index 59d77c3fe9610f..4d67e271ecb649 100644 --- a/bin/plugin/commands/changelog.js +++ b/bin/plugin/commands/changelog.js @@ -75,7 +75,7 @@ const LABEL_TYPE_MAPPING = { '[Type] Automated Testing': 'Tools', '[Package] Dependency Extraction Webpack Plugin': 'Tools', '[Type] Code Quality': 'Code Quality', - '[Type] Accessibility (a11y)': 'Accessibility', + '[Focus] Accessibility (a11y)': 'Accessibility', '[Type] Performance': 'Performance', '[Type] Security': 'Security', '[Feature] Navigation Screen': 'Experiments', diff --git a/bin/plugin/commands/test/fixtures/pull-requests.json b/bin/plugin/commands/test/fixtures/pull-requests.json index d114d8b9149118..e1d9df8ef0800b 100644 --- a/bin/plugin/commands/test/fixtures/pull-requests.json +++ b/bin/plugin/commands/test/fixtures/pull-requests.json @@ -5750,7 +5750,7 @@ "id": 546517042, "node_id": "MDU6TGFiZWw1NDY1MTcwNDI=", "url": "https://api.github.com/repos/WordPress/gutenberg/labels/Accessibility%20(a11y)", - "name": "[Type] Accessibility (a11y)", + "name": "[Focus] Accessibility (a11y)", "color": "655104", "default": false, "description": "Changes that impact accessibility and need corresponding review (e.g. markup changes)." @@ -12552,7 +12552,7 @@ "id": 546517042, "node_id": "MDU6TGFiZWw1NDY1MTcwNDI=", "url": "https://api.github.com/repos/WordPress/gutenberg/labels/Accessibility%20(a11y)", - "name": "[Type] Accessibility (a11y)", + "name": "[Focus] Accessibility (a11y)", "color": "655104", "default": false, "description": "Changes that impact accessibility and need corresponding review (e.g. markup changes)." diff --git a/changelog.txt b/changelog.txt index 6d47c988544586..25b25bfa296f36 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,832 @@ == Changelog == += 16.8.0-rc.1 = + +## Changelog + +### Features + +#### Block Editor +- Adds 'nofollow' setting to Button block. ([54110](https://github.com/WordPress/gutenberg/pull/54110)) + +#### Site Editor +- Add 'Show template' toggle when editing pages. ([52674](https://github.com/WordPress/gutenberg/pull/52674)) + + +### Enhancements + +- Update pattern import menu item. ([54782](https://github.com/WordPress/gutenberg/pull/54782)) + +#### Components +- Adding label/description to `BlockEditor/DuotoneControl`. ([54473](https://github.com/WordPress/gutenberg/pull/54473)) +- Deprecating `isPressed` in `Button` component. ([54740](https://github.com/WordPress/gutenberg/pull/54740)) +- Follow ariakit best practices. ([54696](https://github.com/WordPress/gutenberg/pull/54696)) +- InputControl-based components: Add opt-in prop for next 40px default size. ([53819](https://github.com/WordPress/gutenberg/pull/53819)) +- Modal: Add `contentWidth` prop to support a selection of preset modal sizes. ([54471](https://github.com/WordPress/gutenberg/pull/54471)) +- Remove unused components from `ui/`. ([54573](https://github.com/WordPress/gutenberg/pull/54573)) +- Update ariakit to 0.3.3. ([54818](https://github.com/WordPress/gutenberg/pull/54818)) +- Update compact search control metrics. ([54663](https://github.com/WordPress/gutenberg/pull/54663)) +- Wrapped `TextareaControl` in a `forwardRef` call. ([54975](https://github.com/WordPress/gutenberg/pull/54975)) + +#### Block Library +- Add a brief description to the Footnotes block. ([54613](https://github.com/WordPress/gutenberg/pull/54613)) +- Footnotes: Use core’s meta revisioning if available. ([52988](https://github.com/WordPress/gutenberg/pull/52988)) +- Login/out: Add spacing support. ([45147](https://github.com/WordPress/gutenberg/pull/45147)) +- Query view.js: Code quality. ([54982](https://github.com/WordPress/gutenberg/pull/54982)) +- Set custom color when applying initial background image. ([54054](https://github.com/WordPress/gutenberg/pull/54054)) +- Use `wp_get_inline_script_tag()` in `build_dropdown_script_block_core_categories()`. ([54637](https://github.com/WordPress/gutenberg/pull/54637)) + +#### Block Editor +- Default suggested links to pages. ([54622](https://github.com/WordPress/gutenberg/pull/54622)) +- Remove base URL from link control search results. ([54553](https://github.com/WordPress/gutenberg/pull/54553)) +- Simplify `BlockHTMLConvertButton`. ([54972](https://github.com/WordPress/gutenberg/pull/54972)) +- Update strings in blocks 'RenameModal' component. ([54887](https://github.com/WordPress/gutenberg/pull/54887)) + +#### Post Editor +- Edit Post: Use hooks instead of HoCs in 'PostStatus' components. ([54951](https://github.com/WordPress/gutenberg/pull/54951)) +- Editor: Use hooks instead of HoCs in 'PostSticky' components. ([54949](https://github.com/WordPress/gutenberg/pull/54949)) +- Editor: Use hooks instead of HoCs in 'PostSwitchToDraftButton'. ([54695](https://github.com/WordPress/gutenberg/pull/54695)) +- Show confirmation dialog when moving a post to the trash. ([50219](https://github.com/WordPress/gutenberg/pull/50219)) + +#### Site Editor +- Add template replace flow to template inspector. ([54609](https://github.com/WordPress/gutenberg/pull/54609)) +- [Site Editor]: Update copy of using the default template in a page. ([54728](https://github.com/WordPress/gutenberg/pull/54728)) + +#### Patterns +- Remove category description in inserter panel. ([54894](https://github.com/WordPress/gutenberg/pull/54894)) + +#### Typography +- Font Library: Refactor endpoint permissions. ([54829](https://github.com/WordPress/gutenberg/pull/54829)) + + +### Bug Fixes + +- Fix the ShortcutProvider usage. ([54851](https://github.com/WordPress/gutenberg/pull/54851)) +- Fix warning when a template calls a template area twice. ([54861](https://github.com/WordPress/gutenberg/pull/54861)) +- Revert "Fix warning when a template calls a template area twice". ([54926](https://github.com/WordPress/gutenberg/pull/54926)) + +#### Block Library +- All Nav block items to break long titles. ([54866](https://github.com/WordPress/gutenberg/pull/54866)) +- Fallback to Twitter provider when embedding X URLs. ([54876](https://github.com/WordPress/gutenberg/pull/54876)) +- Fix Deleted Navigation Menu warning string. ([55033](https://github.com/WordPress/gutenberg/pull/55033)) +- Fix Search Block not updating in Nav block. ([54823](https://github.com/WordPress/gutenberg/pull/54823)) +- Fix left and right aligmnent in children of Post Template. ([54997](https://github.com/WordPress/gutenberg/pull/54997)) +- Fix output of Navigation block classnames in the editor. ([54992](https://github.com/WordPress/gutenberg/pull/54992)) +- Fix overwriting of published post meta when previewing footnote changes. ([54339](https://github.com/WordPress/gutenberg/pull/54339)) +- Image: Ensure Expand on Click toggle is shown if block-level lightbox setting exists. ([54878](https://github.com/WordPress/gutenberg/pull/54878)) +- Image: Fix layout shift when lightbox is opened and closed. ([53026](https://github.com/WordPress/gutenberg/pull/53026)) +- Media & Text: Fix React warning. ([55038](https://github.com/WordPress/gutenberg/pull/55038)) +- Search block: Allow space for input field only when form expanded. ([54846](https://github.com/WordPress/gutenberg/pull/54846)) +- Search block: Update alignment and icon button width. ([54773](https://github.com/WordPress/gutenberg/pull/54773)) + +#### Site Editor +- Avoid same key warnings in template parts area listings. ([54863](https://github.com/WordPress/gutenberg/pull/54863)) +- Avoid stale navigation block values when parsing entity record. ([54996](https://github.com/WordPress/gutenberg/pull/54996)) +- Don't display the navigation section in template parts details when a menu is missing. ([54993](https://github.com/WordPress/gutenberg/pull/54993)) +- Fix ToolSelector popover variant. ([54840](https://github.com/WordPress/gutenberg/pull/54840)) +- Reset 'Show template' toggle when leaving edit mode. ([54679](https://github.com/WordPress/gutenberg/pull/54679)) +- remove `overflow: Hidden` from the entity title in the site editor sidebar. ([54769](https://github.com/WordPress/gutenberg/pull/54769)) + +#### Components +- FormTokenField: Add `box-sizing` reset style and reset default padding. ([54734](https://github.com/WordPress/gutenberg/pull/54734)) +- Popover: Fix the styles for components that use emotion within popovers. ([54912](https://github.com/WordPress/gutenberg/pull/54912)) +- Remove hover style for secondary Button when aria-disabled is set. ([54978](https://github.com/WordPress/gutenberg/pull/54978)) +- Reverting addition of `aria-selected` style hook in `Button`. ([54931](https://github.com/WordPress/gutenberg/pull/54931)) +- `SlotFill`: Pass `Component` instance to unregisterSlot. ([54765](https://github.com/WordPress/gutenberg/pull/54765)) + +#### Block Editor +- Avoid double-wrapping selectors when transforming the styles. ([54981](https://github.com/WordPress/gutenberg/pull/54981)) +- [Inserter]: Fix reset of registered media categories. ([55012](https://github.com/WordPress/gutenberg/pull/55012)) + +#### Typography +- Font Library: Changed the OTF mime type expected value to be what PHP returns. ([54886](https://github.com/WordPress/gutenberg/pull/54886)) +- Font Library: Move font uploads to a new tab. ([54655](https://github.com/WordPress/gutenberg/pull/54655)) + +#### Global Styles +- Block custom CSS: Fix incorrect CSS when multiple root selectors. ([53602](https://github.com/WordPress/gutenberg/pull/53602)) +- Image: Ensure `false` values are preserved in memory when defined in `theme.json`. ([54639](https://github.com/WordPress/gutenberg/pull/54639)) + +#### List View +- Fix performance issue when selecting all blocks. ([54900](https://github.com/WordPress/gutenberg/pull/54900)) + +#### Colors +- Format Library: Try to fix highlight popover jumping. ([54736](https://github.com/WordPress/gutenberg/pull/54736)) + +#### Interactivity API +- Image: Fix duotone not being applied to lightbox image. ([54670](https://github.com/WordPress/gutenberg/pull/54670)) + + +### Accessibility + +#### Block Library +- Footnotes: Add aria-label to return links. ([54843](https://github.com/WordPress/gutenberg/pull/54843)) +- Table of contents block accessibility improvements. ([54322](https://github.com/WordPress/gutenberg/pull/54322)) + +#### Components +- HTML block: Fix accessibility issues on back-end. ([54408](https://github.com/WordPress/gutenberg/pull/54408)) +- `Modal`: Accessibly hide/show outer modal when nested. ([54743](https://github.com/WordPress/gutenberg/pull/54743)) + +#### Patterns +- Use list role instead of listbox in patterns list. ([54884](https://github.com/WordPress/gutenberg/pull/54884)) + +#### Post Editor +- Editor: Always render the 'Switch to Draft' button to avoid focus loss. ([54722](https://github.com/WordPress/gutenberg/pull/54722)) + +#### Block Editor +- Block Switcher: Use a different label for multi-selection. ([54692](https://github.com/WordPress/gutenberg/pull/54692)) + + +### Performance + +- Tests: Support the Site Editor's legacy spinner. ([54784](https://github.com/WordPress/gutenberg/pull/54784)) +- Use instanceOf over property_exists. ([54835](https://github.com/WordPress/gutenberg/pull/54835)) + +#### Block Editor +- Subscribe only to block editor store in `useBlockSync`. ([55041](https://github.com/WordPress/gutenberg/pull/55041)) + + +### Experiments + +#### Site Editor +- al]: First version of pages list in site editor. ([54966](https://github.com/WordPress/gutenberg/pull/54966)) + +#### Block Editor +- Expose `getDuotoneFilter()` as private API. ([54905](https://github.com/WordPress/gutenberg/pull/54905)) + + +### Documentation + +- Add a documentation page about the block editor settings. ([54870](https://github.com/WordPress/gutenberg/pull/54870)) +- Add a page about the format library to the platform documentation site. ([55037](https://github.com/WordPress/gutenberg/pull/55037)) +- Docs: Add a callout to the `wp-now` documentation to mention it's still experimental. ([55044](https://github.com/WordPress/gutenberg/pull/55044)) +- Docs: Remove outdated info. ([54707](https://github.com/WordPress/gutenberg/pull/54707)) +- Docs: Remove the Full Site Editing doc. ([54516](https://github.com/WordPress/gutenberg/pull/54516)) +- Docs: Rename Block Hooks handbook page to Block Filters. ([54862](https://github.com/WordPress/gutenberg/pull/54862)) +- Document the current state of the Real-Time collaboration experiment. ([54932](https://github.com/WordPress/gutenberg/pull/54932)) +- Fix a broken MD link in callout. ([54772](https://github.com/WordPress/gutenberg/pull/54772)) +- Platform Docs: Add a documentation page explaining how to use the block library. ([54967](https://github.com/WordPress/gutenberg/pull/54967)) +- Update the documentation of the block editor and replace @wordpress/element with react. ([54908](https://github.com/WordPress/gutenberg/pull/54908)) +- Update versions in WP for 6.4. ([54890](https://github.com/WordPress/gutenberg/pull/54890)) + + +### Code Quality + +- Add a unit test for the "ValidBlockLibraryFunctionNameSniff" sniff. ([53928](https://github.com/WordPress/gutenberg/pull/53928)) +- Move dependencies to the right place. ([54597](https://github.com/WordPress/gutenberg/pull/54597)) +- Move mime-type collection generation to a function that can be tested…. ([54844](https://github.com/WordPress/gutenberg/pull/54844)) +- Post Title block should use esc_url(). ([53981](https://github.com/WordPress/gutenberg/pull/53981)) +- Rich text: Use getPasteEventData. ([55048](https://github.com/WordPress/gutenberg/pull/55048)) +- Writing flow: Absorb clipboard handler. ([55006](https://github.com/WordPress/gutenberg/pull/55006)) + +#### Block Library +- Footnotes: Avoid regexes in entity provider. ([54505](https://github.com/WordPress/gutenberg/pull/54505)) +- Image Block: Fix browser console error when clicking "Expand on Click". ([54938](https://github.com/WordPress/gutenberg/pull/54938)) +- Removed unwanted space from the string. ([54654](https://github.com/WordPress/gutenberg/pull/54654)) +- Update CODEOWNERS for `core/image` block. ([54793](https://github.com/WordPress/gutenberg/pull/54793)) + +#### Patterns +- Add a new spec for for adding an unsynced pattern. ([54892](https://github.com/WordPress/gutenberg/pull/54892)) +- Add end-to-end tests for filtering and searching patterns. ([54906](https://github.com/WordPress/gutenberg/pull/54906)) +- Add new end-to-end test for creating a pattern. ([54855](https://github.com/WordPress/gutenberg/pull/54855)) +- Include pattern category in main end-to-end critical path test. ([54923](https://github.com/WordPress/gutenberg/pull/54923)) + +#### Components +- Consolidate utils to remove `ui/`. ([54922](https://github.com/WordPress/gutenberg/pull/54922)) +- Move `ContextSystemProvider` out of `/ui`. ([54847](https://github.com/WordPress/gutenberg/pull/54847)) +- SlotFill: Migrate to Typescript. ([51350](https://github.com/WordPress/gutenberg/pull/51350)) +- Tidying `CircularOptionPicker.Option`. ([54903](https://github.com/WordPress/gutenberg/pull/54903)) + +#### Typography +- Font Library: Syntax refactor repace strpos with str_contains. ([54832](https://github.com/WordPress/gutenberg/pull/54832)) +- Font Library: Use snake_case instead of camelCase on fontFamilies endpoint param. ([54977](https://github.com/WordPress/gutenberg/pull/54977)) + +#### Block Editor +- Rich text: Avoid shortcode logic, adjust paste handler instead. ([55052](https://github.com/WordPress/gutenberg/pull/55052)) + +#### Plugin +- Remove legacy logic for '__unstableResolvedAssets' setting. ([54812](https://github.com/WordPress/gutenberg/pull/54812)) + +#### Data Layer +- createResolversCacheMiddleware: Remove dependency on core/data store. ([54733](https://github.com/WordPress/gutenberg/pull/54733)) + +#### Site Editor +- Use constants rather than hard coded template strings (round 3). ([54705](https://github.com/WordPress/gutenberg/pull/54705)) + + +### Tools + +- Label enforcer workflow: Make accessibility a focus instead of a type. ([54941](https://github.com/WordPress/gutenberg/pull/54941)) +- Scripts: Update webpack and related dependencies to the latest version. ([54657](https://github.com/WordPress/gutenberg/pull/54657)) +- Update changelog automation and test fixtures to match the last a11y label renaming. ([54974](https://github.com/WordPress/gutenberg/pull/54974)) + +#### Testing +- Don’t use TypeScript files in scripts package. ([54856](https://github.com/WordPress/gutenberg/pull/54856)) +- ESLint: Update eslint-plugin-testing-library to v6. ([54910](https://github.com/WordPress/gutenberg/pull/54910)) +- Fix end-to-end test: ”WP Editor Meta Boxes > Should save the changes”. ([51884](https://github.com/WordPress/gutenberg/pull/51884)) +- Font Library: Avoid deprected error in test. ([54802](https://github.com/WordPress/gutenberg/pull/54802)) +- Make `editor.getBlocks` to return only testing-related properties. ([54901](https://github.com/WordPress/gutenberg/pull/54901)) +- Migrate 'Global styles sidebar' test to Playwright. ([55045](https://github.com/WordPress/gutenberg/pull/55045)) +- Migrate 'iframed block editor settings styles' tests to Playwright. ([55014](https://github.com/WordPress/gutenberg/pull/55014)) +- Migrate 'iframed inline styles' tests to Playwright. ([55009](https://github.com/WordPress/gutenberg/pull/55009)) +- Migrate 'iframed masonry block' tests to Playwright. ([55016](https://github.com/WordPress/gutenberg/pull/55016)) +- Migrate 'iframed multiple block stylesheets' tests to Playwright. ([55003](https://github.com/WordPress/gutenberg/pull/55003)) +- Migrate keyboard-navigable-blocks end-to-end tests from puppeteer to playwright. ([54944](https://github.com/WordPress/gutenberg/pull/54944)) +- Scripts: Properly use CommonJS for default Playwright configuration. ([54988](https://github.com/WordPress/gutenberg/pull/54988)) +- Try fixing the flaky 'Toolbar roving tabindex' end-to-end test. ([54785](https://github.com/WordPress/gutenberg/pull/54785)) +- end-to-end Tests: Revert temporary fixes. ([54865](https://github.com/WordPress/gutenberg/pull/54865)) +- end-to-end Utils: Allow overriding username/password. ([53267](https://github.com/WordPress/gutenberg/pull/53267)) + +#### Build Tooling +- Add some @types packages as proper dependencies. ([50231](https://github.com/WordPress/gutenberg/pull/50231)) +- Update the default JSX pragma to React instead of @wordpress/element. ([54494](https://github.com/WordPress/gutenberg/pull/54494)) +- Upgrade wp-prettier to v3.0.3 (final). ([54775](https://github.com/WordPress/gutenberg/pull/54775)) + + +### Security + +#### Data Layer +- Replace turbo-combine-reducers with combineReducers from Redux. ([54606](https://github.com/WordPress/gutenberg/pull/54606)) + + +### Various + +- (chore) Revert the 16.7 RC2 release in order to release it again due to wrong changelog. ([54744](https://github.com/WordPress/gutenberg/pull/54744)) + +#### Design Tools +- Background image block support: Add tests, adjust injection logic slightly. ([54489](https://github.com/WordPress/gutenberg/pull/54489)) +- Background support: Backport fix for undefined array key. ([54850](https://github.com/WordPress/gutenberg/pull/54850)) + +#### Typography +- Revert "Font Library: Avoid rendering font library ui outisde gutenberg plugin". ([54947](https://github.com/WordPress/gutenberg/pull/54947)) + +#### Commands +- Make the reset styles command consistent. ([54841](https://github.com/WordPress/gutenberg/pull/54841)) + +#### Patterns +- Use "Not synced" in place of "Standard" nomenclature for patterns. ([54839](https://github.com/WordPress/gutenberg/pull/54839)) + +#### Block Editor +- Simplify BlockPatternsSyncFilter with clearer labels and additional context. ([54838](https://github.com/WordPress/gutenberg/pull/54838)) + +#### Site Editor +- Use consistent capitalization for template parts in Site Editor constants. ([54709](https://github.com/WordPress/gutenberg/pull/54709)) + + +## First time contributors + +The following PRs were merged by first time contributors: + +- @leemyongpakvn: Fix a broken MD link in callout. ([54772](https://github.com/WordPress/gutenberg/pull/54772)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @adamsilverstein @alexstine @andrewhayward @andrewserong @annezazu @anton-vlasenko @artemiomorales @aurooba @bangank36 @brookewp @c4rl0sbr4v0 @carolinan @chad1008 @ciampo @dcalhoun @derekblank @draganescu @ellatrix @fluiddot @fullofcaffeine @geriux @getdave @glendaviesnz @gziolo @jameskoster @jeryj @jsnajdr @juhi123 @kevin940726 @leemyongpakvn @madhusudhand @MaggieCabrera @Mamaduka @matiasbenedetto @michalczaplinski @mirka @mtias @mujuonly @ndiego @noahtallen @noisysocks @ntsekouras @oandregal @ockham @pbking @priethor @ramonjd @richtabor @scruffian @SiobhyB @spacedmonkey @stokesman @swissspidy @t-hamano @tellthemachines @tellyworth @them-es @torounit @tyxla @westonruter @WunderBart @youknowriad + + += 16.7.0 = + +## Changelog + +### Features + +#### Block Library +- Social Links: Add X. ([54092](https://github.com/WordPress/gutenberg/pull/54092)) + +#### Typography +Font Library: +- Add mime type validation for font uploads. ([53986](https://github.com/WordPress/gutenberg/pull/53986)) +- Font Collection backend. ([54098](https://github.com/WordPress/gutenberg/pull/54098)) +- Frontend [Stage 1]. ([53884](https://github.com/WordPress/gutenberg/pull/53884)) +- Font Collections frontend. ([54566](https://github.com/WordPress/gutenberg/pull/54566)) + +#### Patterns +- Allow import/export patterns as JSON files. ([54337](https://github.com/WordPress/gutenberg/pull/54337)) + +#### Block Editor +- Adds 'nofollow' setting to inline links (rich text only). ([53945](https://github.com/WordPress/gutenberg/pull/53945)) +- Rename Group blocks in the Editor via Modal. ([53735](https://github.com/WordPress/gutenberg/pull/53735)) + + +### Enhancements + +#### Core Data +- Add edits data to the useEntityRecord. ([54167](https://github.com/WordPress/gutenberg/pull/54167)) + +#### Components +- Add non-listbox functionality back to `CircularOptionPicker`. ([54290](https://github.com/WordPress/gutenberg/pull/54290)) +- Added missing "middle" allowed tooltip position. ([52147](https://github.com/WordPress/gutenberg/pull/52147)) +- BlockSettingsMenu: Ensure only one block settings menu is open at a time. ([54083](https://github.com/WordPress/gutenberg/pull/54083)) +- Bundle the block copy handler within the BlockCanvas component. ([54207](https://github.com/WordPress/gutenberg/pull/54207)) +- Bundle the block selection clearer hook into the BlockCanvas component. ([54209](https://github.com/WordPress/gutenberg/pull/54209)) +- Ensure that 'Duotone Filter' color pickers have relevant labels. ([54468](https://github.com/WordPress/gutenberg/pull/54468)) +- Export ProgressBar to allow it to be used. ([54404](https://github.com/WordPress/gutenberg/pull/54404)) +- FormTokenField - add prop to allow saving of tokens onBlur. ([53976](https://github.com/WordPress/gutenberg/pull/53976)) +- Refactoring `BorderControl`'s unit tests. ([54155](https://github.com/WordPress/gutenberg/pull/54155)) +- Remove unnecessary padding-right on the dismissible notice. ([52240](https://github.com/WordPress/gutenberg/pull/52240)) +- Support controlling open/closed state for Dropdown and DropdownMenu. ([54257](https://github.com/WordPress/gutenberg/pull/54257)) +- ToggleGroupControl: Rewrite backdrop animation with framer motion shared layout animations. ([50278](https://github.com/WordPress/gutenberg/pull/50278)) +- ToolTip: Refactor using ariakit. ([48440](https://github.com/WordPress/gutenberg/pull/48440)) +- Tooltip: Add `placement` prop to replace deprecated `position`. ([54264](https://github.com/WordPress/gutenberg/pull/54264)) +- Tooltip: Add new `hideOnClick` prop. ([54406](https://github.com/WordPress/gutenberg/pull/54406)) +- Tweak border control button to proper metrics and simpler action. ([53998](https://github.com/WordPress/gutenberg/pull/53998)) +- Update FormTokenField styling for consistency and visibility. ([54402](https://github.com/WordPress/gutenberg/pull/54402)) +- Update spacing sizes control metrics and icons. ([54470](https://github.com/WordPress/gutenberg/pull/54470)) +- Update/form token field onblur. ([54445](https://github.com/WordPress/gutenberg/pull/54445)) +- `Popover`: Update `positionToPlacement` types. ([54101](https://github.com/WordPress/gutenberg/pull/54101)) +- `SearchControl`: Allow for 32px compact size, introduce option to change default size to 40px. ([54548](https://github.com/WordPress/gutenberg/pull/54548)) + +#### Block Library +- #39457: Image block keep image size on replacing image. ([49982](https://github.com/WordPress/gutenberg/pull/49982)) +- Add __next40pxDefaultSize to featured image opacity control. ([54389](https://github.com/WordPress/gutenberg/pull/54389)) +- Add aspect ratio to image placeholder. ([54216](https://github.com/WordPress/gutenberg/pull/54216)) +- Allow using a button element for button blocks. ([54206](https://github.com/WordPress/gutenberg/pull/54206)) +- Buttons Block: Show inserter if button have variations (#53498). ([53783](https://github.com/WordPress/gutenberg/pull/53783)) +- Change dialogdescription for renaming group block. ([54358](https://github.com/WordPress/gutenberg/pull/54358)) +- Footnotes: Add missing placeholder instructions text. ([54056](https://github.com/WordPress/gutenberg/pull/54056)) +- Heading block: Add support for writingMode. ([54351](https://github.com/WordPress/gutenberg/pull/54351)) +- Improved description for the post-terms core block. ([47715](https://github.com/WordPress/gutenberg/pull/47715)) +- Make matrix position behave like valign. ([54050](https://github.com/WordPress/gutenberg/pull/54050)) +- Navigation block: Add `core/buttons` to the allowed blocks. ([53966](https://github.com/WordPress/gutenberg/pull/53966)) +- Remove unused prop from GroupPlaceHolder component. ([51493](https://github.com/WordPress/gutenberg/pull/51493)) +- Template parts: Use the template actions component for template parts patterns. ([54173](https://github.com/WordPress/gutenberg/pull/54173)) +- Text orientation: Rotate vertical text when the text is aligned (Upside down text). ([53175](https://github.com/WordPress/gutenberg/pull/53175)) +- Update parent labels in page attributes panel and page list block. ([54403](https://github.com/WordPress/gutenberg/pull/54403)) +- Use __next40pxDefaultSize on more UI. ([54400](https://github.com/WordPress/gutenberg/pull/54400)) + +#### Interactivity API +- Add `timeout` option to `navigate()`. ([54474](https://github.com/WordPress/gutenberg/pull/54474)) +- Add manual Server Side Rendering (SSR) to the Interactivity API blocks. ([54343](https://github.com/WordPress/gutenberg/pull/54343)) +- Ensure that the view scripts of core blocks have the `wp-interactivity` dependency. ([54594](https://github.com/WordPress/gutenberg/pull/54594)) +- Image block: Revise lightbox UI to remove 'behaviors'. ([53851](https://github.com/WordPress/gutenberg/pull/53851)) +- Image block: UI updates for the image lightbox (redo). ([54509](https://github.com/WordPress/gutenberg/pull/54509)) +- Override unfinished `navigate` calls. ([54201](https://github.com/WordPress/gutenberg/pull/54201)) +- Query Loop: Add design enhancements for the "enhanced pagination" setting. ([54455](https://github.com/WordPress/gutenberg/pull/54455)) +- Query Loop: Allow "enhanced pagination" only with core blocks. ([54347](https://github.com/WordPress/gutenberg/pull/54347)) +- Query block: Start prefetching on first click to next/previous. ([54781](https://github.com/WordPress/gutenberg/pull/54781)) + +#### Patterns +- Add categories to user patterns, and allow filtering by these in site and post editor. ([53835](https://github.com/WordPress/gutenberg/pull/53835)) +- Add editing of pattern categories to site editor. ([54640](https://github.com/WordPress/gutenberg/pull/54640)) +- Add user categories to site editor sidebar navigation screen. ([53837](https://github.com/WordPress/gutenberg/pull/53837)) +- Add user pattern categories to post editor inserter patterns tab. ([53933](https://github.com/WordPress/gutenberg/pull/53933)) +- Apply white background to the preview as a fallback. ([54534](https://github.com/WordPress/gutenberg/pull/54534)) +- Merge unsynced into inserter patterns tab and add paging and filtering. ([54007](https://github.com/WordPress/gutenberg/pull/54007)) +- Update empty template part label. ([53842](https://github.com/WordPress/gutenberg/pull/53842)) +- Memoize `useSelect` for `usePatterns`. ([54588](https://github.com/WordPress/gutenberg/pull/54588)) +- Site Editor: Prevent unintended actions on the classic theme. ([54422](https://github.com/WordPress/gutenberg/pull/54422)) + +#### Design Tools +- Add back tooltip to styles UI. ([54574](https://github.com/WordPress/gutenberg/pull/54574)) +- Add block gap to Post Content block. ([54282](https://github.com/WordPress/gutenberg/pull/54282)) +- Add block instance elements support for buttons and headings. ([53667](https://github.com/WordPress/gutenberg/pull/53667)) +- Background Image block support: Add reset menu item. ([54341](https://github.com/WordPress/gutenberg/pull/54341)) +- Block Supports: Add background image support to Group block. ([53934](https://github.com/WordPress/gutenberg/pull/53934)) +- Columns: Adopt button and heading element colors. ([54104](https://github.com/WordPress/gutenberg/pull/54104)) +- Update block styles UI. ([54446](https://github.com/WordPress/gutenberg/pull/54446)) +- Improve background image control. ([54439](https://github.com/WordPress/gutenberg/pull/54439)) + +#### Site Editor +- Copy: End the Templates page description in the Site Editor with a period. ([54221](https://github.com/WordPress/gutenberg/pull/54221)) +- Edit Site: Update progress bar to determinate. ([53399](https://github.com/WordPress/gutenberg/pull/53399)) +- Follow up visual tweaks to block-specific commands. ([54427](https://github.com/WordPress/gutenberg/pull/54427)) +- Site editor sidebar: Abstracting footer so it can be used across details screens. ([54082](https://github.com/WordPress/gutenberg/pull/54082)) +- [Page Inspector]: Add ability to switch templates. ([51477](https://github.com/WordPress/gutenberg/pull/51477)) + +#### Global Styles +- Rename `settings` & `userSettings` props to `value` & `inheritedValue` respectively in ImageSettingsPanel. ([54593](https://github.com/WordPress/gutenberg/pull/54593)) +- Update Block specific CSS label to include additional instructions. ([49626](https://github.com/WordPress/gutenberg/pull/49626)) + +#### Block Editor +- Use gray color on link control advanced toggle. ([54545](https://github.com/WordPress/gutenberg/pull/54545)) +- Verse: Exit on triple Enter. ([53332](https://github.com/WordPress/gutenberg/pull/53332)) +- Block editor: hooks: Fix rules of hooks violations (2). ([48943](https://github.com/WordPress/gutenberg/pull/48943)) +- Always show the total number of patterns even with only one page. ([54813](https://github.com/WordPress/gutenberg/pull/54813)) + +#### Typography +- Font Face: Backport from Core changeset 56500. ([54218](https://github.com/WordPress/gutenberg/pull/54218)) +- Font Library: Changing the upload directory to wp-content/fonts. ([54122](https://github.com/WordPress/gutenberg/pull/54122)) +- Font Library: Load collection JSON data from a URL in the collection configuration. ([54067](https://github.com/WordPress/gutenberg/pull/54067)) +- Font Library: Use wporg cdn to host the google fonts json data. ([54795](https://github.com/WordPress/gutenberg/pull/54795)) + +#### Themes +- Theme Previews: Make the back button customizable. ([54242](https://github.com/WordPress/gutenberg/pull/54242)) + +#### Plugin +- Remove 'Footnotes' and 'Comments' from the non-dynamic block registration list. ([54154](https://github.com/WordPress/gutenberg/pull/54154)) + +#### Media +- Correct function name handleFileChange is replaced by wrong function name. ([52250](https://github.com/WordPress/gutenberg/pull/52250)) + +#### List View +- Allow Escape key to deselect blocks if blocks are selected. ([48708](https://github.com/WordPress/gutenberg/pull/48708)) +- Try directing focus to the list view toggle button when closing the list view. ([54175](https://github.com/WordPress/gutenberg/pull/54175)) + +#### Block API +- Deprecated `get_file_path_from_theme` method. ([45831](https://github.com/WordPress/gutenberg/pull/45831)) + +#### Keyboard Shortcuts +- Make the shortcuts provider optional. ([54080](https://github.com/WordPress/gutenberg/pull/54080)) + +#### Blob +- refactor(blob): Type URL parameter as optional. ([49201](https://github.com/WordPress/gutenberg/pull/49201)) + +#### Collaborative Editing +- Try bundling sync package. ([54738](https://github.com/WordPress/gutenberg/pull/54738)) + + +### New APIs + +#### Components +- Revert "Export ProgressBar to allow it to be used". ([54428](https://github.com/WordPress/gutenberg/pull/54428)) + +#### Block API +- Stabilize Block Hooks feature. ([54293](https://github.com/WordPress/gutenberg/pull/54293)) + +#### Data Layer +- Data: Introduce `countSelectorsByStatus` redux metadata selector. ([53767](https://github.com/WordPress/gutenberg/pull/53767)) + +#### Framework +- Add useStateWithHistory hook and use to show a block editor with undo/redo. ([54377](https://github.com/WordPress/gutenberg/pull/54377)) +- BlockEditor: Add BlockCanvas component = Iframe + BlockList + WritingFlow. ([54149](https://github.com/WordPress/gutenberg/pull/54149)) +- Extract undo/redo as a separate package. ([54292](https://github.com/WordPress/gutenberg/pull/54292)) + +### Bug Fixes + +#### Components +- Add children back to toolbar item render for rendered components. ([53314](https://github.com/WordPress/gutenberg/pull/53314)) +- Add missing useState import in Border Control documentation. ([49476](https://github.com/WordPress/gutenberg/pull/49476)) +- Adjust input-style__focus mixin to proper focus size. ([54398](https://github.com/WordPress/gutenberg/pull/54398)) +- DropdownMenu v2: Fix submenu chevron direction in RTL languages. ([54036](https://github.com/WordPress/gutenberg/pull/54036)) +- Fix incorrect focus style size on InputControl. ([54394](https://github.com/WordPress/gutenberg/pull/54394)) +- Make `CircularOptionPicker` focus styles resilient to button size changes. ([54196](https://github.com/WordPress/gutenberg/pull/54196)) +- PaletteEdit: Fix padding in RTL mode. ([54034](https://github.com/WordPress/gutenberg/pull/54034)) +- Popover: Set is-positioned class only after animation has finished. ([54178](https://github.com/WordPress/gutenberg/pull/54178)) +- Storybook: Restore previous URL for the introduction documentation page. ([54247](https://github.com/WordPress/gutenberg/pull/54247)) +- Storybook: Update doc param values for ConfirmDialog. ([54130](https://github.com/WordPress/gutenberg/pull/54130)) +- Update borderFocus to ADMIN.theme. ([54425](https://github.com/WordPress/gutenberg/pull/54425)) +- Use standard focus style on BorderControl. ([54429](https://github.com/WordPress/gutenberg/pull/54429)) +- DateTimePicker: Fix onChange callback check so that it also works inside iframes. ([54669](https://github.com/WordPress/gutenberg/pull/54669)) + +#### Post Editor +- Adds animation state for DFM off to post editor header. ([54244](https://github.com/WordPress/gutenberg/pull/54244)) +- Block Editor: Memoize the createPageEntity callback. ([54580](https://github.com/WordPress/gutenberg/pull/54580)) +- Edit Post: Avoid fetching the edited template for non-viewable posts. ([54158](https://github.com/WordPress/gutenberg/pull/54158)) +- Editor: Catch errors when creating terms. ([53369](https://github.com/WordPress/gutenberg/pull/53369)) +- Fix layout when post content is root block. ([54485](https://github.com/WordPress/gutenberg/pull/54485)) +- Make order of pinned items consistent. ([53908](https://github.com/WordPress/gutenberg/pull/53908)) +- Prevent the list view shortcut from typing unexpected characters. ([54078](https://github.com/WordPress/gutenberg/pull/54078)) +- Top Toolbar: Prevent the focus outline of the button from being cut off. ([54172](https://github.com/WordPress/gutenberg/pull/54172)) +- Try using fallback layout instead of default in post editor. ([54371](https://github.com/WordPress/gutenberg/pull/54371)) +- [Edit Post]: Toggle Distraction free mode mode based on compatibility. ([54073](https://github.com/WordPress/gutenberg/pull/54073)) + +#### Block Library +- Block Moving Mode: Prevent the block from being moved into itself. ([54137](https://github.com/WordPress/gutenberg/pull/54137)) +- Fix navigation block submenu focus when closing menu with the ESC key. ([54299](https://github.com/WordPress/gutenberg/pull/54299)) +- List Block: Fix numbering style to be applied correctly. ([53301](https://github.com/WordPress/gutenberg/pull/53301)) +- Navigation Link: Restore tooltip. ([54263](https://github.com/WordPress/gutenberg/pull/54263)) +- Post navigation link: Fix the writing mode setting on the front. ([54053](https://github.com/WordPress/gutenberg/pull/54053)) +- PreviewOptions: Fix critical error when children not passed. ([54284](https://github.com/WordPress/gutenberg/pull/54284)) +- Remove `role` attribute when set to `null` in `data-wp-bind`. ([54608](https://github.com/WordPress/gutenberg/pull/54608)) +- [Commands]: Add group/ungroup commands only when eligible. ([53988](https://github.com/WordPress/gutenberg/pull/53988)) +- Replace the `gutenberg_` prefix with `wp_` in image block. ([54678](https://github.com/WordPress/gutenberg/pull/54678)) +- Navigation block: Fix padding on mobile overlay when global padding is 0. ([53725](https://github.com/WordPress/gutenberg/pull/53725)) + +#### Patterns +- Command Palette: Fix duplicate Patterns command. ([54133](https://github.com/WordPress/gutenberg/pull/54133)) +- Don't output root padding when editing patterns. ([54373](https://github.com/WordPress/gutenberg/pull/54373)) +- Fix user pattern categories in site editor inserter. ([54641](https://github.com/WordPress/gutenberg/pull/54641)) +- Remove pattern category as a variation for post terms block. ([54532](https://github.com/WordPress/gutenberg/pull/54532)) +- StartPageOptions: Improve conditions to show modal only on a brand new page. ([54245](https://github.com/WordPress/gutenberg/pull/54245)) +- Add My patterns back to post editor inserter categories. ([54767](https://github.com/WordPress/gutenberg/pull/54767)) +- De-emphasise pattern filters in inserter. ([54681](https://github.com/WordPress/gutenberg/pull/54681)) +- Fix All Patterns category default display. ([54721](https://github.com/WordPress/gutenberg/pull/54721)) +- Fix bug with new categories not showing. ([54768](https://github.com/WordPress/gutenberg/pull/54768)) +- Fix bug with pattern categories not saving sometimes. ([54676](https://github.com/WordPress/gutenberg/pull/54676)) +- Fix category type for back link. ([54753](https://github.com/WordPress/gutenberg/pull/54753)) +- Fix duplication of uncategorized patterns. ([54755](https://github.com/WordPress/gutenberg/pull/54755)) +- Inject the theme name into the block attributes. ([54595](https://github.com/WordPress/gutenberg/pull/54595)) +- Reinstate my patterns category in site editor. ([54726](https://github.com/WordPress/gutenberg/pull/54726)) +- Require a title in the creation modal. ([54717](https://github.com/WordPress/gutenberg/pull/54717)) +- Use slug as fallback for empty title. ([54731](https://github.com/WordPress/gutenberg/pull/54731)) +- Allow non-user patterns under Standard sync filter. ([54756](https://github.com/WordPress/gutenberg/pull/54756)) +- Check that pattern is synced before replacing blocks with synced pattern on creation. ([54804](https://github.com/WordPress/gutenberg/pull/54804)) +- Fix back navigation after pattern creation. ([54852](https://github.com/WordPress/gutenberg/pull/54852)) +- Fix category control width in site editor. ([54853](https://github.com/WordPress/gutenberg/pull/54853)) +- Improve sentence case consistency of labels and notices. ([54807](https://github.com/WordPress/gutenberg/pull/54807)) + +#### Block Editor +- Add keyboardReturn submit button back to LinkControl. ([52620](https://github.com/WordPress/gutenberg/pull/52620)) +- Formats: Memoize link value passed to the LinkControl. ([54603](https://github.com/WordPress/gutenberg/pull/54603)) +- List: Merge consecutive lists. ([52995](https://github.com/WordPress/gutenberg/pull/52995)) +- Rich text: Fix useAnchor (remove nextElementSibling). ([54013](https://github.com/WordPress/gutenberg/pull/54013)) +- Iframe: Adjust keydown event bubbling. ([54565](https://github.com/WordPress/gutenberg/pull/54565)) +- Reset page after changing pattern filters or search value. ([54774](https://github.com/WordPress/gutenberg/pull/54774)) +- Block Editor: Fix 'isBlockSubtreeDisabled' private selector. ([54618](https://github.com/WordPress/gutenberg/pull/54618)) + +#### Site Editor +- Bump the z-index of the rename modal. ([54277](https://github.com/WordPress/gutenberg/pull/54277)) +- Default template lookup should use slug, not the full permalink, in the site editor. ([54599](https://github.com/WordPress/gutenberg/pull/54599)) +- Fix "Blog title" input border radius in Index / Home details panel. ([54192](https://github.com/WordPress/gutenberg/pull/54192)) +- Hide ghost top toolbar. ([54555](https://github.com/WordPress/gutenberg/pull/54555)) +- CreateTemplatePartModal: Disable the 'Create' button while saving. ([54716](https://github.com/WordPress/gutenberg/pull/54716)) + +#### Plugin +- Ensure font-face styles are printed in iframe editors. ([54313](https://github.com/WordPress/gutenberg/pull/54313)) +- Font Face & Font Library: Load PHP files only if the main class does not exist. ([54103](https://github.com/WordPress/gutenberg/pull/54103)) +- Gutenberg Plugin: Add hook to allow `writing-mode` as a safe CSS property. ([54581](https://github.com/WordPress/gutenberg/pull/54581)) +- Update readme.txt "tested up to 6.3". ([54072](https://github.com/WordPress/gutenberg/pull/54072)) +- Update cherry-pick script to correctly verify GitHub CLI setup. ([54720](https://github.com/WordPress/gutenberg/pull/54720)) +- Conditionally remove deprecated 'print_emoji_styles'. ([54828](https://github.com/WordPress/gutenberg/pull/54828)) + +#### Typography +- Font Library: Ensure merged fontFace data is enconded as an array instead of an object. ([54435](https://github.com/WordPress/gutenberg/pull/54435)) +- Font Library: Fix duplicate variants with different file types. ([54490](https://github.com/WordPress/gutenberg/pull/54490)) +- Font Library: Setting wp_font_family custom post type as _builtin and not plublic. ([54559](https://github.com/WordPress/gutenberg/pull/54559)) +- Font Face: Get name from "fontFamily" setting, not "name". ([54615](https://github.com/WordPress/gutenberg/pull/54615)) +- Font Library: Fix modal width on mobile viewport. ([54518](https://github.com/WordPress/gutenberg/pull/54518)) +- Font Library: Fix space above theme fonts in font library modal. ([54598](https://github.com/WordPress/gutenberg/pull/54598)) +- Font Library: Fix error installing system fonts. ([54713](https://github.com/WordPress/gutenberg/pull/54713)) +- Font Library: Remove font files created by tests after tests run. ([54771](https://github.com/WordPress/gutenberg/pull/54771)) +- Font Library: Avoid rendering font library ui outisde gutenberg plugin. ([54830](https://github.com/WordPress/gutenberg/pull/54830)) + +#### Widgets Editor +- Edit Widgets: Fix broken layout. ([54372](https://github.com/WordPress/gutenberg/pull/54372)) +- Edit Widgets: Fix invisible action area when the top toolbar is enabled. ([54329](https://github.com/WordPress/gutenberg/pull/54329)) +- Fix top toolbar for the customizer widgets sidebar control. ([54255](https://github.com/WordPress/gutenberg/pull/54255)) + +#### Global Styles +- Font Library: Fix notification error for actions related to custom fonts. ([54535](https://github.com/WordPress/gutenberg/pull/54535)) +- Prevent layout changes from saving the whole inherited settings object. ([54500](https://github.com/WordPress/gutenberg/pull/54500)) + +#### Block API +- Blocks: Fix incorrect placement for hooked blocks in the parent container. ([54349](https://github.com/WordPress/gutenberg/pull/54349)) +- Pass correct content argument to enter transforms. ([54108](https://github.com/WordPress/gutenberg/pull/54108)) +- Block Hooks: Avoid processing empty content for loaded templates. ([54719](https://github.com/WordPress/gutenberg/pull/54719)) + +#### Rich Text +- Revert: Rich text: Copy tag name on internal paste. ([54301](https://github.com/WordPress/gutenberg/pull/54301)) + +#### Interactivity API +- Image: Fix block serialization test case to cover deprecation of `behaviors`. ([54570](https://github.com/WordPress/gutenberg/pull/54570)) +- Query Loop: Select first anchor inside Post Template with "enhanced pagination" enabled. ([54730](https://github.com/WordPress/gutenberg/pull/54730)) + +#### Icons +- Fix React forwardRef warnings for `TooltipAnchor`s. ([54492](https://github.com/WordPress/gutenberg/pull/54492)) + +#### History +- Fix extra undo/redo step when removing or replacing all blocks. ([54457](https://github.com/WordPress/gutenberg/pull/54457)) + +#### Synced Patterns +- Patterns: Apply layout and alignment to synced patterns in the editor. ([54416](https://github.com/WordPress/gutenberg/pull/54416)) + +#### npm Packages +- Workflow: Fix the issue with npm publishing for WP major version. ([54088](https://github.com/WordPress/gutenberg/pull/54088)) + +#### Media +- useMediaQuery: Avoid crashing on Safari < 14. ([54023](https://github.com/WordPress/gutenberg/pull/54023)) + +#### Nested / Inner Blocks +- Fix: InnerBlocks allowed blocks change with different sizes. ([53943](https://github.com/WordPress/gutenberg/pull/53943)) + +#### Layout +- Post Content: Ensure layout classnames are applied in readonly preview. ([53864](https://github.com/WordPress/gutenberg/pull/53864)) + +#### Document Settings +- Set the timezone correctly. ([48083](https://github.com/WordPress/gutenberg/pull/48083)) + +#### React i18n +- Fix: Invalid import in react-i18n documentation. ([54308](https://github.com/WordPress/gutenberg/pull/54308)) + +#### Design Tools +- Background Image control: Use consistent button, ensure descriptive text accounts for no image selected. ([54711](https://github.com/WordPress/gutenberg/pull/54711)) + +#### Collaborative Editing +- Make sure sync code only runs when experiment is enabled. ([54710](https://github.com/WordPress/gutenberg/pull/54710)) + +#### Core Data +- core-data: Fix nested property access with undefined name. ([54790](https://github.com/WordPress/gutenberg/pull/54790)) + + +### Accessibility + +#### Block Library +- Comments form: Accessibility fixes for back-end. ([54393](https://github.com/WordPress/gutenberg/pull/54393)) +- Navigation: Add ariaLabel block support. ([54418](https://github.com/WordPress/gutenberg/pull/54418)) +- Table block: Fix semantic structure for screen readers on back-end. ([54324](https://github.com/WordPress/gutenberg/pull/54324)) + +#### Components +- Improve Notice component accessibility. ([54498](https://github.com/WordPress/gutenberg/pull/54498)) +- Making Circular Option Picker a `listbox`. ([52255](https://github.com/WordPress/gutenberg/pull/52255)) +- Allow Modal to place focus on first element within contents via new API. ([54590](https://github.com/WordPress/gutenberg/pull/54590)) +- Improve the placeholder instructions accessibility. ([45801](https://github.com/WordPress/gutenberg/pull/45801)) + +#### Site Editor +- Clarify the "Entity" message of the snackbar. ([54333](https://github.com/WordPress/gutenberg/pull/54333)) +- Use solid accent color selection in command palette. ([54318](https://github.com/WordPress/gutenberg/pull/54318)) + +#### Block Editor +- Update nofollow control label. ([54184](https://github.com/WordPress/gutenberg/pull/54184)) + + +### Performance + +- Use median instead of average to stabilize First Block metric. ([54157](https://github.com/WordPress/gutenberg/pull/54157)) +- improvement: Reduce the use of the `_wp_array_get` function. ([51116](https://github.com/WordPress/gutenberg/pull/51116)) + +#### Block Library +- Footnotes: Add block-level caching when parsing content for footnotes. ([52577](https://github.com/WordPress/gutenberg/pull/52577)) +- Table of Contents: Use a custom store subscription for observing headings. ([54094](https://github.com/WordPress/gutenberg/pull/54094)) +- getClientIdsOfDescendants: Support single 'clientId' as a argument. ([54421](https://github.com/WordPress/gutenberg/pull/54421)) + +#### Site Editor +- Edit site: Prevent enqueuing entire stylesheet in iframe. ([54254](https://github.com/WordPress/gutenberg/pull/54254)) +- Fix first block locator's page reference. ([54188](https://github.com/WordPress/gutenberg/pull/54188)) + +#### Patterns +- Move mapping of values from core-data selector into consumers. ([54576](https://github.com/WordPress/gutenberg/pull/54576)) + +#### Block API +- Unnecessary JSON decoding in block parser. ([54424](https://github.com/WordPress/gutenberg/pull/54424)) + +#### Components +- Tooltip: Render tooltip markup in the DOM only when open. ([54312](https://github.com/WordPress/gutenberg/pull/54312)) + +#### Post Editor +- Editor: Memoize 'getNestedEditedPostProperty' selector helper. ([54160](https://github.com/WordPress/gutenberg/pull/54160)) + +#### Developer Experience +- Tests: Improve the environment setup. ([54309](https://github.com/WordPress/gutenberg/pull/54309)) + +### Experiments + +#### Interactivity API +- Remove `wp_store` from query block. ([54359](https://github.com/WordPress/gutenberg/pull/54359)) + + +### Documentation + +- Add a documentation page to explain how to implement undo/redo in a third-party editor. ([54546](https://github.com/WordPress/gutenberg/pull/54546)) +- Add the Commands Data page to Handbook. ([53634](https://github.com/WordPress/gutenberg/pull/53634)) +- Bootstrap a documentation website tailored towards the usage of Gutenberg outside WordPress. ([54375](https://github.com/WordPress/gutenberg/pull/54375)) +- Button: Undocument the `focus` prop. ([54397](https://github.com/WordPress/gutenberg/pull/54397)) +- Docs: Add missing callout class. ([54558](https://github.com/WordPress/gutenberg/pull/54558)) +- Docs: Add note about enqueueing assets in the iframe and trim whitespace. ([54125](https://github.com/WordPress/gutenberg/pull/54125)) +- Docs: Consolidated design Reference with the main Design Contributions doc. ([51065](https://github.com/WordPress/gutenberg/pull/51065)) +- Docs: Move Glossary page to Getting Started. ([54120](https://github.com/WordPress/gutenberg/pull/54120)) +- Docs: Move the FAQ page to Getting Started. ([54117](https://github.com/WordPress/gutenberg/pull/54117)) +- Docs: Overhaul the Development Environment section of the Block Editor Handbook. ([54395](https://github.com/WordPress/gutenberg/pull/54395)) +- Docs: Remove Outreach doc from Getting Started section. ([54314](https://github.com/WordPress/gutenberg/pull/54314)) +- Docs: Remove unneeded block theme docs. ([51071](https://github.com/WordPress/gutenberg/pull/51071)) +- Fix bullet hierarchy. ([47178](https://github.com/WordPress/gutenberg/pull/47178)) +- Fix createI18n package import location. ([51328](https://github.com/WordPress/gutenberg/pull/51328)) +- Fix incorrect image src in Design Contributions doc. ([54302](https://github.com/WordPress/gutenberg/pull/54302)) +- Fix: Broken links on ToolbarGroup documentation. ([54229](https://github.com/WordPress/gutenberg/pull/54229)) +- Fix: Remove unrequired code from BorderControl documentation. ([54348](https://github.com/WordPress/gutenberg/pull/54348)) +- Fix: Wrapped `ref` in quotes in theme.json documentation. ([54591](https://github.com/WordPress/gutenberg/pull/54591)) +- Incorrect file extension?. ([54134](https://github.com/WordPress/gutenberg/pull/54134)) +- Theme JSON schema: Fix "not allowed error" in settings property. ([54521](https://github.com/WordPress/gutenberg/pull/54521)) +- Try: Allow `multiple` attribute to be a string in upload components. ([53350](https://github.com/WordPress/gutenberg/pull/53350)) +- Update Commands documentation with examples and more context. ([54441](https://github.com/WordPress/gutenberg/pull/54441)) +- Update the components changelog to mark the popover slot removal as a breaking change. ([54022](https://github.com/WordPress/gutenberg/pull/54022)) +- Update versions in WP for 6.3.1. ([54069](https://github.com/WordPress/gutenberg/pull/54069)) +- Updated Related Components Links. ([49176](https://github.com/WordPress/gutenberg/pull/49176)) +- Updates Edit and Save code examples to have matching open/closing tags. ([53915](https://github.com/WordPress/gutenberg/pull/53915)) +- [Docs: Getting Started / Block Development Environment] Updates on the text to improve clarity and preciseness. ([54563](https://github.com/WordPress/gutenberg/pull/54563)) +- documentation - Contribution Triage: Formatted text and changed some titles and structure. ([54258](https://github.com/WordPress/gutenberg/pull/54258)) +- documentation [Block Editor Handbook / Getting Started / Block Development Environment]: Fix links. ([54571](https://github.com/WordPress/gutenberg/pull/54571)) +- Add missing global declaration in DocBlock of interactivity files. ([54683](https://github.com/WordPress/gutenberg/pull/54683)) + + +### Code Quality + +- Adds removal notice to view.js.mustache. ([54105](https://github.com/WordPress/gutenberg/pull/54105)) +- Block editor: Remove `__unstableElementContext` and filter `EditorStyles` instead. ([52888](https://github.com/WordPress/gutenberg/pull/52888)) +- Improving error messages and codes in jest-console, matcher.js. ([53743](https://github.com/WordPress/gutenberg/pull/53743)) +- Indicate nested paths on __experimentalSaveSpecifiedEntityEdits. ([54161](https://github.com/WordPress/gutenberg/pull/54161)) +- JS unit tests: Update popover matcher. ([54168](https://github.com/WordPress/gutenberg/pull/54168)) +- Style engine: Sync doc changes from core. ([54650](https://github.com/WordPress/gutenberg/pull/54650)) + +#### Components +- Composite: Refactor to TypeScript. ([54028](https://github.com/WordPress/gutenberg/pull/54028)) +- FocusableIframe: Refactor to TypeScript. ([53979](https://github.com/WordPress/gutenberg/pull/53979)) +- IsolatedEventContainer to Typescript (just test file). ([54316](https://github.com/WordPress/gutenberg/pull/54316)) +- Popover: Remove custom frame scroll/resize listeners. ([54286](https://github.com/WordPress/gutenberg/pull/54286)) +- Revert FormTokenField - add prop to allow saving of tokens onBlur. ([54444](https://github.com/WordPress/gutenberg/pull/54444)) +- Toolbar/ToolbarDropdownMenu Typescript Conversion. ([54321](https://github.com/WordPress/gutenberg/pull/54321)) +- ToolbarGroup - Typescript. ([54317](https://github.com/WordPress/gutenberg/pull/54317)) +- with-focus-outside: Convert to TypeScript. ([53980](https://github.com/WordPress/gutenberg/pull/53980)) + +#### Patterns +- Revert usePatternsState to return an array instead of object. ([54582](https://github.com/WordPress/gutenberg/pull/54582)) +- Add missing dependency of `@wordpress/patterns` on `@babel/runtime`. ([54118](https://github.com/WordPress/gutenberg/pull/54118)) +- Move category map creation out of useSelect. ([54584](https://github.com/WordPress/gutenberg/pull/54584)) +- Remove experimental prefixes from patterns package. ([54338](https://github.com/WordPress/gutenberg/pull/54338)) +- Site editor: Consolidate constants. ([54484](https://github.com/WordPress/gutenberg/pull/54484)) +- Fix sidebar nav screen fallback category. ([54754](https://github.com/WordPress/gutenberg/pull/54754)) + +#### Post Editor +- Annotations: Run end-to-end tests with iframe. ([54191](https://github.com/WordPress/gutenberg/pull/54191)) +- EditPostPreferencesModal: Refactor to remove snapshots for index.js. ([54141](https://github.com/WordPress/gutenberg/pull/54141)) +- Extract WordPress specific styles from the BlockTools component. ([54356](https://github.com/WordPress/gutenberg/pull/54356)) +- PageAttributesParent: A minor fixes for useSelect and useMemo hook usages. ([54433](https://github.com/WordPress/gutenberg/pull/54433)) +- PostSyncStatus: Derive sync status inside the selector. ([54159](https://github.com/WordPress/gutenberg/pull/54159)) + +#### Block Library +- Heading: Remove unused 'aria-label'. ([54223](https://github.com/WordPress/gutenberg/pull/54223)) +- Image Editor: Fix ESLint warnings and remove unnecessary dependencies. ([53506](https://github.com/WordPress/gutenberg/pull/53506)) +- Pattern Category: Set 'publicly_queryable' to false. ([54567](https://github.com/WordPress/gutenberg/pull/54567)) +- Post Terms: Fix a 'useSelect' warning in the 'usePostTerms' hook. ([54068](https://github.com/WordPress/gutenberg/pull/54068)) + +#### Interactivity API +- Prepare image lightbox for private version of the Interactivity API in 6 4. ([54547](https://github.com/WordPress/gutenberg/pull/54547)) +- Remove `gutenberg_should_block_use_interactivity_api ` and the old implementation of interactive blocks. ([54297](https://github.com/WordPress/gutenberg/pull/54297)) +- Search block: Switch interactivity to the Interactivity API. ([53343](https://github.com/WordPress/gutenberg/pull/53343)) + +#### Site Editor +- Remove Tooltip workarounds added in the site and block editor. ([54450](https://github.com/WordPress/gutenberg/pull/54450)) +- Revisions: Remove 'gutenberg' query param from revisions.php. ([54166](https://github.com/WordPress/gutenberg/pull/54166)) +- Prune store constants. ([54585](https://github.com/WordPress/gutenberg/pull/54585)) +- Use constants rather than hard coded template strings. ([54586](https://github.com/WordPress/gutenberg/pull/54586)) + +#### Rich Text +- RichText: Remove __unstableOnSplitMiddle. ([54183](https://github.com/WordPress/gutenberg/pull/54183)) + +#### Typography +- Fluid typography: Backporting Core @since annotations. ([54204](https://github.com/WordPress/gutenberg/pull/54204)) +- Font Face: Remove static instance in wp_print_font_faces(). ([54228](https://github.com/WordPress/gutenberg/pull/54228)) +- Font Library: Refactor logic to disable font library in the frontend. ([54748](https://github.com/WordPress/gutenberg/pull/54748)) + +#### Block Editor +- Improve code commenting around focus mount behaviour of rich text Link UI. ([54085](https://github.com/WordPress/gutenberg/pull/54085)) +- List e2e: Run all tests with iframe. ([54181](https://github.com/WordPress/gutenberg/pull/54181)) + +#### Layout +- Use override editor style API. ([54466](https://github.com/WordPress/gutenberg/pull/54466)) + +#### Plugin +- Require minimum WordPress 6.2. ([53451](https://github.com/WordPress/gutenberg/pull/53451)) +- Ensure that Block Hooks work correctly after landing in WP core. ([54651](https://github.com/WordPress/gutenberg/pull/54651)) +- Update uuid package to 9.0.1. ([54725](https://github.com/WordPress/gutenberg/pull/54725)) + +#### Themes +- Iframe: Skip scoping styles. ([46752](https://github.com/WordPress/gutenberg/pull/46752)) + + +### Tools + +#### Testing +- Button: Update test assertion to match test name. ([54260](https://github.com/WordPress/gutenberg/pull/54260)) +- E2E: Do not run page actions in beforeEach hook when using fixme. ([54065](https://github.com/WordPress/gutenberg/pull/54065)) +- Fix Font library unit tests. ([54645](https://github.com/WordPress/gutenberg/pull/54645)) +- Font Library: Remove upload_mimes filter after uploading fonts. ([54647](https://github.com/WordPress/gutenberg/pull/54647)) +- Migrate RichText end-to-end tests to Playwright. ([53493](https://github.com/WordPress/gutenberg/pull/53493)) +- Perf Tests: Update base point to compare. ([54111](https://github.com/WordPress/gutenberg/pull/54111)) +- Puppeteer tests: Try to fix failing tests related to notices in core. ([54452](https://github.com/WordPress/gutenberg/pull/54452)) +- Remove accidental addition of perf test results (2). ([54363](https://github.com/WordPress/gutenberg/pull/54363)) +- Remove accidental addition of perf test results. ([54355](https://github.com/WordPress/gutenberg/pull/54355)) +- Update WPCS to v3.0, and fix all reported Coding Standards issues. ([53866](https://github.com/WordPress/gutenberg/pull/53866)) +- `Modal`: Add more unit tests. ([54569](https://github.com/WordPress/gutenberg/pull/54569)) +- end-to-end Test Utils: Add new fixtures for performance metrics. ([52993](https://github.com/WordPress/gutenberg/pull/52993)) +- end-to-end Tests: Fix 'no-useless-not' ESLint warnings. ([54652](https://github.com/WordPress/gutenberg/pull/54652)) +- package(e2e-test-utils): Update fixtures. ([54128](https://github.com/WordPress/gutenberg/pull/54128)) +- wp-scripts: Add support for Playwright. ([53108](https://github.com/WordPress/gutenberg/pull/53108)) +- Font Library: Use resolvable domain in test. ([54763](https://github.com/WordPress/gutenberg/pull/54763)) +- Global styles tests: Fire hooks when updating post. ([54836](https://github.com/WordPress/gutenberg/pull/54836)) +- Remove action to fix tests. ([54806](https://github.com/WordPress/gutenberg/pull/54806)) +- Font Library: Fix set upload dir test. ([54762](https://github.com/WordPress/gutenberg/pull/54762)) + +#### Build Tooling +- Backport tools: Filter PRs to be cherry picked by merged date. ([54171](https://github.com/WordPress/gutenberg/pull/54171)) +- Changelog tool: Update Automated Testing label. ([54070](https://github.com/WordPress/gutenberg/pull/54070)) +- Running npm run format:Php may result in an error. ([54162](https://github.com/WordPress/gutenberg/pull/54162)) +- Scripts: Correctly resolve entry points when the directory is symlinked. ([54212](https://github.com/WordPress/gutenberg/pull/54212)) +- Upgrade wp-prettier to v3.0.3. ([54539](https://github.com/WordPress/gutenberg/pull/54539)) +- Update typescript-eslint to v6. ([53975](https://github.com/WordPress/gutenberg/pull/53975)) + + +## First time contributors + +The following PRs were merged by first time contributors: + +- @andrewhayward: Making Circular Option Picker a `listbox`. ([52255](https://github.com/WordPress/gutenberg/pull/52255)) +- @jamiemchale: Fix createI18n package import location. ([51328](https://github.com/WordPress/gutenberg/pull/51328)) +- @johnhooks: refactor(blob): Type URL parameter as optional. ([49201](https://github.com/WordPress/gutenberg/pull/49201)) +- @MericKarabulut: Improving error messages and codes in jest-console, matcher.js. ([53743](https://github.com/WordPress/gutenberg/pull/53743)) +- @Piyush-Deshmukh: Fix: Wrapped `ref` in quotes in theme.json documentation. ([54591](https://github.com/WordPress/gutenberg/pull/54591)) +- @Rajinsharwar: Editor: Catch errors when creating terms. ([53369](https://github.com/WordPress/gutenberg/pull/53369)) +- @toolstack: Set the timezone correctly. ([48083](https://github.com/WordPress/gutenberg/pull/48083)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @alexstine @andrewhayward @andrewserong @annezazu @anomiex @anton-vlasenko @aristath @artemiomorales @atachibana @bangank36 @bfintal @bph @brookewp @c4rl0sbr4v0 @carolinan @chad1008 @chintu51 @ciampo @DAreRodz @dcalhoun @derekblank @draganescu @ediamin @ellatrix @fluiddot @gaambo @geriux @getdave @glendaviesnz @gvgvgvijayan @gziolo @hellofromtonya @jameskoster @jamiemchale @jeherve @jffng @johnhooks @jordesign @jorgefilipecosta @joshuatf @jrtashjian @jsnajdr @juanmaguitar @kevin940726 @kkoppenhaver @kmanijak @leewillis77 @luisherranz @madhusudhand @MaggieCabrera @Mamaduka @margolisj @masteradhoc @matiasbenedetto @mburridge @mcsf @MericKarabulut @mhimon @michalczaplinski @mikachan @mikejolley @mokagio @ndiego @ntsekouras @Olein-jp @petitphp @Piyush-Deshmukh @Rajinsharwar @ramonjd @richtabor @SantosGuillamot @SaxonF @scruffian @spacedmonkey @stokesman @swissspidy @t-hamano @tellthemachines @thelovekesh @toolstack @torounit @tyxla @vcanales @walbo @WunderBart @youknowriad + + = 16.6.0 = ## Changelog diff --git a/docs/contributors/code/coding-guidelines.md b/docs/contributors/code/coding-guidelines.md index 12c3ad96cb85f3..90fb5c7adf81f6 100644 --- a/docs/contributors/code/coding-guidelines.md +++ b/docs/contributors/code/coding-guidelines.md @@ -529,7 +529,7 @@ alert( `My name is ${ name }.` ); - Example: `document.body.classList.toggle( 'has-focus', nodeRef.current?.contains( document.activeElement ) );` may wrongly _add_ the class, since [the second argument is optional](https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/toggle). If `undefined` is passed, it would not unset the class as it would when `false` is passed. - Example: `` may inadvertently cause warnings in React by toggling between [controlled and uncontrolled inputs](https://reactjs.org/docs/uncontrolled-components.html). This is an easy trap to fall into when eagerly assuming that a result of `trim()` will always return a string value, overlooking the fact the optional chaining may have caused evaluation to abort earlier with a value of `undefined`. -### `@wordpress/element` (React) Components +### React Components It is preferred to implement all components as [function components](https://reactjs.org/docs/components-and-props.html), using [hooks](https://reactjs.org/docs/hooks-reference.html) to manage component state and lifecycle. With the exception of [error boundaries](https://reactjs.org/docs/error-boundaries.html), you should never encounter a situation where you must use a class component. Note that the [WordPress guidance on Code Refactoring](https://make.wordpress.org/core/handbook/contribute/code-refactoring/) applies here: There needn't be a concentrated effort to update class components in bulk. Instead, consider it as a good refactoring opportunity in combination with some other change. @@ -756,7 +756,7 @@ When documenting an example, use the markdown \`\`\` code block to */ ```` -### Documenting `@wordpress/element` (React) Components +### Documenting React Components When possible, all components should be implemented as [function components](https://reactjs.org/docs/components-and-props.html#function-and-class-components), using [hooks](https://reactjs.org/docs/hooks-intro.html) for managing component lifecycle and state. diff --git a/docs/contributors/versions-in-wordpress.md b/docs/contributors/versions-in-wordpress.md index c4e25c3b2095eb..649fe10d439aa6 100644 --- a/docs/contributors/versions-in-wordpress.md +++ b/docs/contributors/versions-in-wordpress.md @@ -6,6 +6,7 @@ If anything looks incorrect here, please bring it up in #core-editor in [WordPre | Gutenberg Versions | WordPress Version | | ------------------ | ----------------- | +| 16.2-16.7 | 6.4 | | 15.2-16.1 | 6.3.1 | | 15.2-16.1 | 6.3 | | 14.2-15.1 | 6.2 | diff --git a/docs/explanations/architecture/modularity.md b/docs/explanations/architecture/modularity.md index 266e4da1d2325b..dc815d92174dde 100644 --- a/docs/explanations/architecture/modularity.md +++ b/docs/explanations/architecture/modularity.md @@ -43,7 +43,7 @@ function MyApp() { ```php // myplugin.php // Example of script registration dependending on the "components" and "element packages. -wp_register_script( 'myscript', 'pathtomyscript.js', array ('wp-components', "wp-element" ) ); +wp_register_script( 'myscript', 'pathtomyscript.js', array ('wp-components', "react" ) ); ``` ```js diff --git a/docs/getting-started/devenv/get-started-with-wp-now.md b/docs/getting-started/devenv/get-started-with-wp-now.md index f4549735fcbdce..ddcf4c300b4a29 100644 --- a/docs/getting-started/devenv/get-started-with-wp-now.md +++ b/docs/getting-started/devenv/get-started-with-wp-now.md @@ -1,3 +1,7 @@ +
+wp-now is still experimental. For a more comprehensive overview of their current status and roadmap, please check WordPress Playground's repository and wp-now's. +
+ # Get started with wp-now The [@wp-now/wp-now](https://www.npmjs.com/package/@wordpress/env) package (`wp-now`) is a lightweight tool powered by [WordPress Playground](https://developer.wordpress.org/playground/) that streamlines setting up a local WordPress environment. @@ -63,4 +67,4 @@ Here are a few instructions if you need to start over or want to remove what was ## Additional resources - [@wp-now/wp-now](https://github.com/WordPress/playground-tools/tree/trunk/packages/wp-now) (Official documentation) -- [WordPress Playground](https://developer.wordpress.org/playground/) (Developer overview) \ No newline at end of file +- [WordPress Playground](https://developer.wordpress.org/playground/) (Developer overview) diff --git a/docs/getting-started/full-site-editing.md b/docs/getting-started/full-site-editing.md deleted file mode 100644 index ea24a659ab731c..00000000000000 --- a/docs/getting-started/full-site-editing.md +++ /dev/null @@ -1,58 +0,0 @@ -# Full Site Editing - -At the highest level, the vision of Full Site Editing is to provide a collection of features that bring the familiar experience and extendability of blocks to all parts of your site rather than just post and pages. You can think of Full Site Editing as the umbrella project name for various sub-projects within Gutenberg that make this vision possible. Projects under Full Site Editing (FSE) include everything from the Site Editor, Global Styles, numerous Site/Post/Page specific blocks, Query block, Navigation block, Templates, and block themes. What follows are brief descriptions of the major pieces with more details found [here](https://github.com/WordPress/gutenberg/issues/24551): - -- Site Editor: the cohesive experience that allows you to directly edit and navigate between various templates, template parts, styling options, and more. -- Template Editing: a scaled down direct editing experience allowing you to edit/change/create the template a post/page uses. -- Block Theme: work to allow for a theme that's built using templates composed using blocks that works with full site editing. More below. -- Styling: the feature that enables styling modifications across three levels (local blocks, theme defaults, and global modifications). -- Theme Blocks: new blocks that accomplish everything possible in traditional templates using template tags (ex: Post Author Block). -- Browsing: the feature that unlocks the ability to navigate between various entities in the site editing experience including templates, pages, etc. -- Navigation Block: a new block that allows you to edit a site's navigation menu, both in terms of structure and design. -- Query Block: a new block that replicates the classic WP_Query and allows for further customization with additional functionality. - -There are other projects, like the Navigation Editor and Widget Editor, that are meant to specifically help classic themes begin adapting more to the block framework and to act as a stepping stone of sorts to Full Site Editing. These are separate projects from Full Site Editing though but are worth being aware of as they ultimately help the cause of getting more people adjusted to using blocks in more places. - -**Jump in:** - -The best way to learn something is start playing with it. So jump in by installing the Gutenberg plugin from the plugins directory and activating a block theme on a test site. We recommend the [TT1 Blocks theme](https://wordpress.org/themes/tt1-blocks/), it is listed in the theme directory and our development reference theme. You can find other themes in the directory using the [full-site-editing feature tag](https://wordpress.org/themes/tags/full-site-editing/). - -## Get Involved - -An ongoing [FSE Outreach program](https://make.wordpress.org/test/handbook/full-site-editing-outreach-experiment/) is in place with calls for testing and is a great way to get involved and learn about the new features. - -- Join in on [WordPress Slack](https://make.wordpress.org/chat/) at [#fse-outreach-experiment](https://wordpress.slack.com/archives/C015GUFFC00) -- Participate in the [Calls for Testing](https://make.wordpress.org/test/tag/fse-testing-call/) by testing and giving feedback. -- See detailed [How to Test FSE instructions](https://make.wordpress.org/test/handbook/full-site-editing-outreach-experiment/how-to-test-fse/) to get setup to test FSE features. - -## Block Themes - -Block themes are themes built using templates composed using blocks. See the [block theme documentation](https://developer.wordpress.org/themes/block-themes/) for additional details. - -- For examples, see the [WordPress/theme-experiments](https://github.com/WordPress/theme-experiments/) repository with several block themes there including the source for the above mentioned TT1 Blocks. -- Use the `empty-theme.php` script from theme-experiments repo to generate a starter block theme, it will prompt you with a few questions and create a theme. - -``` -❯ git clone https://github.com/WordPress/theme-experiments -❯ cd theme-experiments -❯ php new-empty-theme.php -Please provide the following information: -Theme name: TestTheme -Description: A theme to test -Author: Marcus Kazmierczak -Theme URI: https://github.com/mkaz - -Your new theme is ready! -``` - -You can then copy the generated directory to your `wp-content/themes` directory and start playing with the Site Editor to build and extend the theme. - -### Template and Template Parts - -See the [architecture document on templates](/docs/explanations/architecture/full-site-editing-templates.md) for an explanation on the internals of how templates and templates parts are rendered in the frontend and edited in the backend. - -### theme.json - -Instead of the proliferation of theme support flags or alternative methods, a new `theme.json` file is being used to define theme settings. - -See [documentation for theme.json](/docs/how-to-guides/themes/theme-json.md). diff --git a/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md b/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md index fc8dc01531c5d9..2cd79198b70b9f 100644 --- a/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md +++ b/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md @@ -58,8 +58,8 @@ registerBlockType( 'gutenberg-examples/example-02-stylesheets', { {% Plain %} ```js -( function ( blocks, element, blockEditor ) { - var el = element.createElement; +( function ( blocks, React, blockEditor ) { + var el = React.createElement; blocks.registerBlockType( 'gutenberg-examples/example-02-stylesheets', { edit: function ( props ) { @@ -93,7 +93,7 @@ registerBlockType( 'gutenberg-examples/example-02-stylesheets', { ); }, } ); -} )( window.wp.blocks, window.wp.element, window.wp.blockEditor ); +} )( window.wp.blocks, window.React, window.wp.blockEditor ); ``` {% end %} @@ -134,8 +134,8 @@ registerBlockType( 'gutenberg-examples/example-02-stylesheets', { {% Plain %} ```js -( function ( blocks, element, blockEditor ) { - var el = element.createElement; +( function ( blocks, React, blockEditor ) { + var el = React.createElement; blocks.registerBlockType( 'gutenberg-examples/example-02-stylesheets', { edit: function ( props ) { @@ -155,7 +155,7 @@ registerBlockType( 'gutenberg-examples/example-02-stylesheets', { ); }, } ); -} )( window.wp.blocks, window.wp.element, window.wp.blockEditor ); +} )( window.wp.blocks, window.React, window.wp.blockEditor ); ``` {% end %} @@ -180,8 +180,8 @@ Edit the asset file to include the block-editor dependency for the scripts. array( + 'react', 'wp-blocks', - 'wp-element', 'wp-block-editor', 'wp-polyfill' ), diff --git a/docs/how-to-guides/block-tutorial/block-controls-toolbar-and-sidebar.md b/docs/how-to-guides/block-tutorial/block-controls-toolbar-and-sidebar.md index 93e5e54d848690..1b3a54592b9967 100644 --- a/docs/how-to-guides/block-tutorial/block-controls-toolbar-and-sidebar.md +++ b/docs/how-to-guides/block-tutorial/block-controls-toolbar-and-sidebar.md @@ -95,8 +95,8 @@ registerBlockType( 'gutenberg-examples/example-04-controls-esnext', { {% Plain %} ```js -( function ( blocks, blockEditor, element ) { - var el = element.createElement; +( function ( blocks, blockEditor, React ) { + var el = React.createElement; var RichText = blockEditor.RichText; var AlignmentToolbar = blockEditor.AlignmentToolbar; var BlockControls = blockEditor.BlockControls; @@ -176,7 +176,7 @@ registerBlockType( 'gutenberg-examples/example-04-controls-esnext', { ); }, } ); -} )( window.wp.blocks, window.wp.blockEditor, window.wp.element ); +} )( window.wp.blocks, window.wp.blockEditor, window.React ); ``` {% end %} diff --git a/docs/how-to-guides/block-tutorial/block-supports-in-static-blocks.md b/docs/how-to-guides/block-tutorial/block-supports-in-static-blocks.md index b343280cae43f9..a6350470bb797c 100644 --- a/docs/how-to-guides/block-tutorial/block-supports-in-static-blocks.md +++ b/docs/how-to-guides/block-tutorial/block-supports-in-static-blocks.md @@ -67,8 +67,8 @@ registerBlockType( 'gutenberg-examples/example-03-editable-esnext', { {% Plain %} ```js -( function ( blocks, blockEditor, element ) { - var el = element.createElement; +( function ( blocks, blockEditor, React ) { + var el = React.createElement; var RichText = blockEditor.RichText; var useBlockProps = blockEditor.useBlockProps; @@ -118,7 +118,7 @@ registerBlockType( 'gutenberg-examples/example-03-editable-esnext', { ); }, } ); -} )( window.wp.blocks, window.wp.blockEditor, window.wp.element ); +} )( window.wp.blocks, window.wp.blockEditor, window.React ); ``` {% end %} diff --git a/docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md b/docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md index 9d1e4dbdf52553..f8d4041c4542e4 100644 --- a/docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md +++ b/docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md @@ -55,8 +55,8 @@ registerBlockType( 'gutenberg-examples/example-dynamic', { {% Plain %} ```js -( function ( blocks, element, data, blockEditor ) { - var el = element.createElement, +( function ( blocks, React, data, blockEditor ) { + var el = React.createElement, registerBlockType = blocks.registerBlockType, useSelect = data.useSelect, useBlockProps = blockEditor.useBlockProps; @@ -86,7 +86,7 @@ registerBlockType( 'gutenberg-examples/example-dynamic', { } ); } )( window.wp.blocks, - window.wp.element, + window.React, window.wp.data, window.wp.blockEditor ); @@ -187,8 +187,8 @@ registerBlockType( 'gutenberg-examples/example-dynamic', { {% Plain %} ```js -( function ( blocks, element, serverSideRender, blockEditor ) { - var el = element.createElement, +( function ( blocks, React, serverSideRender, blockEditor ) { + var el = React.createElement, registerBlockType = blocks.registerBlockType, ServerSideRender = serverSideRender, useBlockProps = blockEditor.useBlockProps; @@ -213,7 +213,7 @@ registerBlockType( 'gutenberg-examples/example-dynamic', { } ); } )( window.wp.blocks, - window.wp.element, + window.React, window.wp.serverSideRender, window.wp.blockEditor ); diff --git a/docs/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields.md b/docs/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields.md index 8f4c54451cdb2f..7586081af4216d 100644 --- a/docs/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields.md +++ b/docs/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields.md @@ -111,8 +111,8 @@ registerBlockType( 'gutenberg-examples/example-03-editable-esnext', { {% Plain %} ```js -( function ( blocks, blockEditor, element ) { - var el = element.createElement; +( function ( blocks, blockEditor, React ) { + var el = React.createElement; var RichText = blockEditor.RichText; var useBlockProps = blockEditor.useBlockProps; @@ -162,7 +162,7 @@ registerBlockType( 'gutenberg-examples/example-03-editable-esnext', { ); }, } ); -} )( window.wp.blocks, window.wp.blockEditor, window.wp.element ); +} )( window.wp.blocks, window.wp.blockEditor, window.React ); ``` {% end %} diff --git a/docs/how-to-guides/block-tutorial/nested-blocks-inner-blocks.md b/docs/how-to-guides/block-tutorial/nested-blocks-inner-blocks.md index 8ab024a5c32e54..553b9c48425c37 100644 --- a/docs/how-to-guides/block-tutorial/nested-blocks-inner-blocks.md +++ b/docs/how-to-guides/block-tutorial/nested-blocks-inner-blocks.md @@ -41,8 +41,8 @@ registerBlockType( 'gutenberg-examples/example-06', { {% Plain %} ```js -( function ( blocks, element, blockEditor ) { - var el = element.createElement; +( function ( blocks, React, blockEditor ) { + var el = React.createElement; var InnerBlocks = blockEditor.InnerBlocks; var useBlockProps = blockEditor.useBlockProps; @@ -62,7 +62,7 @@ registerBlockType( 'gutenberg-examples/example-06', { return el( 'div', blockProps, el( InnerBlocks.Content ) ); }, } ); -} )( window.wp.blocks, window.wp.element, window.wp.blockEditor ); +} )( window.wp.blocks, window.React, window.wp.blockEditor ); ``` {% end %} @@ -241,8 +241,8 @@ registerBlockType( 'gutenberg-examples/example-06', { {% Plain %} ```js -( function ( blocks, element, blockEditor ) { - var el = element.createElement; +( function ( blocks, React, blockEditor ) { + var el = React.createElement; var InnerBlocks = blockEditor.InnerBlocks; var useBlockProps = blockEditor.useBlockProps; var useInnerBlocksProps = blockEditor.useInnerBlocksProps; @@ -265,7 +265,7 @@ registerBlockType( 'gutenberg-examples/example-06', { return el( 'div', blockProps, el( 'div', innerBlocksProps ) ); }, } ); -} )( window.wp.blocks, window.wp.element, window.wp.blockEditor ); +} )( window.wp.blocks, window.React, window.wp.blockEditor ); ``` {% end %} @@ -305,8 +305,8 @@ registerBlockType( 'gutenberg-examples/example-06', { {% Plain %} ```js -( function ( blocks, element, blockEditor ) { - var el = element.createElement; +( function ( blocks, React, blockEditor ) { + var el = React.createElement; var InnerBlocks = blockEditor.InnerBlocks; var useBlockProps = blockEditor.useBlockProps; var useInnerBlocksProps = blockEditor.useInnerBlocksProps; @@ -328,7 +328,7 @@ registerBlockType( 'gutenberg-examples/example-06', { return el( 'div', innerBlocksProps ); }, } ); -} )( window.wp.blocks, window.wp.element, window.wp.blockEditor ); +} )( window.wp.blocks, window.React, window.wp.blockEditor ); ``` {% end %} @@ -372,8 +372,8 @@ registerBlockType( 'gutenberg-examples/example-06', { {% Plain %} ```js -( function ( blocks, element, blockEditor ) { - var el = element.createElement; +( function ( blocks, React, blockEditor ) { + var el = React.createElement; var InnerBlocks = blockEditor.InnerBlocks; var useBlockProps = blockEditor.useBlockProps; var useInnerBlocksProps = blockEditor.useInnerBlocksProps; @@ -398,7 +398,7 @@ registerBlockType( 'gutenberg-examples/example-06', { }, // ... } ); -} )( window.wp.blocks, window.wp.element, window.wp.blockEditor ); +} )( window.wp.blocks, window.React, window.wp.blockEditor ); ``` {% end %} diff --git a/docs/how-to-guides/block-tutorial/writing-your-first-block-type.md b/docs/how-to-guides/block-tutorial/writing-your-first-block-type.md index 690a2f243f7050..a9dfc0d51a682c 100644 --- a/docs/how-to-guides/block-tutorial/writing-your-first-block-type.md +++ b/docs/how-to-guides/block-tutorial/writing-your-first-block-type.md @@ -7,7 +7,7 @@ This guide takes you through creating a basic block to display a message in a po There are two main types of blocks: static and dynamic, this guide focuses on static blocks. A static block is used to insert HTML content into the post and save it with the post. A dynamic block builds the content on the fly when rendered on the front end, see the [dynamic blocks guide](/docs/how-to-guides/block-tutorial/creating-dynamic-blocks.md).
-This guide focuses on just the block, see the [Create a Block tutorial](/docs/getting-started/create-block/README.md) for a complete setup. +This guide focuses on just the block, see the Create a Block tutorial for a complete setup.
## Before you start @@ -145,8 +145,8 @@ registerBlockType( 'gutenberg-examples/example-01-basic-esnext', { Add the following to `block.js` ```js -( function ( blocks, element ) { - var el = element.createElement; +( function ( blocks, React ) { + var el = React.createElement; blocks.registerBlockType( 'gutenberg-examples/example-01-basic', { edit: function () { @@ -156,7 +156,7 @@ Add the following to `block.js` return el( 'p', {}, 'Hola mundo (from the frontend).' ); }, } ); -} )( window.wp.blocks, window.wp.element ); +} )( window.wp.blocks, window.React ); ``` {% end %} @@ -182,8 +182,8 @@ Create the asset file to load the dependencies for the scripts. The name of this array( + 'react', 'wp-blocks', - 'wp-element', 'wp-polyfill' ), 'version' => '0.1' diff --git a/docs/how-to-guides/data-basics/1-data-basics-setup.md b/docs/how-to-guides/data-basics/1-data-basics-setup.md index d9abd07967c8ce..3657b65791a658 100644 --- a/docs/how-to-guides/data-basics/1-data-basics-setup.md +++ b/docs/how-to-guides/data-basics/1-data-basics-setup.md @@ -18,18 +18,18 @@ Go ahead and create these files using the following snippets: **src/index.js:** ```js -import { render } from '@wordpress/element'; +import { createRoot } from 'react-dom'; function MyFirstApp() { return Hello from JavaScript!; } +const root = createRoot( document.getElementById( 'my-first-gutenberg-app' ) ); window.addEventListener( 'load', function () { - render( + root.render( , - document.querySelector( '#my-first-gutenberg-app' ) ); }, false diff --git a/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md b/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md index 282578fbb66dce..aee5575cdb5adb 100644 --- a/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md +++ b/docs/how-to-guides/data-basics/2-building-a-list-of-pages.md @@ -150,8 +150,8 @@ The list of pages is short for now; however, the longer it grows, the harder it Let’s start by adding a search field: ```js +import { useState } from 'react'; import { SearchControl } from '@wordpress/components'; -import { useState, render } from '@wordpress/element'; function MyFirstApp() { const [searchTerm, setSearchTerm] = useState( '' ); @@ -211,8 +211,9 @@ The `searchTerm` is now used as a `search` query parameter when provided. Note t Finally, here’s how `MyFirstApp` looks once we wire it all together: ```js +import { useState } from 'react'; +import { createRoot } from 'react-dom'; import { SearchControl } from '@wordpress/components'; -import { useState, render } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; import { store as coreDataStore } from '@wordpress/core-data'; @@ -359,8 +360,9 @@ And voilà! That's it. All the pieces are in place, great! Here’s the complete JavaScript code of our app: ```js +import { useState } from 'react'; +import { createRoot } from 'react-dom'; import { SearchControl, Spinner } from '@wordpress/components'; -import { useState, render } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; import { store as coreDataStore } from '@wordpress/core-data'; import { decodeEntities } from '@wordpress/html-entities'; @@ -421,12 +423,14 @@ function PagesList( { hasResolved, pages } ) { ); } +const root = createRoot( + document.querySelector( '#my-first-gutenberg-app' ) +); window.addEventListener( 'load', function () { - render( - , - document.querySelector( '#my-first-gutenberg-app' ) + root.render( + ); }, false diff --git a/docs/how-to-guides/data-basics/5-adding-a-delete-button.md b/docs/how-to-guides/data-basics/5-adding-a-delete-button.md index 261c4bda071ab7..07b10ac822c546 100644 --- a/docs/how-to-guides/data-basics/5-adding-a-delete-button.md +++ b/docs/how-to-guides/data-basics/5-adding-a-delete-button.md @@ -142,7 +142,7 @@ wp.data.select( 'core' ).getLastEntityDeleteError( 'postType', 'page', 9 ) Here's how we can apply it in `DeletePageButton`: ```js -import { useEffect } from '@wordpress/element'; +import { useEffect } from 'react'; const DeletePageButton = ({ pageId }) => { // ... const { error, /* ... */ } = useSelect( @@ -252,8 +252,8 @@ Now we're ready to tell the user about any errors that may have occurred. With the SnackbarNotices component in place, we're ready to dispatch some notifications! Here's how: ```js +import { useEffect } from 'react'; import { store as noticesStore } from '@wordpress/notices'; -import { useEffect } from '@wordpress/element'; function DeletePageButton( { pageId } ) { const { createSuccessNotice, createErrorNotice } = useDispatch( noticesStore ); // useSelect returns a list of selectors if you pass the store handle @@ -307,8 +307,8 @@ And that's it! All the pieces are in place, great! Here’s all the changes we've made in this chapter: ```js +import { useState, useEffect } from 'react'; import { useSelect, useDispatch } from '@wordpress/data'; -import { useState, useEffect } from '@wordpress/element'; import { Button, Modal, TextControl } from '@wordpress/components'; function MyFirstApp() { diff --git a/docs/how-to-guides/internationalization.md b/docs/how-to-guides/internationalization.md index af68da27193355..c3194f309fca63 100644 --- a/docs/how-to-guides/internationalization.md +++ b/docs/how-to-guides/internationalization.md @@ -24,7 +24,7 @@ function myguten_block_init() { wp_register_script( 'myguten-script', plugins_url( 'block.js', __FILE__ ), - array( 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-block-editor' ) + array( 'wp-blocks', 'react', 'wp-i18n', 'wp-block-editor' ) ); register_block_type( 'myguten/simple', array( @@ -67,8 +67,8 @@ registerBlockType( 'myguten/simple', { {% Plain %} ```js +const el = React.createElement; const { __ } = wp.i18n; -const el = wp.element.createElement; const { registerBlockType } = wp.blocks; const { useBlockProps } = wp.blockEditor; diff --git a/docs/how-to-guides/javascript/js-build-setup.md b/docs/how-to-guides/javascript/js-build-setup.md index d6a2669da50378..b915f4dd444f90 100644 --- a/docs/how-to-guides/javascript/js-build-setup.md +++ b/docs/how-to-guides/javascript/js-build-setup.md @@ -153,7 +153,7 @@ Likewise, you do not need to include `node_modules` or any of the above configur ## Dependency Management Using `wp-scripts` ver 5.0.0+ build step will also produce an `index.asset.php` file that contains an array of dependencies and a version number for your block. For our simple example above, it is something like: -`array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'fc93c4a9675c108725227db345898bcc');` +`array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'fc93c4a9675c108725227db345898bcc');` Here is how to use this asset file to automatically set the dependency list for enqueuing the script. This prevents having to manually update the dependencies, it will be created based on the package imports used within your block. diff --git a/docs/how-to-guides/platform/custom-block-editor.md b/docs/how-to-guides/platform/custom-block-editor.md index bb2639ddf706fd..88dad59960d029 100644 --- a/docs/how-to-guides/platform/custom-block-editor.md +++ b/docs/how-to-guides/platform/custom-block-editor.md @@ -215,9 +215,11 @@ Begin by opening the main `src/index.js` file. Then pull in the required JavaScr ```js // File: src/index.js +// External dependencies. +import { createRoot } from 'react-dom'; + // WordPress dependencies. import domReady from '@wordpress/dom-ready'; -import { render } from '@wordpress/element'; import { registerCoreBlocks } from '@wordpress/block-library'; // Internal dependencies. @@ -233,11 +235,11 @@ Next, once the DOM is ready you will need to run a function which: ```jsx domReady( function () { + const root = createRoot( document.getElementById( 'getdave-sbe-block-editor' ) ); const settings = window.getdaveSbeSettings || {}; registerCoreBlocks(); - render( - , - document.getElementById( 'getdave-sbe-block-editor' ) + root.render( + ); } ); ``` diff --git a/docs/how-to-guides/plugin-sidebar-0.md b/docs/how-to-guides/plugin-sidebar-0.md index d7e767db93dd75..9543eaf8761549 100644 --- a/docs/how-to-guides/plugin-sidebar-0.md +++ b/docs/how-to-guides/plugin-sidebar-0.md @@ -16,15 +16,15 @@ The tutorial assumes you have an existing plugin setup and are ready to add PHP ### Step 1: Get a Sidebar up and Running -The first step is to tell the editor that there is a new plugin that will have its own sidebar. Use the [registerPlugin](/packages/plugins/README.md), [PluginSidebar](/packages/edit-post/README.md#pluginsidebar), and [createElement](/packages/element/README.md) utilities provided by the `@wordpress/plugins`, `@wordpress/edit-post`, and `@wordpress/element` packages, respectively. +The first step is to tell the editor that there is a new plugin that will have its own sidebar. Use the [registerPlugin](/packages/plugins/README.md), [PluginSidebar](/packages/edit-post/README.md#pluginsidebar), and [createElement](/packages/element/README.md) utilities provided by the `@wordpress/plugins`, `@wordpress/edit-post`, and `react` packages, respectively. Add the following code to a JavaScript file called `plugin-sidebar.js` and save it within your plugin's directory: ```js -( function ( wp ) { +( function ( wp, React ) { + var el = React.createElement; var registerPlugin = wp.plugins.registerPlugin; var PluginSidebar = wp.editPost.PluginSidebar; - var el = wp.element.createElement; registerPlugin( 'my-plugin-sidebar', { render: function () { @@ -39,10 +39,10 @@ Add the following code to a JavaScript file called `plugin-sidebar.js` and save ); }, } ); -} )( window.wp ); +} )( window.wp, window.React ); ``` -For this code to work, those utilities need to be available in the browser, so you must specify `wp-plugins`, `wp-edit-post`, and `wp-element` as dependencies of your script. +For this code to work, those utilities need to be available in the browser, so you must specify `wp-plugins`, `wp-edit-post`, and `react` as dependencies of your script. Here is the PHP code to register your script and specify the dependencies: @@ -57,7 +57,7 @@ function sidebar_plugin_register() { wp_register_script( 'plugin-sidebar-js', plugins_url( 'plugin-sidebar.js', __FILE__ ), - array( 'wp-plugins', 'wp-edit-post', 'wp-element' ) + array( 'wp-plugins', 'wp-edit-post', 'react' ) ); } add_action( 'init', 'sidebar_plugin_register' ); @@ -80,9 +80,9 @@ To visualize and edit the meta field value you'll use an input component. The `@ ```js ( function ( wp ) { + var el = React.createElement; var registerPlugin = wp.plugins.registerPlugin; var PluginSidebar = wp.editPost.PluginSidebar; - var el = wp.element.createElement; var TextControl = wp.components.TextControl; registerPlugin( 'my-plugin-sidebar', { @@ -142,9 +142,9 @@ function sidebar_plugin_register() { 'plugin-sidebar-js', plugins_url( 'plugin-sidebar.js', __FILE__ ), array( + 'react', 'wp-plugins', 'wp-edit-post', - 'wp-element', 'wp-components' ) ); @@ -200,9 +200,9 @@ With the field available in the editor store, it can now be surfaced to the UI. ```js ( function ( wp ) { + var el = React.createElement; var registerPlugin = wp.plugins.registerPlugin; var PluginSidebar = wp.editPost.PluginSidebar; - var el = wp.element.createElement; var TextControl = wp.components.TextControl; var MetaBlockField = function () { @@ -241,9 +241,9 @@ The `useSelect` function is used to fetch data when the component loads and will ```js ( function ( wp ) { + var el = React.createElement; var registerPlugin = wp.plugins.registerPlugin; var PluginSidebar = wp.editPost.PluginSidebar; - var el = wp.element.createElement; var Text = wp.components.TextControl; var useSelect = wp.data.useSelect; @@ -304,9 +304,9 @@ The `useDispatch` function takes a store name as its only argument and returns m ```js ( function ( wp ) { + var el = React.createElement; var registerPlugin = wp.plugins.registerPlugin; var PluginSidebar = wp.editPost.PluginSidebar; - var el = wp.element.createElement; var TextControl = wp.components.TextControl; var useSelect = wp.data.useSelect; var useDispatch = wp.data.useDispatch; diff --git a/docs/manifest.json b/docs/manifest.json index 7ceebaf69a4497..4108da22296efe 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -83,12 +83,6 @@ "markdown_source": "../docs/getting-started/create-block/submitting-to-block-directory.md", "parent": "create-block" }, - { - "title": "Full Site Editing", - "slug": "full-site-editing", - "markdown_source": "../docs/getting-started/full-site-editing.md", - "parent": "getting-started" - }, { "title": "Glossary", "slug": "glossary", @@ -498,7 +492,7 @@ "parent": "reference-guides" }, { - "title": "Block Hooks", + "title": "Block Filters", "slug": "block-filters", "markdown_source": "../docs/reference-guides/filters/block-filters.md", "parent": "filters" diff --git a/docs/reference-guides/README.md b/docs/reference-guides/README.md index 33fdd9aa602414..b9725af66f0804 100644 --- a/docs/reference-guides/README.md +++ b/docs/reference-guides/README.md @@ -18,7 +18,7 @@ ## [Hooks Reference](/docs/reference-guides/filters/README.md) -- [Block Hooks](/docs/reference-guides/filters/block-filters.md) +- [Block Filters](/docs/reference-guides/filters/block-filters.md) - [Editor Hooks](/docs/reference-guides/filters/editor-filters.md) - [i18n Hooks](/docs/reference-guides/filters/i18n-filters.md) - [Parser Hooks](/docs/reference-guides/filters/parser-filters.md) diff --git a/docs/reference-guides/block-api/block-deprecation.md b/docs/reference-guides/block-api/block-deprecation.md index d40c13c0406124..a1497ec346936d 100644 --- a/docs/reference-guides/block-api/block-deprecation.md +++ b/docs/reference-guides/block-api/block-deprecation.md @@ -104,7 +104,7 @@ registerBlockType( 'gutenberg/block-with-deprecated-version', { {% Plain %} ```js -var el = wp.element.createElement, +var el = React.createElement, registerBlockType = wp.blocks.registerBlockType, attributes = { text: { @@ -195,7 +195,7 @@ registerBlockType( 'gutenberg/block-with-deprecated-version', { {% Plain %} ```js -var el = wp.element.createElement, +var el = React.createElement, registerBlockType = wp.blocks.registerBlockType; registerBlockType( 'gutenberg/block-with-deprecated-version', { @@ -295,7 +295,7 @@ registerBlockType( 'gutenberg/block-with-deprecated-version', { {% Plain %} ```js -var el = wp.element.createElement, +var el = React.createElement, registerBlockType = wp.blocks.registerBlockType; registerBlockType( 'gutenberg/block-with-deprecated-version', { diff --git a/docs/reference-guides/block-api/block-edit-save.md b/docs/reference-guides/block-api/block-edit-save.md index f38573f35a5f25..35bbd5ae13e1e0 100644 --- a/docs/reference-guides/block-api/block-edit-save.md +++ b/docs/reference-guides/block-api/block-edit-save.md @@ -37,7 +37,7 @@ var blockSettings = { edit: function () { var blockProps = wp.blockEditor.useBlockProps(); - return wp.element.createElement( 'div', blockProps, 'Your block.' ); + return React.createElement( 'div', blockProps, 'Your block.' ); }, }; ``` @@ -85,7 +85,7 @@ var blockSettings = { className: 'my-random-classname', } ); - return wp.element.createElement( 'div', blockProps, 'Your block.' ); + return React.createElement( 'div', blockProps, 'Your block.' ); }, }; ``` @@ -117,7 +117,7 @@ edit: ( { attributes } ) => { edit: function( props ) { var blockProps = wp.blockEditor.useBlockProps(); - return wp.element.createElement( + return React.createElement( 'div', blockProps, props.attributes.content @@ -157,12 +157,12 @@ edit: ( { attributes, isSelected } ) => { edit: function( props ) { var blockProps = wp.blockEditor.useBlockProps(); - return wp.element.createElement( + return React.createElement( 'div', blockProps, [ 'Your block.', - props.isSelected ? wp.element.createElement( + props.isSelected ? React.createElement( 'span', null, 'Shows only when the block is selected.' @@ -213,12 +213,12 @@ edit: function( props ) { // Toggle a setting when the user clicks the button let toggleSetting = () => props.setAttributes( { mySetting: ! mySetting } ); - return wp.element.createElement( + return React.createElement( 'div', blockProps, [ content, - props.isSelected ? wp.element.createElement( + props.isSelected ? React.createElement( 'button', { onClick: toggleSetting }, 'Toggle setting' @@ -292,7 +292,7 @@ save: () => { save: function() { var blockProps = wp.blockEditor.useBlockProps.save(); - return wp.element.createElement( + return React.createElement( 'div', blockProps, 'Your block.' @@ -343,7 +343,7 @@ save: ( { attributes } ) => { save: function( props ) { var blockProps = wp.blockEditor.useBlockProps.save(); - return wp.element.createElement( + return React.createElement( 'div', blockProps, props.attributes.content @@ -413,10 +413,10 @@ edit: function( props ) { props.setAttributes( { content: val } ); } - return wp.element.createElement( + return React.createElement( 'div', blockProps, - wp.element.createElement( + React.createElement( wp.components.TextControl, { label: 'My Text Field', @@ -431,7 +431,7 @@ edit: function( props ) { save: function( props ) { var blockProps = wp.blockEditor.useBlockProps.save(); - return wp.element.createElement( 'div', blockProps, props.attributes.content ); + return React.createElement( 'div', blockProps, props.attributes.content ); }, ``` @@ -486,10 +486,10 @@ attributes: { edit: function( props ) { var blockProps = wp.blockEditor.useBlockProps(); - return wp.element.createEleement( + return React.createEleement( 'div', blockProps, - wp.element.createElement( + React.createElement( wp.components.TextControl, { label: 'Number Posts to Show', diff --git a/docs/reference-guides/block-api/block-metadata.md b/docs/reference-guides/block-api/block-metadata.md index 22d9d66b4f4626..f380683f39ccdd 100644 --- a/docs/reference-guides/block-api/block-metadata.md +++ b/docs/reference-guides/block-api/block-metadata.md @@ -697,8 +697,8 @@ In `build/index.asset.php`: array( + 'react', 'wp-blocks', - 'wp-element', 'wp-i18n', ), 'version' => '3be55b05081a63d8f9d0ecb466c42cfd', diff --git a/docs/reference-guides/block-api/block-templates.md b/docs/reference-guides/block-api/block-templates.md index 2d8a21d510691c..b71625082a4d61 100644 --- a/docs/reference-guides/block-api/block-templates.md +++ b/docs/reference-guides/block-api/block-templates.md @@ -35,7 +35,7 @@ add_action( 'init', 'myplugin_register_template' ); The following example in JavaScript creates a new block using [InnerBlocks](https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md) and templates, when inserted creates a set of blocks based off the template. ```js -const el = wp.element.createElement; +const el = React.createElement; const { registerBlockType } = wp.blocks; const { InnerBlocks } = wp.blockEditor; diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 98a744e30cf021..a7570bf590a397 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -239,7 +239,7 @@ Add an image or video with a text overlay. ([Source](https://github.com/WordPres - **Name:** core/cover - **Category:** media - **Supports:** align, anchor, color (heading, text, ~~background~~, ~~enableContrastChecker~~), layout (~~allowJustification~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, minHeight, minHeightUnit, overlayColor, tagName, templateLock, url, useFeaturedImage +- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, isUserOverlayColor, minHeight, minHeightUnit, overlayColor, tagName, templateLock, url, useFeaturedImage ## Details @@ -270,7 +270,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb ## Footnotes - ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/footnotes)) +Display footnotes added to the page. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/footnotes)) - **Name:** core/footnotes - **Category:** text @@ -384,7 +384,7 @@ Show login & logout links. ([Source](https://github.com/WordPress/gutenberg/tree - **Name:** core/loginout - **Category:** theme -- **Supports:** className, typography (fontSize, lineHeight) +- **Supports:** className, spacing (margin, padding), typography (fontSize, lineHeight) - **Attributes:** displayLoginAsForm, redirectToCurrent ## Media & Text diff --git a/docs/reference-guides/data/data-core-customize-widgets.md b/docs/reference-guides/data/data-core-customize-widgets.md index 78433e8991a81c..8796f4cfea5ddf 100644 --- a/docs/reference-guides/data/data-core-customize-widgets.md +++ b/docs/reference-guides/data/data-core-customize-widgets.md @@ -50,11 +50,11 @@ Returns an action object used to open/close the inserter. _Usage_ ```js +import { useState } from 'react'; import { store as customizeWidgetsStore } from '@wordpress/customize-widgets'; import { __ } from '@wordpress/i18n'; import { useDispatch } from '@wordpress/data'; import { Button } from '@wordpress/components'; -import { useState } from '@wordpress/element'; const ExampleComponent = () => { const { setIsInserterOpened } = useDispatch( customizeWidgetsStore ); diff --git a/docs/reference-guides/data/data-core-keyboard-shortcuts.md b/docs/reference-guides/data/data-core-keyboard-shortcuts.md index 076333720786ed..613c5e009e8b07 100644 --- a/docs/reference-guides/data/data-core-keyboard-shortcuts.md +++ b/docs/reference-guides/data/data-core-keyboard-shortcuts.md @@ -350,9 +350,9 @@ Returns an action object used to register a new keyboard shortcut. _Usage_ ```js +import { useEffect } from 'react'; import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; import { useSelect, useDispatch } from '@wordpress/data'; -import { useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; const ExampleComponent = () => { @@ -401,9 +401,9 @@ Returns an action object used to unregister a keyboard shortcut. _Usage_ ```js +import { useEffect } from 'react'; import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; import { useSelect, useDispatch } from '@wordpress/data'; -import { useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; const ExampleComponent = () => { diff --git a/docs/reference-guides/filters/autocomplete-filters.md b/docs/reference-guides/filters/autocomplete-filters.md index 1b00710b7b0ba7..1ce47219529181 100644 --- a/docs/reference-guides/filters/autocomplete-filters.md +++ b/docs/reference-guides/filters/autocomplete-filters.md @@ -66,7 +66,7 @@ var acronymCompleter = { return acronym.letters; }, getOptionCompletion: function ( abbr ) { - return wp.element.createElement( + return React.createElement( 'abbr', { title: abbr.expansion }, abbr.letters diff --git a/docs/reference-guides/filters/block-filters.md b/docs/reference-guides/filters/block-filters.md index 66e89b0a1d614a..3b3846abbcfb5a 100644 --- a/docs/reference-guides/filters/block-filters.md +++ b/docs/reference-guides/filters/block-filters.md @@ -1,4 +1,4 @@ -# Block Hooks +# Block Filters To modify the behavior of existing blocks, WordPress exposes several APIs. @@ -85,7 +85,7 @@ The following filters are available to change the behavior of blocks while editi ### `blocks.getSaveElement` -A filter that applies to the result of a block's `save` function. This filter is used to replace or extend the element, for example using `wp.element.cloneElement` to modify the element's props or replace its children, or returning an entirely new element. +A filter that applies to the result of a block's `save` function. This filter is used to replace or extend the element, for example using `React.cloneElement` to modify the element's props or replace its children, or returning an entirely new element. The filter's callback receives an element, a block type definition object and the block attributes as arguments. It should return an element. @@ -210,14 +210,14 @@ wp.hooks.addFilter( {% Plain %} ```js -var el = wp.element.createElement; +var el = React.createElement; var withInspectorControls = wp.compose.createHigherOrderComponent( function ( BlockEdit ) { return function ( props ) { return el( - wp.element.Fragment, + React.Fragment, {}, el( BlockEdit, props ), el( @@ -275,7 +275,7 @@ wp.hooks.addFilter( {% Plain %} ```js -var el = wp.element.createElement; +var el = React.createElement; var withClientIdClassName = wp.compose.createHigherOrderComponent( function ( BlockListBlock @@ -328,7 +328,7 @@ wp.hooks.addFilter( {% Plain %} ```js -var el = wp.element.createElement; +var el = React.createElement; var hoc = wp.compose.createHigherOrderComponent; var withMyWrapperProp = hoc( function ( BlockListBlock ) { @@ -482,7 +482,7 @@ To set an SVG icon for the category shown in the previous example, add the follo ```js ( function () { - var el = wp.element.createElement; + var el = React.createElement; var SVG = wp.primitives.SVG; var circle = el( 'circle', { cx: 10, diff --git a/docs/reference-guides/packages.md b/docs/reference-guides/packages.md index bd1edf1ae629aa..7dbe06769c42e9 100644 --- a/docs/reference-guides/packages.md +++ b/docs/reference-guides/packages.md @@ -12,7 +12,7 @@ If you wanted to use the `PlainText` component from the block editor module, fir wp_enqueue_script( 'my-custom-block', plugins_url( $block_path, __FILE__ ), - array( 'wp-blocks', 'wp-block-editor', 'wp-element', 'wp-i18n' ) + array( 'react', 'wp-blocks', 'wp-block-editor', 'wp-i18n' ) ); ``` diff --git a/docs/reference-guides/richtext.md b/docs/reference-guides/richtext.md index e0b73826308f16..f908c7585bc1b8 100644 --- a/docs/reference-guides/richtext.md +++ b/docs/reference-guides/richtext.md @@ -83,7 +83,7 @@ wp.blocks.registerBlockType( /* ... */, { edit: function( props ) { var blockProps = wp.blockEditor.useBlockProps(); - return wp.element.createElement( wp.blockEditor.RichText, Object.assign( blockProps, { + return React.createElement( wp.blockEditor.RichText, Object.assign( blockProps, { tagName: 'h2', // The tag here is the element output and editable in the admin value: props.attributes.content, // Any existing content, either from the database or an attribute default allowedFormats: [ 'core/bold', 'core/italic' ], // Allow the content to be made bold or italic, but do not allow other formatting options @@ -97,7 +97,7 @@ wp.blocks.registerBlockType( /* ... */, { save: function( props ) { var blockProps = wp.blockEditor.useBlockProps.save(); - return wp.element.createElement( wp.blockEditor.RichText.Content, Object.assign( blockProps, { + return React.createElement( wp.blockEditor.RichText.Content, Object.assign( blockProps, { tagName: 'h2', value: props.attributes.content // Saves

Content added in the editor...

to the database for frontend display } ) ); } diff --git a/docs/toc.json b/docs/toc.json index c9f24dd9fad708..621fd7c48c7c9f 100644 --- a/docs/toc.json +++ b/docs/toc.json @@ -42,7 +42,6 @@ } ] }, - { "docs/getting-started/full-site-editing.md": [] }, { "docs/getting-started/glossary.md": [] }, { "docs/getting-started/faq.md": [] } ] diff --git a/docs/tool/manifest.js b/docs/tool/manifest.js index b061fa5149c698..ced8866edd5a4e 100644 --- a/docs/tool/manifest.js +++ b/docs/tool/manifest.js @@ -11,7 +11,6 @@ const componentPaths = glob( 'packages/components/src/*/**/README.md', { // Don't expose documentation for mobile only and G2 components just yet. ignore: [ '**/src/mobile/**/README.md', - '**/src/ui/**/README.md', 'packages/components/src/theme/README.md', 'packages/components/src/view/README.md', 'packages/components/src/dropdown-menu-v2/README.md', diff --git a/gutenberg.php b/gutenberg.php index 85a799110597b7..eea2231a57183a 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -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.2 * Requires PHP: 7.0 - * Version: 16.7.0-rc.1 + * Version: 16.8.0-rc.1 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/lib/block-supports/background.php b/lib/block-supports/background.php index a32ee72fd90c6d..b4779b1a150e46 100644 --- a/lib/block-supports/background.php +++ b/lib/block-supports/background.php @@ -41,7 +41,7 @@ function gutenberg_register_background_support( $block_type ) { */ function gutenberg_render_background_support( $block_content, $block ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); - $block_attributes = $block['attrs']; + $block_attributes = ( isset( $block['attrs'] ) && is_array( $block['attrs'] ) ) ? $block['attrs'] : array(); $has_background_image_support = block_has_support( $block_type, array( 'background', 'backgroundImage' ), false ); if ( @@ -78,8 +78,11 @@ function gutenberg_render_background_support( $block_content, $block ) { $existing_style = $tags->get_attribute( 'style' ); $updated_style = ''; - if ( ! empty( $existing_style ) && ! str_ends_with( $existing_style, ';' ) ) { - $updated_style = $existing_style . '; '; + if ( ! empty( $existing_style ) ) { + $updated_style = $existing_style; + if ( ! str_ends_with( $existing_style, ';' ) ) { + $updated_style .= ';'; + } } $updated_style .= $styles['css']; diff --git a/lib/block-supports/behaviors.php b/lib/block-supports/behaviors.php index cf668ed22d8875..6f442d7b0d2d7c 100644 --- a/lib/block-supports/behaviors.php +++ b/lib/block-supports/behaviors.php @@ -233,7 +233,9 @@ function gutenberg_render_behaviors_support_lightbox( $block_content, $block ) { data-wp-bind--aria-modal="context.core.image.lightboxEnabled" data-wp-effect="effects.core.image.initLightbox" data-wp-on--keydown="actions.core.image.handleKeydown" - data-wp-on--mousewheel="actions.core.image.hideLightbox" + data-wp-on--touchstart="actions.core.image.handleTouchStart" + data-wp-on--touchmove="actions.core.image.handleTouchMove" + data-wp-on--touchend="actions.core.image.handleTouchEnd" data-wp-on--click="actions.core.image.hideLightbox" >