diff --git a/.eslintrc.js b/.eslintrc.js
index 9933b831e4725a..eb5b2c6dccf201 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -44,123 +44,7 @@ const restrictedImports = [
},
{
name: 'lodash',
- importNames: [
- 'camelCase',
- 'capitalize',
- 'castArray',
- 'chunk',
- 'clamp',
- 'clone',
- 'cloneDeep',
- 'compact',
- 'concat',
- 'countBy',
- 'debounce',
- 'deburr',
- 'defaults',
- 'defaultTo',
- 'delay',
- 'difference',
- 'differenceWith',
- 'dropRight',
- 'each',
- 'escape',
- 'escapeRegExp',
- 'every',
- 'extend',
- 'filter',
- 'find',
- 'findIndex',
- 'findKey',
- 'findLast',
- 'first',
- 'flatMap',
- 'flatten',
- 'flattenDeep',
- 'flow',
- 'flowRight',
- 'forEach',
- 'fromPairs',
- 'groupBy',
- 'has',
- 'identity',
- 'includes',
- 'invoke',
- 'isArray',
- 'isBoolean',
- 'isEmpty',
- 'isEqual',
- 'isFinite',
- 'isFunction',
- 'isMatch',
- 'isNil',
- 'isNumber',
- 'isObject',
- 'isObjectLike',
- 'isPlainObject',
- 'isString',
- 'isUndefined',
- 'kebabCase',
- 'keyBy',
- 'keys',
- 'last',
- 'lowerCase',
- 'map',
- 'mapKeys',
- 'mapValues',
- 'maxBy',
- 'memoize',
- 'merge',
- 'mergeWith',
- 'negate',
- 'noop',
- 'nth',
- 'omit',
- 'omitBy',
- 'once',
- 'orderby',
- 'overEvery',
- 'partial',
- 'partialRight',
- 'pick',
- 'pickBy',
- 'random',
- 'reduce',
- 'reject',
- 'repeat',
- 'reverse',
- 'setWith',
- 'size',
- 'snakeCase',
- 'some',
- 'sortBy',
- 'startCase',
- 'startsWith',
- 'stubFalse',
- 'stubTrue',
- 'sum',
- 'sumBy',
- 'take',
- 'throttle',
- 'times',
- 'toString',
- 'trim',
- 'truncate',
- 'unescape',
- 'unionBy',
- 'uniq',
- 'uniqBy',
- 'uniqueId',
- 'uniqWith',
- 'upperFirst',
- 'values',
- 'without',
- 'words',
- 'xor',
- 'zip',
- ],
- message:
- 'This Lodash method is not recommended. Please use native functionality instead. If using `memoize`, please use `memize` instead.',
+ message: 'Please use native functionality instead.',
},
{
name: 'reakit',
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 7ba9e884259ea4..4008efa1b4d4e1 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -88,6 +88,7 @@
/packages/compose @ajitbohra
/packages/element @ajitbohra
/packages/notices @ajitbohra
+/packages/nux @ajitbohra @peterwilsoncc
/packages/viewport @ajitbohra
/packages/base-styles
/packages/icons
diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml
index 9052f1689c9216..f57ccd21e361e8 100644
--- a/.github/workflows/build-plugin-zip.yml
+++ b/.github/workflows/build-plugin-zip.yml
@@ -56,7 +56,7 @@ jobs:
github.event.inputs.version == 'rc' ||
github.event.inputs.version == 'stable'
) || (
- endsWith( github.ref, needs.compute-stable-branches.outputs.current_stable_branch ) &&
+ startsWith( github.ref, 'refs/heads/release/' ) &&
github.event.inputs.version == 'stable'
)
)
diff --git a/.github/workflows/php-changes-detection.yml b/.github/workflows/php-changes-detection.yml
new file mode 100644
index 00000000000000..be1e686483f5b3
--- /dev/null
+++ b/.github/workflows/php-changes-detection.yml
@@ -0,0 +1,100 @@
+name: OPTIONAL - Confirm if PHP changes require backporting to WordPress Core
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+jobs:
+ detect_php_changes:
+ name: Detect PHP changes
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
+ steps:
+ - name: Check out code
+ uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
+ with:
+ fetch-depth: 0
+
+ - name: Get changed PHP files
+ id: changed-files-php
+ uses: tj-actions/changed-files@v37
+ with:
+ files: |
+ *.{php}
+ lib/**
+ phpunit/**
+
+ - name: List all changed files
+ if: steps.changed-files-php.outputs.any_changed == 'true'
+ id: list-changed-php-files
+ run: |
+ echo "Changed files:"
+ formatted_change_list=""
+ for file in ${{ steps.changed-files-php.outputs.all_changed_files }}; do
+ echo "$file was changed"
+ formatted_change_list+=" :grey_question: $file"
+ done
+ formatted_change_list+=" "
+ echo "formatted_change_list=$formatted_change_list" >> $GITHUB_OUTPUT
+
+ - name: Find Comment
+ uses: peter-evans/find-comment@v2
+ id: find-comment
+ with:
+ issue-number: ${{ github.event.pull_request.number }}
+ comment-author: 'github-actions[bot]'
+ body-includes: ''
+
+ - name: Create comment
+ if: steps.find-comment.outputs.comment-id == '' && steps.changed-files-php.outputs.any_changed == 'true'
+ uses: peter-evans/create-or-update-comment@v3
+ with:
+ issue-number: ${{ github.event.pull_request.number }}
+ body: |
+
+ This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.
+
+ If so, it is recommended to create a [new Trac ticket](https://core.trac.wordpress.org/newticket) and submit a pull request to the [WordPress Core Github repository](https://github.com/WordPress/wordpress-develop) soon after this pull request is merged.
+
+ If you're unsure, you can always ask for help in the #core-editor channel in [WordPress Slack](https://make.wordpress.org/chat/).
+
+ Thank you! :heart:
+
+
+ View changed files
+ ${{ steps.list-changed-php-files.outputs.formatted_change_list }}
+
+
+ - name: Update comment
+ if: steps.find-comment.outputs.comment-id != '' && steps.changed-files-php.outputs.any_changed == 'true'
+ uses: peter-evans/create-or-update-comment@v3
+ with:
+ comment-id: ${{ steps.find-comment.outputs.comment-id }}
+ issue-number: ${{ github.event.pull_request.number }}
+ edit-mode: replace
+ body: |
+
+ This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.
+
+ If so, it is recommended to create a [new Trac ticket](https://core.trac.wordpress.org/newticket) and submit a pull request to the [WordPress Core Github repository](https://github.com/WordPress/wordpress-develop) soon after this pull request is merged.
+
+ If you're unsure, you can always ask for help in the #core-editor channel in [WordPress Slack](https://make.wordpress.org/chat/).
+
+ Thank you! :heart:
+
+
+ View changed files
+ ${{ steps.list-changed-php-files.outputs.formatted_change_list }}
+
+
+ - name: Update comment
+ if: steps.find-comment.outputs.comment-id != '' && steps.changed-files-php.outputs.any_changed != 'true'
+ uses: peter-evans/create-or-update-comment@v3
+ with:
+ comment-id: ${{ steps.find-comment.outputs.comment-id }}
+ issue-number: ${{ github.event.pull_request.number }}
+ edit-mode: replace
+ body: |
+
+ This pull request changed or added PHP files in previous commits, but none have been detected in the latest commit.
+
+ Thank you! :heart:
diff --git a/.github/workflows/stale-issue-gardening.yml b/.github/workflows/stale-issue-gardening.yml
index 078108a182850e..da823198ed806f 100644
--- a/.github/workflows/stale-issue-gardening.yml
+++ b/.github/workflows/stale-issue-gardening.yml
@@ -38,7 +38,7 @@ jobs:
days-before-stale: 180
days-before-close: -1
remove-stale-when-updated: false
- stale-issue-label: 'Needs Testing'
+ stale-issue-label: 'Needs check-in'
steps:
- name: Update issues
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 9c93b6b93d98dc..09494f0d514ad4 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -85,7 +85,6 @@ jobs:
fail-fast: true
matrix:
php:
- - '5.6'
- '7.0'
- '7.1'
- '7.2'
@@ -297,4 +296,4 @@ jobs:
run: npx lerna run build
- name: Running the tests
- run: npm run native test -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"
+ run: npm run test:native -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"
diff --git a/.github/workflows/upload-release-to-plugin-repo.yml b/.github/workflows/upload-release-to-plugin-repo.yml
index 392cf912e8db54..521fd3a786f15e 100644
--- a/.github/workflows/upload-release-to-plugin-repo.yml
+++ b/.github/workflows/upload-release-to-plugin-repo.yml
@@ -5,10 +5,66 @@ on:
types: [published]
jobs:
+ compute-should-update-trunk:
+ name: Decide if trunk or tag
+ runs-on: ubuntu-latest
+ # Skip this job if the release is a release candidate. This will in turn skip
+ # the upload jobs, which are only relevant for non-RC releases.
+ # We first check if the release is a prerelease, and then if the ref contains
+ # the string "rc". The latter is fallback in case the deployer accidentally
+ # unchecks the "This is a pre-release" checkbox in the release UI.
+ if: |
+ !github.event.release.prerelease && !contains(github.ref, 'rc')
+
+ outputs:
+ should_update_trunk: ${{ steps.compute_should_update_trunk.outputs.should_update_trunk }}
+
+ steps:
+ - name: Fetch latest version in the WP core repo
+ id: compute_latest_version_in_core_repo
+ run: |
+ latest_version_in_core_repo=$(curl -s 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request\[slug\]=gutenberg' | jq -r '.version')
+ echo "Latest Core Repo version: $latest_version_in_core_repo"
+ echo "version=$latest_version_in_core_repo" >> $GITHUB_OUTPUT
+
+ - name: Decide if it is a trunk or tag update
+ id: compute_should_update_trunk
+ env:
+ GITHUB_REF: ${{ github.ref }}
+ run: |
+ latestPublishedVersion=$(echo "$GITHUB_REF" | sed -E 's/refs\/tags\/(v?)([0-9.]+)/\2/')
+ latestVersionInCoreRepo="${{ steps.compute_latest_version_in_core_repo.outputs.version }}"
+
+ # Determines if the first version string is greater than the second version string.
+ #
+ # Params:
+ # $1 - The first version string to compare, which may have an optional leading "v".
+ # $2 - The second version string to compare, which may have an optional leading "v".
+ #
+ # Return values:
+ # 0 - The first version string is greater than the second version string.
+ # 1 - The first version string is less than or equal to the second version string.
+ is_first_version_greater_than_second() {
+ v1=${1#v}
+ v2=${2#v}
+ dpkg --compare-versions "$v1" gt "$v2"
+ return $?
+ }
+
+ # Only update trunk *if* the published release's version in Github is GREATER
+ # than the version currently published in the WP plugins repo. If not, then it
+ # will upload it as a new tag.
+ shouldUpdateTrunk=false
+ if is_first_version_greater_than_second "$latestPublishedVersion" "$latestVersionInCoreRepo"; then
+ shouldUpdateTrunk=true
+ fi
+
+ echo "Should update trunk: $shouldUpdateTrunk"
+ echo "should_update_trunk=$shouldUpdateTrunk" >> $GITHUB_OUTPUT
+
get-release-branch:
name: Get release branch name
runs-on: ubuntu-latest
- if: github.event.release.assets[0]
outputs:
release_branch: ${{ steps.get_release_branch.outputs.release_branch }}
@@ -25,7 +81,8 @@ jobs:
update-changelog:
name: Update Changelog on ${{ matrix.branch }} branch
runs-on: ubuntu-latest
- if: github.event.release.assets[0]
+ if: |
+ github.event.release.assets[0]
needs: get-release-branch
env:
TAG: ${{ github.event.release.tag_name }}
@@ -95,11 +152,12 @@ jobs:
path: ./changelog.txt
upload:
- name: Upload Gutenberg Plugin
+ name: Publish as trunk (and tag)
runs-on: ubuntu-latest
environment: wp.org plugin
- needs: update-changelog
- if: ${{ !github.event.release.prerelease && github.event.release.assets[0] }}
+ needs: [compute-should-update-trunk, update-changelog]
+ if: |
+ needs.compute-should-update-trunk.outputs.should_update_trunk == 'true' && github.event.release.assets[0]
env:
PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg'
STABLE_VERSION_REGEX: '[0-9]\+\.[0-9]\+\.[0-9]\+\s*'
@@ -109,11 +167,7 @@ jobs:
steps:
- name: Check out Gutenberg trunk from WP.org plugin repo
- run: svn checkout "$PLUGIN_REPO_URL/trunk"
-
- - name: Get previous stable version
- id: get_previous_stable_version
- run: echo "stable_version=$(awk -F ':\ ' '$1 == "Stable tag" {print $2}' ./trunk/readme.txt)" >> $GITHUB_OUTPUT
+ run: svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Delete everything
working-directory: ./trunk
@@ -130,8 +184,8 @@ jobs:
- name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
env:
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
- STABLE_TAG: 'Stable tag: ${{ steps.get_previous_stable_version.outputs.stable_version }}'
- run: sed -i "s/${STABLE_TAG_PLACEHOLDER}/${STABLE_TAG}/g" ./trunk/readme.txt
+ run: |
+ sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./trunk/readme.txt
- name: Download Changelog Artifact
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
@@ -159,3 +213,44 @@ jobs:
sed -i "s/Stable tag: ${STABLE_VERSION_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt
svn commit -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+
+ upload-tag:
+ name: Publish as tag
+ runs-on: ubuntu-latest
+ environment: wp.org plugin
+ needs: [compute-should-update-trunk, update-changelog]
+ if: |
+ needs.compute-should-update-trunk.outputs.should_update_trunk == 'false' && github.event.release.assets[0]
+ env:
+ PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg'
+ STABLE_VERSION_REGEX: '[0-9]\+\.[0-9]\+\.[0-9]\+\s*'
+ SVN_USERNAME: ${{ secrets.svn_username }}
+ SVN_PASSWORD: ${{ secrets.svn_password }}
+ VERSION: ${{ github.event.release.name }}
+
+ steps:
+ - name: Download and unzip Gutenberg plugin asset into tags folder
+ env:
+ PLUGIN_URL: ${{ github.event.release.assets[0].browser_download_url }}
+ run: |
+ # do the magic here
+ curl -L -o gutenberg.zip $PLUGIN_URL
+ unzip gutenberg.zip -d "$VERSION"
+ rm gutenberg.zip
+
+ - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
+ env:
+ STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
+ run: |
+ sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" "$VERSION/readme.txt"
+
+ - name: Download Changelog Artifact
+ uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
+ with:
+ name: changelog trunk
+ path: ${{ github.event.release.name }}
+
+ - name: Add the new version directory and commit changes to the SVN repository
+ run: |
+ svn import "$VERSION" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Committing version $VERSION" \
+ --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
diff --git a/.gitignore b/.gitignore
index 19e43aecea7b82..b44eabe00cccc7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,7 +35,7 @@ yarn.lock
Thumbs.db
# Report generated from jest-junit
-test/native/junit.xml
+junit.xml
# Local overrides
.wp-env.override.json
diff --git a/bin/cherry-pick.mjs b/bin/cherry-pick.mjs
index 36829db6ee5cf8..baf8d42962f8e8 100644
--- a/bin/cherry-pick.mjs
+++ b/bin/cherry-pick.mjs
@@ -114,12 +114,25 @@ async function fetchPRs() {
const { items } = await GitHubFetch(
`/search/issues?q=is:pr state:closed sort:updated label:"${ LABEL }" repo:WordPress/gutenberg`
);
- const PRs = items.map( ( { id, number, title } ) => ( {
+ const PRs = items.map( ( { id, number, title, pull_request, closed_at } ) => ( {
id,
number,
title,
- } ) );
- console.log( 'Found the following PRs to cherry-pick: ' );
+ closed_at,
+ pull_request,
+ } ) ).sort( ( a, b ) => {
+ /*
+ * `closed_at` and `pull_request.merged_at` are _usually_ the same,
+ * but let's prefer the latter if it's available.
+ */
+ if ( a?.pull_request?.merged_at && b?.pull_request?.merged_at ) {
+ return new Date( a?.pull_request?.merged_at ) - new Date( b?.pull_request?.merged_at );
+ }
+ return new Date( a.closed_at ) - new Date( b.closed_at );
+ } );
+
+
+ console.log( 'Found the following PRs to cherry-pick (sorted by closed date in ascending order): ' );
PRs.forEach( ( { number, title } ) =>
console.log( indent( `#${ number } – ${ title }` ) )
);
diff --git a/bin/test-create-block.sh b/bin/test-create-block.sh
index e17bdbb2d66946..7959334a8e30ec 100755
--- a/bin/test-create-block.sh
+++ b/bin/test-create-block.sh
@@ -55,7 +55,7 @@ if [ "$expected" -ne "$actual" ]; then
error "Expected $expected files in the project root, but found $actual."
exit 1
fi
-expected=6
+expected=7
actual=$( find src -maxdepth 1 -type f | wc -l )
if [ "$expected" -ne "$actual" ]; then
error "Expected $expected files in the \`src\` directory, but found $actual."
@@ -69,7 +69,7 @@ status "Building block..."
../node_modules/.bin/wp-scripts build
status "Verifying build..."
-expected=5
+expected=7
actual=$( find build -maxdepth 1 -type f | wc -l )
if [ "$expected" -ne "$actual" ]; then
error "Expected $expected files in the \`build\` directory, but found $actual."
diff --git a/changelog.txt b/changelog.txt
index e011668bc7e00c..375a1d7199ece0 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,719 @@
== Changelog ==
+= 16.2.1 =
+
+## Changelog
+
+### Enhancements
+
+#### Footnotes
+- Footnotes: show in inserter and placeholder. ([52445](https://github.com/WordPress/gutenberg/pull/52445))
+
+### Bug Fixes
+
+#### Patterns
+- Make Pattern title text clickable. ([52599](https://github.com/WordPress/gutenberg/pull/52599))
+
+## Contributors
+
+The following contributors merged PRs in this release:
+
+@getdave @mcsf
+
+
+= 16.2.0 =
+
+## Changelog
+
+### Bug Fixes
+
+- Library - make pattern title clickable. ([51898](https://github.com/WordPress/gutenberg/pull/51898))
+
+#### Block Library
+- Allow editing existing footnote from RichText formats toolbar. ([52506](https://github.com/WordPress/gutenberg/pull/52506))
+- Revert "Post editor: Require confirmation before removing Footnotes (#52277)". ([52486](https://github.com/WordPress/gutenberg/pull/52486))
+- Trim footnote anchors from excerpts. ([52518](https://github.com/WordPress/gutenberg/pull/52518))
+
+#### Interactivity API
+- Fix md5 class messed up with new block key. ([52557](https://github.com/WordPress/gutenberg/pull/52557))
+
+#### Block Editor
+- Site Editor: Restore quick inserter 'Browse all' button. ([52529](https://github.com/WordPress/gutenberg/pull/52529))
+
+#### Patterns
+- Check that core hasn't already moved sync status meta before moving and unsetting. ([52494](https://github.com/WordPress/gutenberg/pull/52494))
+
+
+### Various
+
+- Rename block theme activation nonce variable. ([52398](https://github.com/WordPress/gutenberg/pull/52398))
+
+
+
+
+## Contributors
+
+The following contributors merged PRs in this release:
+
+@getdave @glendaviesnz @luisherranz @Mamaduka @mcsf @peterwilsoncc @priethor
+= 16.2.0-rc.3 =
+
+## Changelog
+
+### Bug Fixes
+
+#### Build Tooling
+- Revert phpcs testVersion back to PHP 5.6. ([52384](https://github.com/WordPress/gutenberg/pull/52384))
+
+
+= 16.2.0-rc.2 =
+
+## Changelog
+
+### Bug Fixes
+
+#### Block Library
+- RichText/Footnotes: Make getRichTextValues work with InnerBlocks.Content. ([52241](https://github.com/WordPress/gutenberg/pull/52241))
+
+#### Blocks
+- Post and Comment Template blocks: Change render_block_context priority to 1 (https://github.com/WordPress/gutenberg/pull/52364)
+- Footnotes: Fix incorrect anchor position in Firefox (https://github.com/WordPress/gutenberg/pull/52425)
+- Footnotes: fix lingering format boundary attr (https://github.com/WordPress/gutenberg/pull/52439)
+- Footnotes: save numbering through the entity provider (https://github.com/WordPress/gutenberg/pull/52423)
+
+#### Code Quality / Performance
+- Iframe: avoid asset parsing & fix script localisation
+
+## Contributors
+
+The following contributors merged PRs in this release:
+
+@ellatrix @ockham @t-hamano
+
+
+= 16.2.0-rc.1 =
+
+
+
+## Changelog
+
+### Features
+
+#### Patterns
+- feat: Rename Reusable blocks to Patterns. ([51704](https://github.com/WordPress/gutenberg/pull/51704))
+
+
+### Enhancements
+
+- Export store for the core/customize-widgets package. ([52189](https://github.com/WordPress/gutenberg/pull/52189))
+
+#### Patterns
+- Library: Add sync status to pattern details screen. ([51954](https://github.com/WordPress/gutenberg/pull/51954))
+- Rename Library to Patterns. ([52102](https://github.com/WordPress/gutenberg/pull/52102))
+- Update custom patterns label to 'My patterns'. ([51949](https://github.com/WordPress/gutenberg/pull/51949))
+- Update pattern creation modal in library. ([51946](https://github.com/WordPress/gutenberg/pull/51946))
+- Update template part icons in the library mosaic (grid items). ([51963](https://github.com/WordPress/gutenberg/pull/51963))
+
+#### Site Editor
+- Change "Home" template name to "Blog home". ([52048](https://github.com/WordPress/gutenberg/pull/52048))
+- Edit Site: Make loading spinner colors consistent. ([51857](https://github.com/WordPress/gutenberg/pull/51857))
+- Update the icon used to reference the blog. ([52075](https://github.com/WordPress/gutenberg/pull/52075))
+
+#### Interactivity API
+- Image block: Remove extra lookup for external image dimensions in lightbox. ([52178](https://github.com/WordPress/gutenberg/pull/52178))
+- Image block: Use built-in directive for mouseover event in lightbox. ([52067](https://github.com/WordPress/gutenberg/pull/52067))
+
+#### Block Library
+- Force full height for editor in Navigation focus mode. ([51798](https://github.com/WordPress/gutenberg/pull/51798))
+- Social links: Updating class and style attributes. ([51997](https://github.com/WordPress/gutenberg/pull/51997))
+
+#### Themes
+- Add border theme_support. ([51777](https://github.com/WordPress/gutenberg/pull/51777))
+- Add link color theme_support. ([51775](https://github.com/WordPress/gutenberg/pull/51775))
+
+#### Global Styles
+- Style Book: Show tabs and make blocks clickable when entering edit mode from the Styles menu. ([52222](https://github.com/WordPress/gutenberg/pull/52222))
+
+#### Widgets Editor
+- Add @example tags to the customize-widgets package. ([52141](https://github.com/WordPress/gutenberg/pull/52141))
+
+#### NUX
+- Page Content Focus: Add welcome guides. ([52014](https://github.com/WordPress/gutenberg/pull/52014))
+
+#### Block Editor
+- Use block label and icon for the inserter draggable chip.. ([51048](https://github.com/WordPress/gutenberg/pull/51048))
+
+#### Design Tools
+- Add Typography: Text orientation (writing mode). ([50822](https://github.com/WordPress/gutenberg/pull/50822))
+
+#### Components
+- RangeControl: Add support for large 40px number input size. ([49105](https://github.com/WordPress/gutenberg/pull/49105))
+
+
+### New APIs
+
+#### Block Editor
+- Add new `registerInserterMediaCategory` API to make media categories extensible. ([51542](https://github.com/WordPress/gutenberg/pull/51542))
+
+
+### Bug Fixes
+
+- Adjust the position of sticky headings in preferences modal. ([52248](https://github.com/WordPress/gutenberg/pull/52248))
+- BlockRemovalWarningModal: Fix incorrect '_n' usage. ([52164](https://github.com/WordPress/gutenberg/pull/52164))
+- Editor initrial appender: Zero out margins in constrained layouts. ([52026](https://github.com/WordPress/gutenberg/pull/52026))
+- Export store from the edit-site package. ([51986](https://github.com/WordPress/gutenberg/pull/51986))
+- Fix disable DFM when opening styles command. ([52165](https://github.com/WordPress/gutenberg/pull/52165))
+- Fix unintentional toggling on of distraction free. ([52090](https://github.com/WordPress/gutenberg/pull/52090))
+- Footnotes: Increase selector specificity for anchor. ([52179](https://github.com/WordPress/gutenberg/pull/52179))
+- Respect custom aspect ratio. ([52286](https://github.com/WordPress/gutenberg/pull/52286))
+- Turn off DFM for style book and style editing. ([52117](https://github.com/WordPress/gutenberg/pull/52117))
+- Update fixed block toolbar. ([52123](https://github.com/WordPress/gutenberg/pull/52123))
+- Updating the BlockEditorProvider settings prop should reset the store's settings entirely. ([51904](https://github.com/WordPress/gutenberg/pull/51904))
+- [Command Palette]: Remove suggestion for deleting templates/parts. ([52168](https://github.com/WordPress/gutenberg/pull/52168))
+- [Command center]: Add preferences and keyboard shortcuts commands. ([51862](https://github.com/WordPress/gutenberg/pull/51862))
+- [Edit Post]: Add toggle fullscreen mode and list view commands. ([52184](https://github.com/WordPress/gutenberg/pull/52184))
+
+#### Block Library
+- Fix default block dimensions visibility. ([52256](https://github.com/WordPress/gutenberg/pull/52256))
+- Fix fetching Nav fallback ID flushing Navigation entity cache. ([52069](https://github.com/WordPress/gutenberg/pull/52069))
+- Fix flaky tests in `navigation.spec.js` and other tests related to the Post Editor Template mode. ([51790](https://github.com/WordPress/gutenberg/pull/51790))
+- Fix: Term Description block should only be available in the site editor. ([51053](https://github.com/WordPress/gutenberg/pull/51053))
+- Footnotes: Register meta field for pages. ([52024](https://github.com/WordPress/gutenberg/pull/52024))
+- Image block: Fix cursor style when lightbox is opened. ([52187](https://github.com/WordPress/gutenberg/pull/52187))
+- Navigation: Add the draft status to the navigation title. ([51967](https://github.com/WordPress/gutenberg/pull/51967))
+- Navigation: Fix end-to-end test failures caused by sidebar title change. ([52308](https://github.com/WordPress/gutenberg/pull/52308))
+- Navigation: Fix sidebar title. ([52167](https://github.com/WordPress/gutenberg/pull/52167))
+- Navigation: Remove one preloaded endpoint. ([52115](https://github.com/WordPress/gutenberg/pull/52115))
+- Page List: Fix parent block selection when converting to link. ([52193](https://github.com/WordPress/gutenberg/pull/52193))
+- Post editor: Require confirmation before removing Footnotes. ([52277](https://github.com/WordPress/gutenberg/pull/52277))
+- fix: Display heading level dropdown icons and labels. ([52004](https://github.com/WordPress/gutenberg/pull/52004))
+
+#### Site Editor
+- Add confirmation step when deleting a Template. ([52236](https://github.com/WordPress/gutenberg/pull/52236))
+- Command Palette: Fix incorrect path and snackbar message when template part is deleted. ([52034](https://github.com/WordPress/gutenberg/pull/52034))
+- Default to showing status slug in sidebar. ([52226](https://github.com/WordPress/gutenberg/pull/52226))
+- Fix missing MenuGroup segment in Site Editor header more menu. ([51860](https://github.com/WordPress/gutenberg/pull/51860))
+- Fix missing snackbars in Library. ([52021](https://github.com/WordPress/gutenberg/pull/52021))
+- Fix stepper styling in Home template sidebar. ([52025](https://github.com/WordPress/gutenberg/pull/52025))
+- Get the top toolbar preference from the correct scope. ([51840](https://github.com/WordPress/gutenberg/pull/51840))
+- Hide word count and reading time meta data for the Posts Page details panel. ([52186](https://github.com/WordPress/gutenberg/pull/52186))
+- Modal: Add small top padding to the content so that avoid cutting off the visible outline when hovering items. ([51829](https://github.com/WordPress/gutenberg/pull/51829))
+- Site Editor Frame: Ignore Spotlight in view mode. ([52262](https://github.com/WordPress/gutenberg/pull/52262))
+- Try restoring the site editor animation. ([51956](https://github.com/WordPress/gutenberg/pull/51956))
+
+#### Patterns
+- Fix custom patterns console error. ([51947](https://github.com/WordPress/gutenberg/pull/51947))
+- Fix history back after entering edit mode from Patterns. ([52112](https://github.com/WordPress/gutenberg/pull/52112))
+- Fix setting of sync status for fully synced patterns. ([51952](https://github.com/WordPress/gutenberg/pull/51952))
+- Fix sidebar tab label. ([51953](https://github.com/WordPress/gutenberg/pull/51953))
+- Fix: Pattern focus mode DocumentActions should use the pattern icon. ([52031](https://github.com/WordPress/gutenberg/pull/52031))
+- Include template parts for custom areas in Uncategorized category. ([52159](https://github.com/WordPress/gutenberg/pull/52159))
+- Remove ability for user to toggle sync status after pattern creation. ([51998](https://github.com/WordPress/gutenberg/pull/51998))
+- Rename sync_status and move to top level field on rest return instead of a meta field. ([52146](https://github.com/WordPress/gutenberg/pull/52146))
+
+#### Interactivity API
+- Block Image: Lightbox - Hide animation selector if behavior is Default or None. ([51748](https://github.com/WordPress/gutenberg/pull/51748))
+- Image block: Fix responsive sizing in lightbox. ([51823](https://github.com/WordPress/gutenberg/pull/51823))
+- Image block: Lightbox animation improvements. ([51721](https://github.com/WordPress/gutenberg/pull/51721))
+- Navigation block: Check that the modal is set before using `contains`. ([51962](https://github.com/WordPress/gutenberg/pull/51962))
+
+#### Accessibility
+- Fix incorrect aria-describedby attributes for theme patterns. ([52263](https://github.com/WordPress/gutenberg/pull/52263))
+- Guide: Place focus on the guide's container instead of its first tabbable. ([52300](https://github.com/WordPress/gutenberg/pull/52300))
+- Site Editor: Update headings hierarchy in the 'Manage all' screens. ([52271](https://github.com/WordPress/gutenberg/pull/52271))
+
+#### Global Styles
+- Check if experiment enabled for realsies this time. ([52315](https://github.com/WordPress/gutenberg/pull/52315))
+- Check randomizer experiment is enabled before rendering button. ([52306](https://github.com/WordPress/gutenberg/pull/52306))
+
+#### Navigation Menu Sidebar
+- Make the entire preview clickable in order to enter "edit" mode in focus mode. ([51973](https://github.com/WordPress/gutenberg/pull/51973))
+- Restore sidebar in focus mode on Pattern click through in Browse Mode `Library`. ([51897](https://github.com/WordPress/gutenberg/pull/51897))
+
+#### Page Content Focus
+- Hide parent selector when parent's block editing mode is 'disabled' or 'contentOnly'. ([52264](https://github.com/WordPress/gutenberg/pull/52264))
+
+#### Post Editor
+- Editor: Avoid remounting pre-publish sidebar contents during autosave. ([52208](https://github.com/WordPress/gutenberg/pull/52208))
+
+#### Block Editor
+- Enable draft entity creation in Nav block offcanvas. ([52166](https://github.com/WordPress/gutenberg/pull/52166))
+
+#### History
+- Update the behavior of the cached undo/redo stack. ([51644](https://github.com/WordPress/gutenberg/pull/51644))
+
+#### Components
+- DropdownMenu: Fix icon style when dashicon is used. ([43574](https://github.com/WordPress/gutenberg/pull/43574))
+
+
+### Performance
+
+- Migrate performance tests to Playwright. ([51084](https://github.com/WordPress/gutenberg/pull/51084))
+- Social links: Reverts updating class and style attributes. ([52019](https://github.com/WordPress/gutenberg/pull/52019))
+- tests: Configure as a production environment. ([52016](https://github.com/WordPress/gutenberg/pull/52016))
+
+#### Block Library
+- Try: Aggressive TinyMCE deprecation. ([50387](https://github.com/WordPress/gutenberg/pull/50387))
+
+
+### Experiments
+
+#### Interactivity API
+- Create @wordpress/interactivity with the Interactivity API. ([50906](https://github.com/WordPress/gutenberg/pull/50906))
+
+
+### Documentation
+
+- Add @examples to the @wordpress/rich-text package selectors and hide the actions from documentation. ([52089](https://github.com/WordPress/gutenberg/pull/52089))
+- Add examples for core/keyboard-shortcut package. ([42831](https://github.com/WordPress/gutenberg/pull/42831))
+- Block Editor: Add README for FontFamilyControl component. ([52118](https://github.com/WordPress/gutenberg/pull/52118))
+- Block Editor: Add README for `PanelColorSettings` component. ([52327](https://github.com/WordPress/gutenberg/pull/52327))
+- Block Editor: Add README for `RecursionProvider`. ([52334](https://github.com/WordPress/gutenberg/pull/52334))
+- Docs: Update release documentation to use the right cherry-picking command. ([51935](https://github.com/WordPress/gutenberg/pull/51935))
+
+
+### Code Quality
+
+- Lodash: Refactor away from `_.kebabCase()` in `getCleanTemplatePartSlug`. ([51906](https://github.com/WordPress/gutenberg/pull/51906))
+- Lodash: Refactor away from `_.kebabCase()` in add page modal. ([51911](https://github.com/WordPress/gutenberg/pull/51911))
+- Lodash: Refactor away from `_.kebabCase()` in generic template modal. ([51910](https://github.com/WordPress/gutenberg/pull/51910))
+- Lodash: Remove completely from `@wordpress/style-engine` package. ([51726](https://github.com/WordPress/gutenberg/pull/51726))
+
+#### Block Library
+- Heading Block: Remove unused `HeadingLevelIcon` component. ([52008](https://github.com/WordPress/gutenberg/pull/52008))
+- Image block and behaviors: Fix some warnings. ([52109](https://github.com/WordPress/gutenberg/pull/52109))
+- Lodash: Refactor embed block away from `_.kebabCase()`. ([51916](https://github.com/WordPress/gutenberg/pull/51916))
+- Lodash: Remove dependency from block library package. ([51976](https://github.com/WordPress/gutenberg/pull/51976))
+- Make Navigation fallback selector private. ([51413](https://github.com/WordPress/gutenberg/pull/51413))
+- Page List: Fix ESLint warnings. ([52267](https://github.com/WordPress/gutenberg/pull/52267))
+- Refactor, document, and fix image block deprecations. ([52081](https://github.com/WordPress/gutenberg/pull/52081))
+
+#### Page Content Focus
+- Add basic test for the page content focus flow. ([52231](https://github.com/WordPress/gutenberg/pull/52231))
+
+#### List View
+- Return primitive value for 'hideInserter' in Appender component. ([52161](https://github.com/WordPress/gutenberg/pull/52161))
+
+#### Interactivity API
+- Fix the `exsisting` -> `existing` typo. ([52110](https://github.com/WordPress/gutenberg/pull/52110))
+
+#### Navigation Menu Sidebar
+- Remove redundant call to Navigation selector in Browse Mode. ([51988](https://github.com/WordPress/gutenberg/pull/51988))
+
+#### Site Editor
+- Block removal prompt: Let consumers pass their own rules. ([51841](https://github.com/WordPress/gutenberg/pull/51841))
+
+#### Block Editor
+- Revise LinkControl suggestions UI to use MenuItem. ([50978](https://github.com/WordPress/gutenberg/pull/50978))
+
+
+### Tools
+
+#### Testing
+- Drops PHP 5.6 CI jobs. ([52345](https://github.com/WordPress/gutenberg/pull/52345))
+- Fix flakiness of saving entities in the site editor. ([51728](https://github.com/WordPress/gutenberg/pull/51728))
+- Fix flaky Site Editor pages end-to-end test. ([52283](https://github.com/WordPress/gutenberg/pull/52283))
+- Have `createNewPost` wait for editor canvas contents. ([51824](https://github.com/WordPress/gutenberg/pull/51824))
+
+#### Build Tooling
+- Fix phpunit failures. ([51950](https://github.com/WordPress/gutenberg/pull/51950))
+- Use moment-timezone-data-webpack-plugin to optimize timezones shipped in wp/date. ([51519](https://github.com/WordPress/gutenberg/pull/51519))
+
+
+### Various
+
+- Add caching to schema of REST API. ([52045](https://github.com/WordPress/gutenberg/pull/52045))
+- Add code owners for the Interactivity API runtime. ([52174](https://github.com/WordPress/gutenberg/pull/52174))
+- Backport from core: Rename `gutenberg_get_remote_theme_patterns` to `gutenberg_get_theme_directory_pattern_slugs`. ([51784](https://github.com/WordPress/gutenberg/pull/51784))
+- Block editor store: Also attach private APIs to old store descriptor. ([52088](https://github.com/WordPress/gutenberg/pull/52088))
+- Blocks: Remove gutenberg refs in PHP files. ([51978](https://github.com/WordPress/gutenberg/pull/51978))
+- Command palette: Rename. ([52153](https://github.com/WordPress/gutenberg/pull/52153))
+- Drop-indicator: Remove white border. ([52122](https://github.com/WordPress/gutenberg/pull/52122))
+- First version of the Interactivity API README. ([52104](https://github.com/WordPress/gutenberg/pull/52104))
+- Global Styles Revisions API: Backport changes from Core. ([52095](https://github.com/WordPress/gutenberg/pull/52095))
+- Global Styles Sidebar: Re-add Colors: Heading to selected blocks. ([49131](https://github.com/WordPress/gutenberg/pull/49131))
+- Image block: Update lightbox animation tests. ([52290](https://github.com/WordPress/gutenberg/pull/52290))
+- Patterns: Update section heading levels. ([52273](https://github.com/WordPress/gutenberg/pull/52273))
+- Perf logging: Change date to ISO 8601. ([51833](https://github.com/WordPress/gutenberg/pull/51833))
+- Refactor use-tab-nav shift+tab to use existing utils. ([51817](https://github.com/WordPress/gutenberg/pull/51817))
+- Remove serverSideBlockDefinitions from a test. ([52215](https://github.com/WordPress/gutenberg/pull/52215))
+- Restore "Buttons > can resize width" test. ([51865](https://github.com/WordPress/gutenberg/pull/51865))
+- Update delete page button label. ([51812](https://github.com/WordPress/gutenberg/pull/51812))
+- Update versions in WP for 6.3. ([51984](https://github.com/WordPress/gutenberg/pull/51984))
+- Wrap "Move to trash" and "Switch to draft" buttons when labels are too long to fit on a single row. ([52249](https://github.com/WordPress/gutenberg/pull/52249))
+- [Github-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release. ([49082](https://github.com/WordPress/gutenberg/pull/49082))
+
+#### Block Library
+- Block Editor: Unify texts for Create pattern modal. ([52151](https://github.com/WordPress/gutenberg/pull/52151))
+- Block Supports: Change prefix in gutenberg_apply_colors_support to wp_ in dynamic blocks. ([51989](https://github.com/WordPress/gutenberg/pull/51989))
+- Navigation in Site View: Readd the edit button. ([52111](https://github.com/WordPress/gutenberg/pull/52111))
+- Navigation submenu: Remove unused doc block. ([52152](https://github.com/WordPress/gutenberg/pull/52152))
+- Page List: Change modal text. ([52116](https://github.com/WordPress/gutenberg/pull/52116))
+- i18n: Add context to the word "Filters". ([52198](https://github.com/WordPress/gutenberg/pull/52198))
+
+#### Site Editor
+- Library: Update icons in the creation menu. ([52108](https://github.com/WordPress/gutenberg/pull/52108))
+- Polish welcome guide copy for page / template editing. ([52282](https://github.com/WordPress/gutenberg/pull/52282))
+- Try: Update template titles. ([51428](https://github.com/WordPress/gutenberg/pull/51428))
+- Update stepper styling in Home template details panel. ([51972](https://github.com/WordPress/gutenberg/pull/51972))
+- Update text color of active menu items. ([51965](https://github.com/WordPress/gutenberg/pull/51965))
+
+#### Patterns
+- Add a hint about the rename of reusable blocks to menu and inserter. ([51771](https://github.com/WordPress/gutenberg/pull/51771))
+- Copy: "Detach pattern" instead of "Covert to regular block". ([51993](https://github.com/WordPress/gutenberg/pull/51993))
+- Library: Reinstate manage all template parts page. ([51961](https://github.com/WordPress/gutenberg/pull/51961))
+- [Library] Add lock icon for theme patterns. ([51990](https://github.com/WordPress/gutenberg/pull/51990))
+
+#### Accessibility
+- Navigation block: Do not toggle aria-expanded on hover when the overlay menu is opened. ([52170](https://github.com/WordPress/gutenberg/pull/52170))
+- Navigation block: Don't close submenu when it has focus. ([52177](https://github.com/WordPress/gutenberg/pull/52177))
+
+#### Widgets Editor
+- Export the store for the core/edit-widgets pacakage. ([52190](https://github.com/WordPress/gutenberg/pull/52190))
+
+#### Post Editor
+- Move block editor settings filter into 6.3 compat folder. ([52100](https://github.com/WordPress/gutenberg/pull/52100))
+
+#### Layout
+- Move grid function kses patch into 6.3 compat folder. ([52098](https://github.com/WordPress/gutenberg/pull/52098))
+
+#### Data Layer
+- hasResolvingSelectors: Exclude from result of resolveSelect. ([52038](https://github.com/WordPress/gutenberg/pull/52038))
+
+#### Icons
+- Remove fill="none" from pinSmall icon. ([51979](https://github.com/WordPress/gutenberg/pull/51979))
+
+#### Navigation Menu Sidebar
+- Sidebar Navigation: Refactor delete modal with `ConfirmDialog` component. ([51867](https://github.com/WordPress/gutenberg/pull/51867))
+
+#### Templates API
+- Template revisions API: Move back to experimental. ([51774](https://github.com/WordPress/gutenberg/pull/51774))
+
+
+## Contributors
+
+The following contributors merged PRs in this release:
+
+@aaronrobertshaw @ajlende @annezazu @artemiomorales @c4rl0sbr4v0 @carolinan @DAreRodz @dcalhoun @draganescu @ellatrix @fullofcaffeine @getdave @glendaviesnz @hellofromtonya @jameskoster @jasmussen @jeryj @jsnajdr @juanfra @juanmaguitar @kevin940726 @luisherranz @Mamaduka @mcsf @michalczaplinski @miminari @noisysocks @ntsekouras @oandregal @ockham @priethor @ramonjd @richtabor @ryanwelcher @SaxonF @scruffian @spacedmonkey @stokesman @t-hamano @talldan @tellthemachines @tyxla @WunderBart @youknowriad
+
+
+
+
+= 16.1.2 =
+
+### Bug fixes
+
+* Footnotes: increase selector specificity for anchor (https://github.com/WordPress/gutenberg/pull/52179)
+
+
+= 16.2.0-rc.1 =
+
+
+
+## Changelog
+
+### Features
+
+#### Patterns
+- feat: Rename Reusable blocks to Patterns. ([51704](https://github.com/WordPress/gutenberg/pull/51704))
+
+
+### Enhancements
+
+- Export store for the core/customize-widgets package. ([52189](https://github.com/WordPress/gutenberg/pull/52189))
+
+#### Patterns
+- Library: Add sync status to pattern details screen. ([51954](https://github.com/WordPress/gutenberg/pull/51954))
+- Rename Library to Patterns. ([52102](https://github.com/WordPress/gutenberg/pull/52102))
+- Update custom patterns label to 'My patterns'. ([51949](https://github.com/WordPress/gutenberg/pull/51949))
+- Update pattern creation modal in library. ([51946](https://github.com/WordPress/gutenberg/pull/51946))
+- Update template part icons in the library mosaic (grid items). ([51963](https://github.com/WordPress/gutenberg/pull/51963))
+
+#### Site Editor
+- Change "Home" template name to "Blog home". ([52048](https://github.com/WordPress/gutenberg/pull/52048))
+- Edit Site: Make loading spinner colors consistent. ([51857](https://github.com/WordPress/gutenberg/pull/51857))
+- Update the icon used to reference the blog. ([52075](https://github.com/WordPress/gutenberg/pull/52075))
+
+#### Interactivity API
+- Image block: Remove extra lookup for external image dimensions in lightbox. ([52178](https://github.com/WordPress/gutenberg/pull/52178))
+- Image block: Use built-in directive for mouseover event in lightbox. ([52067](https://github.com/WordPress/gutenberg/pull/52067))
+
+#### Block Library
+- Force full height for editor in Navigation focus mode. ([51798](https://github.com/WordPress/gutenberg/pull/51798))
+- Social links: Updating class and style attributes. ([51997](https://github.com/WordPress/gutenberg/pull/51997))
+
+#### Themes
+- Add border theme_support. ([51777](https://github.com/WordPress/gutenberg/pull/51777))
+- Add link color theme_support. ([51775](https://github.com/WordPress/gutenberg/pull/51775))
+
+#### Global Styles
+- Style Book: Show tabs and make blocks clickable when entering edit mode from the Styles menu. ([52222](https://github.com/WordPress/gutenberg/pull/52222))
+
+#### Widgets Editor
+- Add @example tags to the customize-widgets package. ([52141](https://github.com/WordPress/gutenberg/pull/52141))
+
+#### NUX
+- Page Content Focus: Add welcome guides. ([52014](https://github.com/WordPress/gutenberg/pull/52014))
+
+#### Block Editor
+- Use block label and icon for the inserter draggable chip.. ([51048](https://github.com/WordPress/gutenberg/pull/51048))
+
+#### Design Tools
+- Add Typography: Text orientation (writing mode). ([50822](https://github.com/WordPress/gutenberg/pull/50822))
+
+#### Components
+- RangeControl: Add support for large 40px number input size. ([49105](https://github.com/WordPress/gutenberg/pull/49105))
+
+
+### New APIs
+
+#### Block Editor
+- Add new `registerInserterMediaCategory` API to make media categories extensible. ([51542](https://github.com/WordPress/gutenberg/pull/51542))
+
+
+### Bug Fixes
+
+- Adjust the position of sticky headings in preferences modal. ([52248](https://github.com/WordPress/gutenberg/pull/52248))
+- BlockRemovalWarningModal: Fix incorrect '_n' usage. ([52164](https://github.com/WordPress/gutenberg/pull/52164))
+- Editor initrial appender: Zero out margins in constrained layouts. ([52026](https://github.com/WordPress/gutenberg/pull/52026))
+- Export store from the edit-site package. ([51986](https://github.com/WordPress/gutenberg/pull/51986))
+- Fix disable DFM when opening styles command. ([52165](https://github.com/WordPress/gutenberg/pull/52165))
+- Fix unintentional toggling on of distraction free. ([52090](https://github.com/WordPress/gutenberg/pull/52090))
+- Footnotes: Increase selector specificity for anchor. ([52179](https://github.com/WordPress/gutenberg/pull/52179))
+- Respect custom aspect ratio. ([52286](https://github.com/WordPress/gutenberg/pull/52286))
+- Turn off DFM for style book and style editing. ([52117](https://github.com/WordPress/gutenberg/pull/52117))
+- Update fixed block toolbar. ([52123](https://github.com/WordPress/gutenberg/pull/52123))
+- Updating the BlockEditorProvider settings prop should reset the store's settings entirely. ([51904](https://github.com/WordPress/gutenberg/pull/51904))
+- [Command Palette]: Remove suggestion for deleting templates/parts. ([52168](https://github.com/WordPress/gutenberg/pull/52168))
+- [Command center]: Add preferences and keyboard shortcuts commands. ([51862](https://github.com/WordPress/gutenberg/pull/51862))
+- [Edit Post]: Add toggle fullscreen mode and list view commands. ([52184](https://github.com/WordPress/gutenberg/pull/52184))
+
+#### Block Library
+- Fix default block dimensions visibility. ([52256](https://github.com/WordPress/gutenberg/pull/52256))
+- Fix fetching Nav fallback ID flushing Navigation entity cache. ([52069](https://github.com/WordPress/gutenberg/pull/52069))
+- Fix flaky tests in `navigation.spec.js` and other tests related to the Post Editor Template mode. ([51790](https://github.com/WordPress/gutenberg/pull/51790))
+- Fix: Term Description block should only be available in the site editor. ([51053](https://github.com/WordPress/gutenberg/pull/51053))
+- Footnotes: Register meta field for pages. ([52024](https://github.com/WordPress/gutenberg/pull/52024))
+- Image block: Fix cursor style when lightbox is opened. ([52187](https://github.com/WordPress/gutenberg/pull/52187))
+- Navigation: Add the draft status to the navigation title. ([51967](https://github.com/WordPress/gutenberg/pull/51967))
+- Navigation: Fix end-to-end test failures caused by sidebar title change. ([52308](https://github.com/WordPress/gutenberg/pull/52308))
+- Navigation: Fix sidebar title. ([52167](https://github.com/WordPress/gutenberg/pull/52167))
+- Navigation: Remove one preloaded endpoint. ([52115](https://github.com/WordPress/gutenberg/pull/52115))
+- Page List: Fix parent block selection when converting to link. ([52193](https://github.com/WordPress/gutenberg/pull/52193))
+- Post editor: Require confirmation before removing Footnotes. ([52277](https://github.com/WordPress/gutenberg/pull/52277))
+- fix: Display heading level dropdown icons and labels. ([52004](https://github.com/WordPress/gutenberg/pull/52004))
+
+#### Site Editor
+- Add confirmation step when deleting a Template. ([52236](https://github.com/WordPress/gutenberg/pull/52236))
+- Command Palette: Fix incorrect path and snackbar message when template part is deleted. ([52034](https://github.com/WordPress/gutenberg/pull/52034))
+- Default to showing status slug in sidebar. ([52226](https://github.com/WordPress/gutenberg/pull/52226))
+- Fix missing MenuGroup segment in Site Editor header more menu. ([51860](https://github.com/WordPress/gutenberg/pull/51860))
+- Fix missing snackbars in Library. ([52021](https://github.com/WordPress/gutenberg/pull/52021))
+- Fix stepper styling in Home template sidebar. ([52025](https://github.com/WordPress/gutenberg/pull/52025))
+- Get the top toolbar preference from the correct scope. ([51840](https://github.com/WordPress/gutenberg/pull/51840))
+- Hide word count and reading time meta data for the Posts Page details panel. ([52186](https://github.com/WordPress/gutenberg/pull/52186))
+- Modal: Add small top padding to the content so that avoid cutting off the visible outline when hovering items. ([51829](https://github.com/WordPress/gutenberg/pull/51829))
+- Site Editor Frame: Ignore Spotlight in view mode. ([52262](https://github.com/WordPress/gutenberg/pull/52262))
+- Try restoring the site editor animation. ([51956](https://github.com/WordPress/gutenberg/pull/51956))
+
+#### Patterns
+- Fix custom patterns console error. ([51947](https://github.com/WordPress/gutenberg/pull/51947))
+- Fix history back after entering edit mode from Patterns. ([52112](https://github.com/WordPress/gutenberg/pull/52112))
+- Fix setting of sync status for fully synced patterns. ([51952](https://github.com/WordPress/gutenberg/pull/51952))
+- Fix sidebar tab label. ([51953](https://github.com/WordPress/gutenberg/pull/51953))
+- Fix: Pattern focus mode DocumentActions should use the pattern icon. ([52031](https://github.com/WordPress/gutenberg/pull/52031))
+- Include template parts for custom areas in Uncategorized category. ([52159](https://github.com/WordPress/gutenberg/pull/52159))
+- Remove ability for user to toggle sync status after pattern creation. ([51998](https://github.com/WordPress/gutenberg/pull/51998))
+- Rename sync_status and move to top level field on rest return instead of a meta field. ([52146](https://github.com/WordPress/gutenberg/pull/52146))
+
+#### Interactivity API
+- Block Image: Lightbox - Hide animation selector if behavior is Default or None. ([51748](https://github.com/WordPress/gutenberg/pull/51748))
+- Image block: Fix responsive sizing in lightbox. ([51823](https://github.com/WordPress/gutenberg/pull/51823))
+- Image block: Lightbox animation improvements. ([51721](https://github.com/WordPress/gutenberg/pull/51721))
+- Navigation block: Check that the modal is set before using `contains`. ([51962](https://github.com/WordPress/gutenberg/pull/51962))
+
+#### Accessibility
+- Fix incorrect aria-describedby attributes for theme patterns. ([52263](https://github.com/WordPress/gutenberg/pull/52263))
+- Guide: Place focus on the guide's container instead of its first tabbable. ([52300](https://github.com/WordPress/gutenberg/pull/52300))
+- Site Editor: Update headings hierarchy in the 'Manage all' screens. ([52271](https://github.com/WordPress/gutenberg/pull/52271))
+
+#### Global Styles
+- Check if experiment enabled for realsies this time. ([52315](https://github.com/WordPress/gutenberg/pull/52315))
+- Check randomizer experiment is enabled before rendering button. ([52306](https://github.com/WordPress/gutenberg/pull/52306))
+
+#### Navigation Menu Sidebar
+- Make the entire preview clickable in order to enter "edit" mode in focus mode. ([51973](https://github.com/WordPress/gutenberg/pull/51973))
+- Restore sidebar in focus mode on Pattern click through in Browse Mode `Library`. ([51897](https://github.com/WordPress/gutenberg/pull/51897))
+
+#### Page Content Focus
+- Hide parent selector when parent's block editing mode is 'disabled' or 'contentOnly'. ([52264](https://github.com/WordPress/gutenberg/pull/52264))
+
+#### Post Editor
+- Editor: Avoid remounting pre-publish sidebar contents during autosave. ([52208](https://github.com/WordPress/gutenberg/pull/52208))
+
+#### Block Editor
+- Enable draft entity creation in Nav block offcanvas. ([52166](https://github.com/WordPress/gutenberg/pull/52166))
+
+#### History
+- Update the behavior of the cached undo/redo stack. ([51644](https://github.com/WordPress/gutenberg/pull/51644))
+
+#### Components
+- DropdownMenu: Fix icon style when dashicon is used. ([43574](https://github.com/WordPress/gutenberg/pull/43574))
+
+
+### Performance
+
+- Migrate performance tests to Playwright. ([51084](https://github.com/WordPress/gutenberg/pull/51084))
+- Social links: Reverts updating class and style attributes. ([52019](https://github.com/WordPress/gutenberg/pull/52019))
+- tests: Configure as a production environment. ([52016](https://github.com/WordPress/gutenberg/pull/52016))
+
+#### Block Library
+- Try: Aggressive TinyMCE deprecation. ([50387](https://github.com/WordPress/gutenberg/pull/50387))
+
+
+### Experiments
+
+#### Interactivity API
+- Create @wordpress/interactivity with the Interactivity API. ([50906](https://github.com/WordPress/gutenberg/pull/50906))
+
+
+### Documentation
+
+- Add @examples to the @wordpress/rich-text package selectors and hide the actions from documentation. ([52089](https://github.com/WordPress/gutenberg/pull/52089))
+- Add examples for core/keyboard-shortcut package. ([42831](https://github.com/WordPress/gutenberg/pull/42831))
+- Block Editor: Add README for FontFamilyControl component. ([52118](https://github.com/WordPress/gutenberg/pull/52118))
+- Block Editor: Add README for `PanelColorSettings` component. ([52327](https://github.com/WordPress/gutenberg/pull/52327))
+- Block Editor: Add README for `RecursionProvider`. ([52334](https://github.com/WordPress/gutenberg/pull/52334))
+- Docs: Update release documentation to use the right cherry-picking command. ([51935](https://github.com/WordPress/gutenberg/pull/51935))
+
+
+### Code Quality
+
+- Lodash: Refactor away from `_.kebabCase()` in `getCleanTemplatePartSlug`. ([51906](https://github.com/WordPress/gutenberg/pull/51906))
+- Lodash: Refactor away from `_.kebabCase()` in add page modal. ([51911](https://github.com/WordPress/gutenberg/pull/51911))
+- Lodash: Refactor away from `_.kebabCase()` in generic template modal. ([51910](https://github.com/WordPress/gutenberg/pull/51910))
+- Lodash: Remove completely from `@wordpress/style-engine` package. ([51726](https://github.com/WordPress/gutenberg/pull/51726))
+
+#### Block Library
+- Heading Block: Remove unused `HeadingLevelIcon` component. ([52008](https://github.com/WordPress/gutenberg/pull/52008))
+- Image block and behaviors: Fix some warnings. ([52109](https://github.com/WordPress/gutenberg/pull/52109))
+- Lodash: Refactor embed block away from `_.kebabCase()`. ([51916](https://github.com/WordPress/gutenberg/pull/51916))
+- Lodash: Remove dependency from block library package. ([51976](https://github.com/WordPress/gutenberg/pull/51976))
+- Make Navigation fallback selector private. ([51413](https://github.com/WordPress/gutenberg/pull/51413))
+- Page List: Fix ESLint warnings. ([52267](https://github.com/WordPress/gutenberg/pull/52267))
+- Refactor, document, and fix image block deprecations. ([52081](https://github.com/WordPress/gutenberg/pull/52081))
+
+#### Page Content Focus
+- Add basic test for the page content focus flow. ([52231](https://github.com/WordPress/gutenberg/pull/52231))
+
+#### List View
+- Return primitive value for 'hideInserter' in Appender component. ([52161](https://github.com/WordPress/gutenberg/pull/52161))
+
+#### Interactivity API
+- Fix the `exsisting` -> `existing` typo. ([52110](https://github.com/WordPress/gutenberg/pull/52110))
+
+#### Navigation Menu Sidebar
+- Remove redundant call to Navigation selector in Browse Mode. ([51988](https://github.com/WordPress/gutenberg/pull/51988))
+
+#### Site Editor
+- Block removal prompt: Let consumers pass their own rules. ([51841](https://github.com/WordPress/gutenberg/pull/51841))
+
+#### Block Editor
+- Revise LinkControl suggestions UI to use MenuItem. ([50978](https://github.com/WordPress/gutenberg/pull/50978))
+
+
+### Tools
+
+#### Testing
+- Drops PHP 5.6 CI jobs. ([52345](https://github.com/WordPress/gutenberg/pull/52345))
+- Fix flakiness of saving entities in the site editor. ([51728](https://github.com/WordPress/gutenberg/pull/51728))
+- Fix flaky Site Editor pages end-to-end test. ([52283](https://github.com/WordPress/gutenberg/pull/52283))
+- Have `createNewPost` wait for editor canvas contents. ([51824](https://github.com/WordPress/gutenberg/pull/51824))
+
+#### Build Tooling
+- Fix phpunit failures. ([51950](https://github.com/WordPress/gutenberg/pull/51950))
+- Use moment-timezone-data-webpack-plugin to optimize timezones shipped in wp/date. ([51519](https://github.com/WordPress/gutenberg/pull/51519))
+
+
+### Various
+
+- Add caching to schema of REST API. ([52045](https://github.com/WordPress/gutenberg/pull/52045))
+- Add code owners for the Interactivity API runtime. ([52174](https://github.com/WordPress/gutenberg/pull/52174))
+- Backport from core: Rename `gutenberg_get_remote_theme_patterns` to `gutenberg_get_theme_directory_pattern_slugs`. ([51784](https://github.com/WordPress/gutenberg/pull/51784))
+- Block editor store: Also attach private APIs to old store descriptor. ([52088](https://github.com/WordPress/gutenberg/pull/52088))
+- Blocks: Remove gutenberg refs in PHP files. ([51978](https://github.com/WordPress/gutenberg/pull/51978))
+- Command palette: Rename. ([52153](https://github.com/WordPress/gutenberg/pull/52153))
+- Drop-indicator: Remove white border. ([52122](https://github.com/WordPress/gutenberg/pull/52122))
+- First version of the Interactivity API README. ([52104](https://github.com/WordPress/gutenberg/pull/52104))
+- Global Styles Revisions API: Backport changes from Core. ([52095](https://github.com/WordPress/gutenberg/pull/52095))
+- Global Styles Sidebar: Re-add Colors: Heading to selected blocks. ([49131](https://github.com/WordPress/gutenberg/pull/49131))
+- Image block: Update lightbox animation tests. ([52290](https://github.com/WordPress/gutenberg/pull/52290))
+- Patterns: Update section heading levels. ([52273](https://github.com/WordPress/gutenberg/pull/52273))
+- Perf logging: Change date to ISO 8601. ([51833](https://github.com/WordPress/gutenberg/pull/51833))
+- Refactor use-tab-nav shift+tab to use existing utils. ([51817](https://github.com/WordPress/gutenberg/pull/51817))
+- Remove serverSideBlockDefinitions from a test. ([52215](https://github.com/WordPress/gutenberg/pull/52215))
+- Restore "Buttons > can resize width" test. ([51865](https://github.com/WordPress/gutenberg/pull/51865))
+- Update delete page button label. ([51812](https://github.com/WordPress/gutenberg/pull/51812))
+- Update versions in WP for 6.3. ([51984](https://github.com/WordPress/gutenberg/pull/51984))
+- Wrap "Move to trash" and "Switch to draft" buttons when labels are too long to fit on a single row. ([52249](https://github.com/WordPress/gutenberg/pull/52249))
+- [Github-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release. ([49082](https://github.com/WordPress/gutenberg/pull/49082))
+
+#### Block Library
+- Block Editor: Unify texts for Create pattern modal. ([52151](https://github.com/WordPress/gutenberg/pull/52151))
+- Block Supports: Change prefix in gutenberg_apply_colors_support to wp_ in dynamic blocks. ([51989](https://github.com/WordPress/gutenberg/pull/51989))
+- Navigation in Site View: Readd the edit button. ([52111](https://github.com/WordPress/gutenberg/pull/52111))
+- Navigation submenu: Remove unused doc block. ([52152](https://github.com/WordPress/gutenberg/pull/52152))
+- Page List: Change modal text. ([52116](https://github.com/WordPress/gutenberg/pull/52116))
+- i18n: Add context to the word "Filters". ([52198](https://github.com/WordPress/gutenberg/pull/52198))
+
+#### Site Editor
+- Library: Update icons in the creation menu. ([52108](https://github.com/WordPress/gutenberg/pull/52108))
+- Polish welcome guide copy for page / template editing. ([52282](https://github.com/WordPress/gutenberg/pull/52282))
+- Try: Update template titles. ([51428](https://github.com/WordPress/gutenberg/pull/51428))
+- Update stepper styling in Home template details panel. ([51972](https://github.com/WordPress/gutenberg/pull/51972))
+- Update text color of active menu items. ([51965](https://github.com/WordPress/gutenberg/pull/51965))
+
+#### Patterns
+- Add a hint about the rename of reusable blocks to menu and inserter. ([51771](https://github.com/WordPress/gutenberg/pull/51771))
+- Copy: "Detach pattern" instead of "Covert to regular block". ([51993](https://github.com/WordPress/gutenberg/pull/51993))
+- Library: Reinstate manage all template parts page. ([51961](https://github.com/WordPress/gutenberg/pull/51961))
+- [Library] Add lock icon for theme patterns. ([51990](https://github.com/WordPress/gutenberg/pull/51990))
+
+#### Accessibility
+- Navigation block: Do not toggle aria-expanded on hover when the overlay menu is opened. ([52170](https://github.com/WordPress/gutenberg/pull/52170))
+- Navigation block: Don't close submenu when it has focus. ([52177](https://github.com/WordPress/gutenberg/pull/52177))
+
+#### Widgets Editor
+- Export the store for the core/edit-widgets pacakage. ([52190](https://github.com/WordPress/gutenberg/pull/52190))
+
+#### Post Editor
+- Move block editor settings filter into 6.3 compat folder. ([52100](https://github.com/WordPress/gutenberg/pull/52100))
+
+#### Layout
+- Move grid function kses patch into 6.3 compat folder. ([52098](https://github.com/WordPress/gutenberg/pull/52098))
+
+#### Data Layer
+- hasResolvingSelectors: Exclude from result of resolveSelect. ([52038](https://github.com/WordPress/gutenberg/pull/52038))
+
+#### Icons
+- Remove fill="none" from pinSmall icon. ([51979](https://github.com/WordPress/gutenberg/pull/51979))
+
+#### Navigation Menu Sidebar
+- Sidebar Navigation: Refactor delete modal with `ConfirmDialog` component. ([51867](https://github.com/WordPress/gutenberg/pull/51867))
+
+#### Templates API
+- Template revisions API: Move back to experimental. ([51774](https://github.com/WordPress/gutenberg/pull/51774))
+
+
+
+
+## Contributors
+
+The following contributors merged PRs in this release:
+
+@aaronrobertshaw @ajlende @annezazu @artemiomorales @c4rl0sbr4v0 @carolinan @DAreRodz @dcalhoun @draganescu @ellatrix @fullofcaffeine @getdave @glendaviesnz @hellofromtonya @jameskoster @jasmussen @jeryj @jsnajdr @juanfra @juanmaguitar @kevin940726 @luisherranz @Mamaduka @mcsf @michalczaplinski @miminari @noisysocks @ntsekouras @oandregal @ockham @priethor @ramonjd @richtabor @ryanwelcher @SaxonF @scruffian @spacedmonkey @stokesman @t-hamano @talldan @tellthemachines @tyxla @WunderBart @youknowriad
+
+
= 16.1.1 =
## Changelog
diff --git a/docs/assets/text-transform-component.png b/docs/assets/text-transform-component.png
new file mode 100644
index 00000000000000..2155fbdb8ebef6
Binary files /dev/null and b/docs/assets/text-transform-component.png differ
diff --git a/docs/contributors/code/react-native/getting-started-react-native.md b/docs/contributors/code/react-native/getting-started-react-native.md
index 96338af7a6f2f7..9b8ae44f0d8b18 100644
--- a/docs/contributors/code/react-native/getting-started-react-native.md
+++ b/docs/contributors/code/react-native/getting-started-react-native.md
@@ -89,7 +89,7 @@ One of the extensions we are using is the [React Native Tools](https://marketpla
Use the following command to run the test suite:
```sh
-npm run native test
+npm run test:native
```
It will run the [jest](https://github.com/facebook/jest) test runner on your tests. The tests are running on the desktop against Node.js.
@@ -97,7 +97,7 @@ It will run the [jest](https://github.com/facebook/jest) test runner on your tes
To run the tests with debugger support, start it with the following CLI command:
```sh
-npm run native test:debug
+npm run test:native:debug
```
Then, open `chrome://inspect` in Chrome to attach the debugger (look into the "Remote Target" section). While testing/developing, feel free to sprinkle `debugger` statements anywhere in the code that you'd like the debugger to break.
diff --git a/docs/contributors/code/react-native/osx-setup-guide.md b/docs/contributors/code/react-native/osx-setup-guide.md
index 5d6d4603e49598..dab5f33448b74d 100644
--- a/docs/contributors/code/react-native/osx-setup-guide.md
+++ b/docs/contributors/code/react-native/osx-setup-guide.md
@@ -212,7 +212,7 @@ After a bit of a wait, we’ll see something like this:
## Unit Tests
```sh
-npm run native test
+npm run test:native
```
## Integration Tests
diff --git a/docs/contributors/code/release.md b/docs/contributors/code/release.md
index 180de30d195571..edbd67655a6990 100644
--- a/docs/contributors/code/release.md
+++ b/docs/contributors/code/release.md
@@ -181,7 +181,13 @@ _If_ however, the previous release was an **RC** (e.g. `X.Y.0-rc.1`) you will ne
To do this, when running the Workflow, select the appropriate `release/` branch from the `Use workflow from` dropdown (e.g. `release/12.5`) and specify `stable` in the text input field.
-Please note you **cannot create minor releases for previous stable releases once a more recent stable release has been published** as this would require significant changes to how we upload plugin versions to the WP.org plugin SVN repo). Always check the latest release version before you proceed (see [this Issue](https://github.com/WordPress/gutenberg/issues/33277#issuecomment-876289457) for more information).
+##### Creating a minor release for previous stable releases
+
+It is possible to create a minor release for any release branch even after a more recent stable release has been published. This can be done for _any_ previous release branches, allowing more flexibility in delivering updates to users. In the past, users had to wait for the next stable release, potentially taking days. Now, fixes can be swiftly shipped to any previous release branches as required.
+
+The process is identical to the one documented above when an RC is already out: choose a previous release branch, type `stable`, and click "Run workflow". The release will be published on the GitHub releases page for Gutenberg and to the WordPress core repository SVN as a `tag` under http://plugins.svn.wordpress.org/gutenberg/tags/. The SVN `trunk` directory will not be touched.
+
+**IMPORTANT:** When publishing the draft created by the ["Build Plugin Zip" workflow](https://github.com/WordPress/gutenberg/actions/workflows/build-plugin-zip.yml), make sure to leave the "Set as last release" checkbox unchecked. If it is left checked by accident, the ["Upload Gutenberg plugin to WordPress.org plugin" workflow](https://github.com/WordPress/gutenberg/actions/workflows/upload-release-to-plugin-repo.yml) will still correctly upload it **as a tag (and will _not_ replace the `trunk` version)** to the WordPress plugin repository SVN - the workflow will perform some version arithmetic to determine how the plugin should be shipped - but you'll still need to fix the state on GitHub by setting the right release as `latest` on the [releases](https://github.com/WordPress/gutenberg/releases/) page!
#### Troubleshooting
diff --git a/docs/contributors/code/scripts.md b/docs/contributors/code/scripts.md
index 5cd7efd2fffdad..1483a409a4d08f 100644
--- a/docs/contributors/code/scripts.md
+++ b/docs/contributors/code/scripts.md
@@ -31,6 +31,7 @@ The editor includes a number of packages to enable various pieces of functionali
| [Is Shallow Equal](/packages/is-shallow-equal/README.md) | wp-is-shallow-equal | A function for performing a shallow comparison between two objects or arrays |
| [Keycodes](/packages/keycodes/README.md) | wp-keycodes | Keycodes utilities for WordPress, used to check the key pressed in events like `onKeyDown` |
| [List Reusable blocks](/packages/list-reusable-blocks/README.md) | wp-list-reusable-blocks | Package used to add import/export links to the listing page of the reusable blocks |
+| [NUX](/packages/nux/README.md) | wp-nux | Components, and wp.data methods useful for onboarding a new user to the WordPress admin interface |
| [Plugins](/packages/plugins/README.md) | wp-plugins | Plugins module for WordPress |
| [Redux Routine](/packages/redux-routine/README.md) | wp-redux-routine | Redux middleware for generator coroutines |
| [Rich Text](/packages/rich-text/README.md) | wp-rich-text | Helper functions to convert HTML or a DOM tree into a rich text value and back |
diff --git a/docs/contributors/code/testing-overview.md b/docs/contributors/code/testing-overview.md
index 42704be233b9b9..946aec8cd70e3e 100644
--- a/docs/contributors/code/testing-overview.md
+++ b/docs/contributors/code/testing-overview.md
@@ -497,7 +497,7 @@ Part of the unit-tests suite is a set of Jest tests run exercise native-mobile c
To locally run the tests in debug mode, follow these steps:
0. Make sure you have ran `npm ci` to install all the packages
-1. Run `npm run native test:debug` inside the Gutenberg root folder, on the CLI. Node is now waiting for the debugger to connect.
+1. Run `npm run test:native:debug` inside the Gutenberg root folder, on the CLI. Node is now waiting for the debugger to connect.
2. Open `chrome://inspect` in Chrome
3. Under the "Remote Target" section, look for a `../../node_modules/.bin/jest` target and click on the "inspect" link. That will open a new window with the Chrome DevTools debugger attached to the process and stopped at the beginning of the `jest.js` file. Alternatively, if the targets are not visible, click on the `Open dedicated DevTools for Node` link in the same page.
4. You can place breakpoints or `debugger;` statements throughout the code, including the tests code, to stop and inspect
diff --git a/docs/explanations/architecture/entities.md b/docs/explanations/architecture/entities.md
index 13e6eaca08b5a0..2a3af6288d27fa 100644
--- a/docs/explanations/architecture/entities.md
+++ b/docs/explanations/architecture/entities.md
@@ -56,8 +56,14 @@ For example, let's say a user edits the title of a post, followed by a modificat
The store also keep tracks of a "pointer" to the current "undo/redo" step. By default, the pointer always points to the last item in the stack. This pointer is updated when the user performs an undo or redo operation.
-### Transient changes
+### Cached changes
-The undo/redo core behavior also supports what we call "transient modifications". These are modifications that are not stored in the undo/redo stack right away. For instance, when a user starts typing in a text field, the value of the field is modified in the store, but this modification is not stored in the undo/redo stack until after the user moves to the next word or after a few milliseconds. This is done to avoid creating a new undo/redo step for each character typed by the user.
+The undo/redo core behavior also supports what we call "cached modifications". These are modifications that are not stored in the undo/redo stack right away. For instance, when a user starts typing in a text field, the value of the field is modified in the store, but this modification is not stored in the undo/redo stack until after the user moves to the next word or after a few milliseconds. This is done to avoid creating a new undo/redo step for each character typed by the user.
-So by default, `core-data` store considers all modifications to properties that are marked as "transient" (like the `blocks` property in the post entity) as transient modifications. It keeps these modifications outside the undo/redo stack in what is called a "cache" of modifications and these modifications are only stored in the undo/redo stack when we explicitely call `__unstableCreateUndoLevel` or when the next non-transient modification is performed.
+Cached changes are kept outside the undo/redo stack in what is called a "cache" of modifications and these modifications are only stored in the undo/redo stack when we explicitely call `__unstableCreateUndoLevel` or when the next modification is not a cached one.
+
+By default all calls to `editEntityRecord` are considered "non-cached" unless the `isCached` option is passed as true. Example:
+
+```js
+wp.data.dispatch( 'core' ).editEntityRecord( 'postType', 'post', 1, { title: 'Hello World' }, { isCached: true } );
+```
diff --git a/docs/explanations/architecture/styles.md b/docs/explanations/architecture/styles.md
index faf2649efd13ab..a8a5af72fec76b 100644
--- a/docs/explanations/architecture/styles.md
+++ b/docs/explanations/architecture/styles.md
@@ -59,10 +59,8 @@ The user may change the state of this block by applying different styles: a text
After some user modifications to the block, the initial markup may become something like this:
```html
-
+
```
This is what we refer to as "user-provided block styles", also know as "local styles" or "serialized styles". Essentially, each tool (font size, color, etc) ends up adding some classes and/or inline styles to the block markup. The CSS styling for these classes is part of the block, global, or theme stylesheets.
@@ -511,9 +509,7 @@ The global styles UI in the site editor has a screen for per-block styles. The l
In addition to styles at the individual block level and in global styles, there is the concept of layout styles that are output for both blocks-based and classic themes.
-The layout block support is an experimental approach for outputting common layout styles that are shared between blocks that are used for creating layouts. Layout styles are useful for providing common styling for any block that is a container for other blocks. Examples of blocks that depend on these layout styles include Group, Row, Columns, Buttons, and Social Icons.
-
-While the feature is part of WordPress core, it is still flagged as experimental in the sense that the features and output are still undergoing active development. It is therefore not yet a stable feature from the perspective of 3rd party blocks, as the API is likely to change. The feature is enabled in core blocks via the `layout` setting under `supports` in a block's `block.json` file.
+The layout block support outputs common layout styles that are shared between blocks used for creating layouts. Layout styles are useful for providing common styling for any block that is a container for other blocks. Examples of blocks that depend on these layout styles include Group, Row, Columns, Buttons, and Social Icons. The feature is enabled in core blocks via the `layout` setting under `supports` in a block's `block.json` file.
There are two primary places where Layout styles are output:
@@ -523,22 +519,23 @@ Base layout styles are those styles that are common to all blocks that opt in to
Base layout styles are output from within [the main PHP class](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/class-wp-theme-json.php) that handles global styles, and form part of the global styles stylesheet. In order to provide support for core blocks in classic themes, these styles are always output, irrespective of whether the theme provides its own `theme.json` file.
-Common layout definitions are stored in [the core `theme.json` file](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/theme.json), but are not intended to be extended or overridden by themes.
+Common layout definitions are stored in [the core layout block support file](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-supports/layout.php).
#### Individual layout styles
-When a block that opts in to the experimental layout support is rendered, two things are processed and added to the output via [`layout.php`](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-supports/layout.php):
+When a block that opts in to layout support is rendered, two things are processed and added to the output via [`layout.php`](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-supports/layout.php):
- Semantic class names are added to the block markup to indicate which layout settings are in use. For example, `is-layout-flow` is for blocks (such as Group) that use the default/flow layout, and `is-content-justification-right` is added when a user sets a block to use right justification.
- Individual styles are generated for non-default layout values that are set on the individual block being rendered. These styles are attached to the block via a container class name using the form `wp-container-$id` where the `$id` is a [unique number](https://developer.wordpress.org/reference/functions/wp_unique_id/).
#### Available layout types
-There are currently three layout types in use:
+There are currently four layout types in use:
- Default/Flow: Items are stacked vertically. The parent container block is set to `display: flow` and the spacing between children is handled via vertical margins.
- Constrained: Items are stacked vertically, using the same spacing logic as the Flow layout. Features constrained widths for child content, outputting widths for standard content size and wide size. Defaults to using global `contentSize` and `wideSize` values set in `settings.layout` in the `theme.json`.
- Flex: Items are displayed using a Flexbox layout. Defaults to a horizontal orientation. Spacing between children is handled via the `gap` CSS property.
+- Grid: Items are displayed using a Grid layout. Defaults to an `auto-fill` approach to column generation but can also be set to a fixed number of columns. Spacing between children is handled via the `gap` CSS property.
For controlling spacing between blocks, and enabling block spacing controls see: [What is blockGap and how can I use it?](https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#what-is-blockgap-and-how-can-i-use-it).
@@ -546,7 +543,7 @@ For controlling spacing between blocks, and enabling block spacing controls see:
The layout block support is designed to enable control over layout features from within the block and site editors. Where possible, try to use the features of the blocks to determine particular layout requirements rather than relying upon additional stylesheets.
-For themes that wish to target container blocks in order to add or adjust particular styles, the block's class name is often the best class name to use. Class names such as `wp-block-group` or `wp-block-columns` are usually reliable class names for targeting a particular block.
+For themes that wish to target container blocks in order to add or adjust particular styles, the block's class name is often the best class name to use. Class names such as `wp-block-group` or `wp-block-columns` are usually reliable class names for targeting a particular block. In addition to block and layout classnames, there is also a classname composed of block and layout together: for example, for a Group block with a constrained layout it will be `wp-block-group-is-layout-constrained`.
For targeting a block that uses a particular layout type, avoid targeting `wp-container-` as container classes may not always be present in the rendered markup.
@@ -559,6 +556,7 @@ The current semantic class names that can be output by the Layout block support
- `is-layout-flow`: Blocks that use the Default/Flow layout type.
- `is-layout-constrained`: Blocks that use the Constrained layout type.
- `is-layout-flex`: Blocks that use the Flex layout type.
+- `is-layout-grid`: Blocks that used the Grid layout type.
- `wp-container-$id`: Where `$id` is a semi-random number. A container class that only exists when the block contains non-default Layout values. This class should not be used directly for any CSS targeting as it may or may not be present.
- `is-horizontal`: When a block explicitly sets `orientation` to `horizontal`.
- `is-vertical`: When a block explicitly sets `orientation` to `vertical`.
diff --git a/docs/manifest.json b/docs/manifest.json
index aaadd15a570790..5f75e49924f355 100644
--- a/docs/manifest.json
+++ b/docs/manifest.json
@@ -1505,6 +1505,12 @@
"markdown_source": "../packages/core-data/README.md",
"parent": "packages"
},
+ {
+ "title": "@wordpress/create-block-interactive-template",
+ "slug": "packages-create-block-interactive-template",
+ "markdown_source": "../packages/create-block-interactive-template/README.md",
+ "parent": "packages"
+ },
{
"title": "@wordpress/create-block-tutorial-template",
"slug": "packages-create-block-tutorial-template",
@@ -1751,6 +1757,12 @@
"markdown_source": "../packages/npm-package-json-lint-config/README.md",
"parent": "packages"
},
+ {
+ "title": "@wordpress/nux",
+ "slug": "packages-nux",
+ "markdown_source": "../packages/nux/README.md",
+ "parent": "packages"
+ },
{
"title": "@wordpress/plugins",
"slug": "packages-plugins",
@@ -1997,6 +2009,12 @@
"markdown_source": "../docs/reference-guides/data/data-core-notices.md",
"parent": "data"
},
+ {
+ "title": "The NUX (New User Experience) Data",
+ "slug": "data-core-nux",
+ "markdown_source": "../docs/reference-guides/data/data-core-nux.md",
+ "parent": "data"
+ },
{
"title": "Preferences",
"slug": "data-core-preferences",
diff --git a/docs/reference-guides/README.md b/docs/reference-guides/README.md
index f13c838697f2de..33fdd9aa602414 100644
--- a/docs/reference-guides/README.md
+++ b/docs/reference-guides/README.md
@@ -63,6 +63,7 @@
- [**core/editor**: The Post Editor’s Data](/docs/reference-guides/data/data-core-editor.md)
- [**core/keyboard-shortcuts**: The Keyboard Shortcuts Data](/docs/reference-guides/data/data-core-keyboard-shortcuts.md)
- [**core/notices**: Notices Data](/docs/reference-guides/data/data-core-notices.md)
+ - [**core/nux**: The NUX (New User Experience) Data](/docs/reference-guides/data/data-core-nux.md)
- [**core/preferences**: Preferences](/docs/reference-guides/data/data-core-preferences.md)
- [**core/reusable-blocks**: Reusable blocks](/docs/reference-guides/data/data-core-reusable-blocks.md)
- [**core/rich-text**: Rich Text](/docs/reference-guides/data/data-core-rich-text.md)
diff --git a/docs/reference-guides/block-api/block-supports.md b/docs/reference-guides/block-api/block-supports.md
index 7e68e18eb14bf8..0995f4d86cfd76 100644
--- a/docs/reference-guides/block-api/block-supports.md
+++ b/docs/reference-guides/block-api/block-supports.md
@@ -543,6 +543,79 @@ supports: {
}
```
+## layout
+
+- Type: `boolean` or `Object`
+- Default value: null
+- Subproperties:
+ - `default`: type `Object`, default value null
+ - `allowSwitching`: type `boolean`, default value `false`
+ - `allowEditing`: type `boolean`, default value `true`
+ - `allowInheriting`: type `boolean`, default value `true`
+ - `allowSizingOnChildren`: type `boolean`, default value `false`
+ - `allowVerticalAlignment`: type `boolean`, default value `true`
+ - `allowJustification`: type `boolean`, default value `true`
+ - `allowOrientation`: type `boolean`, default value `true`
+
+This value only applies to blocks that are containers for inner blocks. If set to `true` the layout type will be `flow`. For other layout types it's necessary to set the `type` explicitly inside the `default` object.
+
+### layout.default
+
+- Type: `Object`
+- Default value: null
+
+Allows setting the `type` property to define what layout type is default for the block, and also default values for any properties inherent to that layout type, e.g., for a `flex` layout, a default value can be set for `flexWrap`.
+
+### layout.allowSwitching
+
+- Type: `boolean`
+- Default value: `false`
+
+Exposes a switcher control that allows toggling between all existing layout types.
+
+### layout.allowEditing
+
+- Type: `boolean`
+- Default value: `true`
+
+Determines display of layout controls in the block sidebar. If set to false, layout controls will be hidden.
+
+### layout.allowInheriting
+
+- Type: `boolean`
+- Default value: `true`
+
+For the `flow` layout type only, determines display of the "Inner blocks use content width" toggle.
+
+### layout.allowSizingOnChildren
+
+- Type: `boolean`
+- Default value: `false`
+
+For the `flex` layout type only, determines display of sizing controls (Fit/Fill/Fixed) on all child blocks of the flex block.
+
+### layout.allowVerticalAlignment
+
+- Type: `boolean`
+- Default value: `true`
+
+For the `flex` layout type only, determines display of the vertical alignment control in the block toolbar.
+
+### layout.allowJustification
+
+- Type: `boolean`
+- Default value: `true`
+
+For the `flex` layout type, determines display of the justification control in the block toolbar and block sidebar. For the `constrained` layout type, determines display of justification control in the block sidebar.
+
+### layout.allowOrientation
+
+- Type: `boolean`
+- Default value: `true`
+
+For the `flex` layout type only, determines display of the orientation control in the block toolbar.
+
+
## multiple
- Type: `boolean`
diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md
index a4e307c94df87e..d0a6ca7d356b2f 100644
--- a/docs/reference-guides/core-blocks.md
+++ b/docs/reference-guides/core-blocks.md
@@ -38,7 +38,7 @@ Add a user’s avatar. ([Source](https://github.com/WordPress/gutenberg/tree/tru
## Pattern
-Create and save content to reuse across your site. Update the block, and the changes apply everywhere it’s used. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/block))
+Create and save content to reuse across your site. Update the pattern, and the changes apply everywhere it’s used. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/block))
- **Name:** core/block
- **Category:** reusable
@@ -266,7 +266,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb
- **Name:** core/file
- **Category:** media
-- **Supports:** align, anchor, color (background, gradients, link, ~~text~~), interactivity
+- **Supports:** align, anchor, color (background, gradients, link, ~~text~~)
- **Attributes:** displayPreview, downloadButtonText, fileId, fileName, href, id, previewHeight, showDownloadButton, textLinkHref, textLinkTarget
## Footnotes
@@ -275,7 +275,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb
- **Name:** core/footnotes
- **Category:** text
-- **Supports:** ~~html~~, ~~inserter~~, ~~multiple~~, ~~reusable~~
+- **Supports:** ~~html~~, ~~multiple~~, ~~reusable~~
- **Attributes:**
## Classic
@@ -421,7 +421,7 @@ A collection of blocks that allow visitors to get around your site. ([Source](ht
- **Name:** core/navigation
- **Category:** theme
-- **Supports:** align (full, wide), inserter, interactivity, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, units), typography (fontSize, lineHeight), ~~html~~
+- **Supports:** align (full, wide), inserter, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, units), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** __unstableLocation, backgroundColor, customBackgroundColor, customOverlayBackgroundColor, customOverlayTextColor, customTextColor, hasIcon, icon, maxNestingLevel, openSubmenusOnClick, overlayBackgroundColor, overlayMenu, overlayTextColor, ref, rgbBackgroundColor, rgbTextColor, showSubmenuIcon, templateLock, textColor
## Custom Link
diff --git a/docs/reference-guides/data/README.md b/docs/reference-guides/data/README.md
index 5f4d8d92d4bd49..1134c1d5ddd307 100644
--- a/docs/reference-guides/data/README.md
+++ b/docs/reference-guides/data/README.md
@@ -12,6 +12,7 @@
- [**core/editor**: The Post Editor’s Data](/docs/reference-guides/data/data-core-editor.md)
- [**core/keyboard-shortcuts**: The Keyboard Shortcuts Data](/docs/reference-guides/data/data-core-keyboard-shortcuts.md)
- [**core/notices**: Notices Data](/docs/reference-guides/data/data-core-notices.md)
+- [**core/nux**: The NUX (New User Experience) Data](/docs/reference-guides/data/data-core-nux.md)
- [**core/preferences**: Preferences](/docs/reference-guides/data/data-core-preferences.md)
- [**core/reusable-blocks**: Reusable blocks](/docs/reference-guides/data/data-core-reusable-blocks.md)
- [**core/rich-text**: Rich Text](/docs/reference-guides/data/data-core-rich-text.md)
diff --git a/docs/reference-guides/data/data-core-block-editor.md b/docs/reference-guides/data/data-core-block-editor.md
index 67dbc48ccf29d8..fd29b1c6e1388c 100644
--- a/docs/reference-guides/data/data-core-block-editor.md
+++ b/docs/reference-guides/data/data-core-block-editor.md
@@ -485,6 +485,29 @@ _Returns_
- `Array`: ids of top-level and descendant blocks.
+### getDirectInsertBlock
+
+Returns the block to be directly inserted by the block appender.
+
+_Parameters_
+
+- _state_ `Object`: Editor state.
+- _rootClientId_ `?string`: Optional root client ID of block list.
+
+_Returns_
+
+- `?WPDirectInsertBlock`: The block type to be directly inserted.
+
+_Type Definition_
+
+- _WPDirectInsertBlock_ `Object`
+
+_Properties_
+
+- _name_ `string`: The type of block.
+- _attributes_ `?Object`: Attributes to pass to the newly created block.
+- _attributesToCopy_ `?Array`: Attributes to be copied from adjecent blocks when inserted.
+
### getDraggedBlockClientIds
Returns the client ids of any blocks being directly dragged.
diff --git a/docs/reference-guides/data/data-core-nux.md b/docs/reference-guides/data/data-core-nux.md
new file mode 100644
index 00000000000000..eb6a1c3b5c9a5b
--- /dev/null
+++ b/docs/reference-guides/data/data-core-nux.md
@@ -0,0 +1,93 @@
+# The NUX (New User Experience) Data
+
+Namespace: `core/nux`.
+
+## Selectors
+
+
+
+### areTipsEnabled
+
+Returns whether or not tips are globally enabled.
+
+_Parameters_
+
+- _state_ `Object`: Global application state.
+
+_Returns_
+
+- `boolean`: Whether tips are globally enabled.
+
+### getAssociatedGuide
+
+Returns an object describing the guide, if any, that the given tip is a part of.
+
+_Parameters_
+
+- _state_ `Object`: Global application state.
+- _tipId_ `string`: The tip to query.
+
+_Returns_
+
+- `?NUXGuideInfo`: Information about the associated guide.
+
+### isTipVisible
+
+Determines whether or not the given tip is showing. Tips are hidden if they are disabled, have been dismissed, or are not the current tip in any guide that they have been added to.
+
+_Parameters_
+
+- _state_ `Object`: Global application state.
+- _tipId_ `string`: The tip to query.
+
+_Returns_
+
+- `boolean`: Whether or not the given tip is showing.
+
+
+
+## Actions
+
+
+
+### disableTips
+
+Returns an action object that, when dispatched, prevents all tips from showing again.
+
+_Returns_
+
+- `Object`: Action object.
+
+### dismissTip
+
+Returns an action object that, when dispatched, dismisses the given tip. A dismissed tip will not show again.
+
+_Parameters_
+
+- _id_ `string`: The tip to dismiss.
+
+_Returns_
+
+- `Object`: Action object.
+
+### enableTips
+
+Returns an action object that, when dispatched, makes all tips show again.
+
+_Returns_
+
+- `Object`: Action object.
+
+### triggerGuide
+
+Returns an action object that, when dispatched, presents a guide that takes the user through a series of tips step by step.
+
+_Parameters_
+
+- _tipIds_ `string[]`: Which tips to show in the guide.
+
+_Returns_
+
+- `Object`: Action object.
+
+
diff --git a/docs/reference-guides/filters/block-filters.md b/docs/reference-guides/filters/block-filters.md
index e41215d67065a1..66e89b0a1d614a 100644
--- a/docs/reference-guides/filters/block-filters.md
+++ b/docs/reference-guides/filters/block-filters.md
@@ -63,11 +63,13 @@ function addListBlockClassName( settings, name ) {
return settings;
}
- return lodash.assign( {}, settings, {
- supports: lodash.assign( {}, settings.supports, {
+ return {
+ ...settings,
+ supports: {
+ ...settings.supports,
className: true,
- } ),
- } );
+ },
+ };
}
wp.hooks.addFilter(
@@ -126,7 +128,10 @@ Adding a background by default to all blocks.
```js
function addBackgroundColorStyle( props ) {
- return lodash.assign( props, { style: { backgroundColor: 'red' } } );
+ return {
+ ...props,
+ style: { backgroundColor: 'red' },
+ };
}
wp.hooks.addFilter(
@@ -276,9 +281,10 @@ var withClientIdClassName = wp.compose.createHigherOrderComponent( function (
BlockListBlock
) {
return function ( props ) {
- var newProps = lodash.assign( {}, props, {
+ var newProps = {
+ ...props,
className: 'block-' + props.clientId,
- } );
+ };
return el( BlockListBlock, newProps );
};
diff --git a/docs/toc.json b/docs/toc.json
index 085bbb536ece2b..1660afdcc29497 100644
--- a/docs/toc.json
+++ b/docs/toc.json
@@ -284,6 +284,7 @@
"docs/reference-guides/data/data-core-keyboard-shortcuts.md": []
},
{ "docs/reference-guides/data/data-core-notices.md": [] },
+ { "docs/reference-guides/data/data-core-nux.md": [] },
{
"docs/reference-guides/data/data-core-preferences.md": []
},
diff --git a/gutenberg.php b/gutenberg.php
index 8037b9acba9c86..8a5b9e110a51c6 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.1
* Requires PHP: 5.6
- * Version: 16.1.1
+ * Version: 16.2.1
* Author: Gutenberg Team
* Text Domain: gutenberg
*
diff --git a/lib/blocks.php b/lib/blocks.php
index 8185567db1b804..e98f711b5c85a5 100644
--- a/lib/blocks.php
+++ b/lib/blocks.php
@@ -372,3 +372,31 @@ function gutenberg_register_legacy_social_link_blocks() {
}
add_action( 'init', 'gutenberg_register_legacy_social_link_blocks' );
+
+/**
+ * Migrate the legacy `sync_status` meta key (added 16.1) to the new `wp_pattern_sync_status` meta key (16.1.1).
+ *
+ * This filter is INTENTIONALLY left out of core as the meta key was fist introduced to core in 6.3 as `wp_pattern_sync_status`.
+ * see https://github.com/WordPress/gutenberg/pull/52232
+ *
+ * @param mixed $value The value to return, either a single metadata value or an array of values depending on the value of $single.
+ * @param int $object_id ID of the object metadata is for.
+ * @param string $meta_key Metadata key.
+ * @param bool $single Whether to return only the first value of the specified $meta_key.
+ */
+function gutenberg_legacy_wp_block_post_meta( $value, $object_id, $meta_key, $single ) {
+ if ( 'wp_pattern_sync_status' !== $meta_key ) {
+ return $value;
+ }
+
+ $sync_status = get_post_meta( $object_id, 'sync_status', $single );
+
+ if ( $single && 'unsynced' === $sync_status ) {
+ return $sync_status;
+ } elseif ( isset( $sync_status[0] ) && 'unsynced' === $sync_status[0] ) {
+ return $sync_status;
+ }
+
+ return $value;
+}
+add_filter( 'default_post_metadata', 'gutenberg_legacy_wp_block_post_meta', 10, 4 );
diff --git a/lib/class-wp-theme-json-resolver-gutenberg.php b/lib/class-wp-theme-json-resolver-gutenberg.php
index 6e9d05cd7f238b..1e825e3c6bbe4f 100644
--- a/lib/class-wp-theme-json-resolver-gutenberg.php
+++ b/lib/class-wp-theme-json-resolver-gutenberg.php
@@ -275,7 +275,9 @@ public static function get_theme_data( $deprecated = array(), $options = array()
}
// BEGIN OF EXPERIMENTAL CODE. Not to backport to core.
- static::$theme = WP_Fonts_Resolver::add_missing_fonts_to_theme_json( static::$theme );
+ if ( ! class_exists( 'WP_Font_Face' ) && class_exists( 'WP_Fonts_Resolver' ) ) {
+ static::$theme = WP_Fonts_Resolver::add_missing_fonts_to_theme_json( static::$theme );
+ }
// END OF EXPERIMENTAL CODE.
}
diff --git a/lib/client-assets.php b/lib/client-assets.php
index 99aa7f147ecbfc..891eb05eabdbeb 100644
--- a/lib/client-assets.php
+++ b/lib/client-assets.php
@@ -368,6 +368,15 @@ function gutenberg_register_packages_styles( $styles ) {
);
$styles->add_data( 'wp-edit-blocks', 'rtl', 'replace' );
+ gutenberg_override_style(
+ $styles,
+ 'wp-nux',
+ gutenberg_url( 'build/nux/style.css' ),
+ array( 'wp-components' ),
+ $version
+ );
+ $styles->add_data( 'wp-nux', 'rtl', 'replace' );
+
gutenberg_override_style(
$styles,
'wp-block-library-theme',
diff --git a/lib/compat/wordpress-6.3/blocks.php b/lib/compat/wordpress-6.3/blocks.php
index b338d0a2467096..962c9ee3e07ef3 100644
--- a/lib/compat/wordpress-6.3/blocks.php
+++ b/lib/compat/wordpress-6.3/blocks.php
@@ -45,7 +45,7 @@ function gutenberg_rename_reusable_block_cpt_to_pattern( $args, $post_type ) {
$args['labels']['singular_name'] = _x( 'Pattern', 'post type singular name' );
$args['labels']['add_new_item'] = __( 'Add new Pattern' );
$args['labels']['new_item'] = __( 'New Pattern' );
- $args['labels']['edit_item'] = __( 'Edit Pattern' );
+ $args['labels']['edit_item'] = __( 'Edit Block Pattern' );
$args['labels']['view_item'] = __( 'View Pattern' );
$args['labels']['view_items'] = __( 'View Patterns' );
$args['labels']['all_items'] = __( 'All Patterns' );
@@ -60,6 +60,7 @@ function gutenberg_rename_reusable_block_cpt_to_pattern( $args, $post_type ) {
$args['labels']['item_reverted_to_draft'] = __( 'Pattern reverted to draft.' );
$args['labels']['item_scheduled'] = __( 'Pattern scheduled.' );
$args['labels']['item_updated'] = __( 'Pattern updated.' );
+ $args['rest_controller_class'] = 'Gutenberg_REST_Blocks_Controller';
}
return $args;
@@ -89,7 +90,7 @@ function gutenberg_add_custom_fields_to_wp_block( $args, $post_type ) {
add_filter( 'register_post_type_args', 'gutenberg_add_custom_fields_to_wp_block', 10, 2 );
/**
- * Adds sync_status meta fields to the wp_block post type so an unsynced option can be added.
+ * Adds wp_pattern_sync_status meta fields to the wp_block post type so an unsynced option can be added.
*
* Note: This should be removed when the minimum required WP version is >= 6.3.
*
@@ -101,39 +102,21 @@ function gutenberg_wp_block_register_post_meta() {
$post_type = 'wp_block';
register_post_meta(
$post_type,
- 'sync_status',
+ 'wp_pattern_sync_status',
array(
'auth_callback' => function() {
return current_user_can( 'edit_posts' );
},
- 'sanitize_callback' => 'gutenberg_wp_block_sanitize_post_meta',
+ 'sanitize_callback' => 'sanitize_text_field',
'single' => true,
'type' => 'string',
'show_in_rest' => array(
'schema' => array(
- 'type' => 'string',
- 'properties' => array(
- 'sync_status' => array(
- 'type' => 'string',
- ),
- ),
+ 'type' => 'string',
+ 'enum' => array( 'partial', 'unsynced' ),
),
),
)
);
}
-/**
- * Sanitizes the array of wp_block post meta sync_status string.
- *
- * Note: This should be removed when the minimum required WP version is >= 6.3.
- *
- * @see https://github.com/WordPress/gutenberg/pull/51144
- *
- * @param array $meta_value String to sanitize.
- *
- * @return array Sanitized string.
- */
-function gutenberg_wp_block_sanitize_post_meta( $meta_value ) {
- return sanitize_text_field( $meta_value );
-}
add_action( 'init', 'gutenberg_wp_block_register_post_meta' );
diff --git a/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php b/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php
index 91417971e22c73..fcf6e13b0954d7 100644
--- a/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php
+++ b/lib/compat/wordpress-6.3/class-gutenberg-navigation-fallback.php
@@ -23,9 +23,18 @@ class Gutenberg_Navigation_Fallback {
*/
public static function get_fallback() {
+ /**
+ * Filters whether or not a fallback should be created.
+ *
+ * @since 6.3.0
+ *
+ * @param bool Whether or not to create a fallback.
+ */
+ $should_create_fallback = apply_filters( 'gutenberg_navigation_should_create_fallback', true );
+
$fallback = static::get_most_recently_published_navigation();
- if ( $fallback ) {
+ if ( $fallback || ! $should_create_fallback ) {
return $fallback;
}
diff --git a/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php b/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php
new file mode 100644
index 00000000000000..5279a2c3a829ec
--- /dev/null
+++ b/lib/compat/wordpress-6.3/class-gutenberg-rest-blocks-controller.php
@@ -0,0 +1,51 @@
+\s*\d+\s*_',
+ '',
+ $content
+ );
+}
+
+add_filter( 'the_content', 'gutenberg_trim_footnotes' );
diff --git a/lib/compat/wordpress-6.3/script-loader.php b/lib/compat/wordpress-6.3/script-loader.php
index c515eb10fdc6bb..8f7bda2a648114 100644
--- a/lib/compat/wordpress-6.3/script-loader.php
+++ b/lib/compat/wordpress-6.3/script-loader.php
@@ -81,7 +81,6 @@ function _gutenberg_get_iframed_editor_assets() {
ob_start();
wp_print_styles();
- wp_print_fonts( true );
$styles = ob_get_clean();
ob_start();
diff --git a/lib/compat/wordpress-6.3/theme-previews.php b/lib/compat/wordpress-6.3/theme-previews.php
index eab05c5824b1ff..26153d74878b58 100644
--- a/lib/compat/wordpress-6.3/theme-previews.php
+++ b/lib/compat/wordpress-6.3/theme-previews.php
@@ -88,7 +88,7 @@ function addLivePreviewButton() {
livePreviewButton.setAttribute('class', 'button button-primary');
livePreviewButton.setAttribute(
'href',
- `/wp-admin/site-editor.php?wp_theme_preview=${themePath}&return=themes.php`
+ `?wp_theme_preview=${themePath}&return=themes.php`
);
livePreviewButton.innerHTML = '';
themeInfo.querySelector('.theme-actions').appendChild(livePreviewButton);
@@ -107,7 +107,7 @@ function block_theme_activate_nonce() {
$nonce_handle = 'switch-theme_' . gutenberg_get_theme_preview_path();
?>
post_content;
}
+ // Check if block editor is disabled by "Classic Editor" or another plugin.
+ if (
+ function_exists( 'use_block_editor_for_post_type' ) &&
+ ! use_block_editor_for_post_type( $current_post->post_type )
+ ) {
+ return true;
+ }
+
if ( empty( $content ) ) {
return false;
}
diff --git a/lib/experimental/fonts-api/fonts-api.php b/lib/experimental/fonts-api/fonts-api.php
index 841efeda47a953..8d07dc118f56e1 100644
--- a/lib/experimental/fonts-api/fonts-api.php
+++ b/lib/experimental/fonts-api/fonts-api.php
@@ -26,14 +26,7 @@ function wp_fonts() {
// Initialize.
$wp_fonts->register_provider( 'local', 'WP_Fonts_Provider_Local' );
add_action( 'wp_head', 'wp_print_fonts', 50 );
-
- /*
- * For themes without a theme.json, admin printing is initiated by the 'admin_print_styles' hook.
- * For themes with theme.json, admin printing is initiated by _wp_get_iframed_editor_assets().
- */
- if ( ! wp_theme_has_theme_json() ) {
- add_action( 'admin_print_styles', 'wp_print_fonts', 50 );
- }
+ add_action( 'admin_print_styles', 'wp_print_fonts', 50 );
}
return $wp_fonts;
@@ -250,3 +243,17 @@ static function( $mime_types ) {
* during the build. See: tools/webpack/blocks.js.
*/
add_action( 'init', 'WP_Fonts_Resolver::register_fonts_from_theme_json', 21 );
+
+add_filter(
+ 'block_editor_settings_all',
+ static function( $settings ) {
+ ob_start();
+ wp_print_fonts( true );
+ $styles = ob_get_clean();
+
+ // Add the font-face styles to iframed editor assets.
+ $settings['__unstableResolvedAssets']['styles'] .= $styles;
+ return $settings;
+ },
+ 11
+);
diff --git a/lib/experimental/fonts/class-wp-font-face-resolver.php b/lib/experimental/fonts/class-wp-font-face-resolver.php
new file mode 100644
index 00000000000000..16e74d6051aa74
--- /dev/null
+++ b/lib/experimental/fonts/class-wp-font-face-resolver.php
@@ -0,0 +1,158 @@
+get_settings();
+
+ // Bail out early if there are no font settings.
+ if ( empty( $settings['typography'] ) || empty( $settings['typography']['fontFamilies'] ) ) {
+ return array();
+ }
+
+ return static::parse_settings( $settings );
+ }
+
+ /**
+ * Parse theme.json settings to extract font definitions with variations grouped by font-family.
+ *
+ * @since X.X.X
+ *
+ * @param array $settings Font settings to parse.
+ * @return array Returns an array of fonts, grouped by font-family.
+ */
+ private static function parse_settings( array $settings ) {
+ $fonts = array();
+
+ foreach ( $settings['typography']['fontFamilies'] as $font_families ) {
+ foreach ( $font_families as $definition ) {
+
+ // Skip if font-family "name" is not defined.
+ if ( empty( $definition['name'] ) ) {
+ continue;
+ }
+
+ // Skip if "fontFace" is not defined, meaning there are no variations.
+ if ( empty( $definition['fontFace'] ) ) {
+ continue;
+ }
+
+ $font_family = $definition['name'];
+
+ // Prepare the fonts array structure for this font-family.
+ if ( ! array_key_exists( $font_family, $fonts ) ) {
+ $fonts[ $font_family ] = array();
+ }
+
+ $fonts[ $font_family ] = static::convert_font_face_properties( $definition['fontFace'], $font_family );
+ }
+ }
+
+ return $fonts;
+ }
+
+ /**
+ * Converts font-face properties from theme.json format.
+ *
+ * @since X.X.X
+ *
+ * @param array $font_face_definition The font-face definitions to convert.
+ * @param string $font_family_property The value to store in the font-face font-family property.
+ * @return array Converted font-face properties.
+ */
+ private static function convert_font_face_properties( array $font_face_definition, $font_family_property ) {
+ $converted_font_faces = array();
+
+ foreach ( $font_face_definition as $font_face ) {
+ // Add the font-family property to the font-face.
+ $font_face['font-family'] = $font_family_property;
+
+ // Converts the "file:./" src placeholder into a theme font file URI.
+ if ( ! empty( $font_face['src'] ) ) {
+ $font_face['src'] = static::to_theme_file_uri( (array) $font_face['src'] );
+ }
+
+ // Convert camelCase properties into kebab-case.
+ $font_face = static::to_kebab_case( $font_face );
+
+ $converted_font_faces[] = $font_face;
+ }
+
+ return $converted_font_faces;
+ }
+
+ /**
+ * Converts each 'file:./' placeholder into a URI to the font file in the theme.
+ *
+ * The 'file:./' is specified in the theme's `theme.json` as a placeholder to be
+ * replaced with the URI to the font file's location in the theme. When a "src"
+ * beings with this placeholder, it is replaced, converting the src into a URI.
+ *
+ * @since X.X.X
+ *
+ * @param array $src An array of font file sources to process.
+ * @return array An array of font file src URI(s).
+ */
+ private static function to_theme_file_uri( array $src ) {
+ $placeholder = 'file:./';
+
+ foreach ( $src as $src_key => $src_url ) {
+ // Skip if the src doesn't start with the placeholder, as there's nothing to replace.
+ if ( ! str_starts_with( $src_url, $placeholder ) ) {
+ continue;
+ }
+
+ $src_file = str_replace( $placeholder, '', $src_url );
+ $src[ $src_key ] = get_theme_file_uri( $src_file );
+ }
+
+ return $src;
+ }
+
+ /**
+ * Converts all first dimension keys into kebab-case.
+ *
+ * @since X.X.X
+ *
+ * @param array $data The array to process.
+ * @return array Data with first dimension keys converted into kebab-case.
+ */
+ private static function to_kebab_case( array $data ) {
+ foreach ( $data as $key => $value ) {
+ $kebab_case = _wp_to_kebab_case( $key );
+ $data[ $kebab_case ] = $value;
+ if ( $kebab_case !== $key ) {
+ unset( $data[ $key ] );
+ }
+ }
+
+ return $data;
+ }
+}
diff --git a/lib/experimental/fonts/class-wp-font-face.php b/lib/experimental/fonts/class-wp-font-face.php
new file mode 100644
index 00000000000000..482bf4d42396d3
--- /dev/null
+++ b/lib/experimental/fonts/class-wp-font-face.php
@@ -0,0 +1,418 @@
+ '',
+ 'font-style' => 'normal',
+ 'font-weight' => '400',
+ 'font-display' => 'fallback',
+ );
+
+ /**
+ * Valid font-face property names.
+ *
+ * @since X.X.X
+ *
+ * @var string[]
+ */
+ private $valid_font_face_properties = array(
+ 'ascent-override',
+ 'descent-override',
+ 'font-display',
+ 'font-family',
+ 'font-stretch',
+ 'font-style',
+ 'font-weight',
+ 'font-variant',
+ 'font-feature-settings',
+ 'font-variation-settings',
+ 'line-gap-override',
+ 'size-adjust',
+ 'src',
+ 'unicode-range',
+ );
+
+ /**
+ * Valid font-display values.
+ *
+ * @since X.X.X
+ *
+ * @var string[]
+ */
+ private $valid_font_display = array( 'auto', 'block', 'fallback', 'swap', 'optional' );
+
+ /**
+ * Array of font-face style tag's attribute(s)
+ * where the key is the attribute name and the
+ * value is its value.
+ *
+ * @since X.X.X
+ *
+ * @var string[]
+ */
+ private $style_tag_attrs = array();
+
+ /**
+ * Creates and initializes an instance of WP_Font_Face.
+ *
+ * @since X.X.X
+ */
+ public function __construct() {
+ /**
+ * Filters the font-face property defaults.
+ *
+ * @since X.X.X
+ *
+ * @param array $defaults {
+ * An array of required font-face properties and defaults.
+ *
+ * @type string $provider The provider ID. Default 'local'.
+ * @type string $font-family The font-family property. Default empty string.
+ * @type string $font-style The font-style property. Default 'normal'.
+ * @type string $font-weight The font-weight property. Default '400'.
+ * @type string $font-display The font-display property. Default 'fallback'.
+ * }
+ */
+ $this->font_face_property_defaults = apply_filters( 'wp_font_face_property_defaults', $this->font_face_property_defaults );
+
+ if (
+ function_exists( 'is_admin' ) && ! is_admin()
+ &&
+ function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' )
+ ) {
+ $this->style_tag_attrs = array( 'type' => 'text/css' );
+ }
+ }
+
+ /**
+ * Generates and prints the `@font-face` styles for the given fonts.
+ *
+ * @since X.X.X
+ *
+ * @param array $fonts The fonts to generate and print @font-face styles.
+ */
+ public function generate_and_print( array $fonts ) {
+ $fonts = $this->validate_fonts( $fonts );
+
+ // Bail out if there are no fonts are given to process.
+ if ( empty( $fonts ) ) {
+ return;
+ }
+
+ printf(
+ $this->get_style_element(),
+ $this->get_css( $fonts )
+ );
+ }
+
+ /**
+ * Validates each of the font-face properties.
+ *
+ * @since X.X.X
+ *
+ * @param array $fonts The fonts to valid.
+ * @return array Prepared font-faces organized by provider and font-family.
+ */
+ private function validate_fonts( array $fonts ) {
+ $validated_fonts = array();
+
+ foreach ( $fonts as $font_faces ) {
+ foreach ( $font_faces as $font_face ) {
+ $font_face = $this->validate_font_face_properties( $font_face );
+ // Skip if failed validation.
+ if ( false === $font_face ) {
+ continue;
+ }
+
+ $validated_fonts[] = $font_face;
+ }
+ }
+
+ return $validated_fonts;
+ }
+
+ /**
+ * Validates each font-face property.
+ *
+ * @since X.X.X
+ *
+ * @param array $font_face Font face properties to validate.
+ * @return false|array Validated font-face on success. Else, false.
+ */
+ private function validate_font_face_properties( array $font_face ) {
+ $font_face = wp_parse_args( $font_face, $this->font_face_property_defaults );
+
+ // Check the font-family.
+ if ( empty( $font_face['font-family'] ) || ! is_string( $font_face['font-family'] ) ) {
+ trigger_error( 'Font font-family must be a non-empty string.' );
+ return false;
+ }
+
+ // Make sure that local fonts have 'src' defined.
+ if ( empty( $font_face['src'] ) || ( ! is_string( $font_face['src'] ) && ! is_array( $font_face['src'] ) ) ) {
+ trigger_error( 'Font src must be a non-empty string or an array of strings.' );
+ return false;
+ }
+
+ // Validate the 'src' property.
+ if ( ! empty( $font_face['src'] ) ) {
+ foreach ( (array) $font_face['src'] as $src ) {
+ if ( empty( $src ) || ! is_string( $src ) ) {
+ trigger_error( 'Each font src must be a non-empty string.' );
+ return false;
+ }
+ }
+ }
+
+ // Check the font-weight.
+ if ( ! is_string( $font_face['font-weight'] ) && ! is_int( $font_face['font-weight'] ) ) {
+ trigger_error( 'Font font-weight must be a properly formatted string or integer.' );
+ return false;
+ }
+
+ // Check the font-display.
+ if ( ! in_array( $font_face['font-display'], $this->valid_font_display, true ) ) {
+ $font_face['font-display'] = $this->font_face_property_defaults['font-display'];
+ }
+
+ // Remove invalid properties.
+ foreach ( $font_face as $prop => $value ) {
+ if ( ! in_array( $prop, $this->valid_font_face_properties, true ) ) {
+ unset( $font_face[ $prop ] );
+ }
+ }
+
+ return $font_face;
+ }
+
+ /**
+ * Gets the `\n";
+ }
+
+ /**
+ * Gets the defined ' +
- ( assets?.styles ?? '' );
+ const html = `
+
+
+
+
+ ${ styles }
+ ${ scripts }
+
+
+
+
+`;
const [ src, cleanup ] = useMemo( () => {
const _src = URL.createObjectURL(
diff --git a/packages/block-editor/src/components/iframe/use-compatibility-styles.js b/packages/block-editor/src/components/iframe/use-compatibility-styles.js
index 4b250175d73d3c..eb738c7ebefdfe 100644
--- a/packages/block-editor/src/components/iframe/use-compatibility-styles.js
+++ b/packages/block-editor/src/components/iframe/use-compatibility-styles.js
@@ -45,6 +45,11 @@ export function useCompatibilityStyles() {
return accumulator;
}
+ // Don't try to add styles without ID. Styles enqueued via the WP dependency system will always have IDs.
+ if ( ! ownerNode.id ) {
+ return accumulator;
+ }
+
function matchFromRules( _cssRules ) {
return Array.from( _cssRules ).find(
( {
diff --git a/packages/block-editor/src/components/inner-blocks/README.md b/packages/block-editor/src/components/inner-blocks/README.md
index 5ecd9c90898210..0f5d303b8c7917 100644
--- a/packages/block-editor/src/components/inner-blocks/README.md
+++ b/packages/block-editor/src/components/inner-blocks/README.md
@@ -185,3 +185,13 @@ For example, a button block, deeply nested in several levels of block `X` that u
- **Type:** `Array`
- **Default:** - `undefined`. Determines which block types should be shown in the block inserter. For example, when inserting a block within the Navigation block we specify `core/navigation-link` and `core/navigation-link/page` as these are the most commonly used inner blocks. `prioritizedInserterBlocks` takes an array of the form {blockName}/{variationName}, where {variationName} is optional.
+
+### `defaultBlock`
+
+- **Type:** `Array`
+- **Default:** - `undefined`. Determines which block type should be inserted by default and any attributes that should be set by default when the block is inserted. Takes an array in the form of `[ blockname, {blockAttributes} ]`.
+
+### `directInsert`
+
+- **Type:** `Boolean`
+- **Default:** - `undefined`. Determines whether the default block should be inserted directly into the InnerBlocks area by the block appender.
diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js
index e1513b9008374c..9e0e4f19cfc7ea 100644
--- a/packages/block-editor/src/components/inner-blocks/index.js
+++ b/packages/block-editor/src/components/inner-blocks/index.js
@@ -46,6 +46,8 @@ function UncontrolledInnerBlocks( props ) {
clientId,
allowedBlocks,
prioritizedInserterBlocks,
+ defaultBlock,
+ directInsert,
__experimentalDefaultBlock,
__experimentalDirectInsert,
template,
@@ -64,6 +66,8 @@ function UncontrolledInnerBlocks( props ) {
clientId,
allowedBlocks,
prioritizedInserterBlocks,
+ defaultBlock,
+ directInsert,
__experimentalDefaultBlock,
__experimentalDirectInsert,
templateLock,
diff --git a/packages/block-editor/src/components/inner-blocks/index.native.js b/packages/block-editor/src/components/inner-blocks/index.native.js
index 8af05521e9f036..f07dcf4fc53053 100644
--- a/packages/block-editor/src/components/inner-blocks/index.native.js
+++ b/packages/block-editor/src/components/inner-blocks/index.native.js
@@ -73,6 +73,8 @@ function UncontrolledInnerBlocks( props ) {
clientId,
allowedBlocks,
prioritizedInserterBlocks,
+ defaultBlock,
+ directInsert,
__experimentalDefaultBlock,
__experimentalDirectInsert,
template,
@@ -103,6 +105,8 @@ function UncontrolledInnerBlocks( props ) {
clientId,
allowedBlocks,
prioritizedInserterBlocks,
+ defaultBlock,
+ directInsert,
__experimentalDefaultBlock,
__experimentalDirectInsert,
templateLock,
diff --git a/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js b/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js
index 633d6b2701ed65..44f99428a31bf8 100644
--- a/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js
+++ b/packages/block-editor/src/components/inner-blocks/use-nested-settings-update.js
@@ -3,6 +3,7 @@
*/
import { useLayoutEffect, useMemo } from '@wordpress/element';
import { useSelect, useDispatch, useRegistry } from '@wordpress/data';
+import deprecated from '@wordpress/deprecated';
/**
* Internal dependencies
@@ -25,9 +26,13 @@ const pendingSettingsUpdates = new WeakMap();
* @param {string[]} allowedBlocks An array of block names which are permitted
* in inner blocks.
* @param {string[]} prioritizedInserterBlocks Block names and/or block variations to be prioritized in the inserter, in the format {blockName}/{variationName}.
- * @param {?WPDirectInsertBlock} __experimentalDefaultBlock The default block to insert: [ blockName, { blockAttributes } ].
- * @param {?Function|boolean} __experimentalDirectInsert If a default block should be inserted directly by the
- * appender.
+ * @param {?WPDirectInsertBlock} defaultBlock The default block to insert: [ blockName, { blockAttributes } ].
+ * @param {?Function|boolean} directInsert If a default block should be inserted directly by the appender.
+ *
+ * @param {?WPDirectInsertBlock} __experimentalDefaultBlock A deprecated prop for the default block to insert: [ blockName, { blockAttributes } ]. Use `defaultBlock` instead.
+ *
+ * @param {?Function|boolean} __experimentalDirectInsert A deprecated prop for whether a default block should be inserted directly by the appender. Use `directInsert` instead.
+ *
* @param {string} [templateLock] The template lock specified for the inner
* blocks component. (e.g. "all")
* @param {boolean} captureToolbars Whether or children toolbars should be shown
@@ -41,6 +46,8 @@ export default function useNestedSettingsUpdate(
clientId,
allowedBlocks,
prioritizedInserterBlocks,
+ defaultBlock,
+ directInsert,
__experimentalDefaultBlock,
__experimentalDirectInsert,
templateLock,
@@ -108,11 +115,29 @@ export default function useNestedSettingsUpdate(
}
if ( __experimentalDefaultBlock !== undefined ) {
- newSettings.__experimentalDefaultBlock = __experimentalDefaultBlock;
+ deprecated( '__experimentalDefaultBlock', {
+ alternative: 'defaultBlock',
+ since: '6.3',
+ version: '6.4',
+ } );
+ newSettings.defaultBlock = __experimentalDefaultBlock;
+ }
+
+ if ( defaultBlock !== undefined ) {
+ newSettings.defaultBlock = defaultBlock;
}
if ( __experimentalDirectInsert !== undefined ) {
- newSettings.__experimentalDirectInsert = __experimentalDirectInsert;
+ deprecated( '__experimentalDirectInsert', {
+ alternative: 'directInsert',
+ since: '6.3',
+ version: '6.4',
+ } );
+ newSettings.directInsert = __experimentalDirectInsert;
+ }
+
+ if ( directInsert !== undefined ) {
+ newSettings.directInsert = directInsert;
}
// Batch updates to block list settings to avoid triggering cascading renders
@@ -144,6 +169,8 @@ export default function useNestedSettingsUpdate(
_allowedBlocks,
_prioritizedInserterBlocks,
_templateLock,
+ defaultBlock,
+ directInsert,
__experimentalDefaultBlock,
__experimentalDirectInsert,
captureToolbars,
diff --git a/packages/block-editor/src/components/inserter/index.js b/packages/block-editor/src/components/inserter/index.js
index 9c24497e5a9078..8e2972fbe2bf5e 100644
--- a/packages/block-editor/src/components/inserter/index.js
+++ b/packages/block-editor/src/components/inserter/index.js
@@ -231,7 +231,7 @@ export const ComposedPrivateInserter = compose( [
getBlockRootClientId,
hasInserterItems,
getAllowedBlocks,
- __experimentalGetDirectInsertBlock,
+ getDirectInsertBlock,
getSettings,
} = select( blockEditorStore );
@@ -243,8 +243,7 @@ export const ComposedPrivateInserter = compose( [
const allowedBlocks = getAllowedBlocks( rootClientId );
const directInsertBlock =
- shouldDirectInsert &&
- __experimentalGetDirectInsertBlock( rootClientId );
+ shouldDirectInsert && getDirectInsertBlock( rootClientId );
const settings = getSettings();
diff --git a/packages/block-editor/src/components/inserter/index.native.js b/packages/block-editor/src/components/inserter/index.native.js
index a3e6981e6ecfc7..6edef19583b3fc 100644
--- a/packages/block-editor/src/components/inserter/index.native.js
+++ b/packages/block-editor/src/components/inserter/index.native.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
-import { AccessibilityInfo, Platform, Text } from 'react-native';
+import { AccessibilityInfo, Platform } from 'react-native';
/**
* WordPress dependencies
@@ -35,33 +35,17 @@ const VOICE_OVER_ANNOUNCEMENT_DELAY = 1000;
const defaultRenderToggle = ( {
onToggle,
disabled,
- style,
- containerStyle,
+ iconStyle,
+ buttonStyle,
onLongPress,
- useExpandedMode,
} ) => {
- // The "expanded mode" refers to the editor's appearance when no blocks
- // are currently selected. The "add block" button has a separate style
- // for the "expanded mode", which are added via the below "expandedModeViewProps"
- // and "expandedModeViewText" variables.
- const expandedModeViewProps = useExpandedMode && {
- icon: ,
- customContainerStyles: containerStyle,
- fixedRatio: false,
- };
- const expandedModeViewText = (
-
- { __( 'Add blocks' ) }
-
- );
-
return (
}
+ icon={ }
onClick={ onToggle }
extraProps={ {
hint: __( 'Double tap to add a block' ),
@@ -69,12 +53,12 @@ const defaultRenderToggle = ( {
// usually required for components. See: https://github.com/WordPress/gutenberg/pull/18832#issuecomment-561411389.
testID: 'add-block-button',
onLongPress,
+ hitSlop: { top: 10, bottom: 10, left: 10, right: 10 },
} }
isDisabled={ disabled }
- { ...expandedModeViewProps }
- >
- { useExpandedMode && expandedModeViewText }
-
+ customContainerStyles={ buttonStyle }
+ fixedRatio={ false }
+ />
);
};
@@ -249,23 +233,21 @@ export class Inserter extends Component {
renderToggle = defaultRenderToggle,
getStylesFromColorScheme,
showSeparator,
- useExpandedMode,
} = this.props;
if ( showSeparator && isOpen ) {
return ;
}
- const style = useExpandedMode
- ? styles[ 'inserter-menu__add-block-button-icon--expanded' ]
- : getStylesFromColorScheme(
- styles[ 'inserter-menu__add-block-button-icon' ],
- styles[ 'inserter-menu__add-block-button-icon--dark' ]
- );
-
- const containerStyle = getStylesFromColorScheme(
+
+ const buttonStyle = getStylesFromColorScheme(
styles[ 'inserter-menu__add-block-button' ],
styles[ 'inserter-menu__add-block-button--dark' ]
);
+ const iconStyle = getStylesFromColorScheme(
+ styles[ 'inserter-menu__add-block-button-icon' ],
+ styles[ 'inserter-menu__add-block-button-icon--dark' ]
+ );
+
const onPress = () => {
this.setState(
{
@@ -301,10 +283,9 @@ export class Inserter extends Component {
onToggle: onPress,
isOpen,
disabled,
- style,
- containerStyle,
+ iconStyle,
+ buttonStyle,
onLongPress,
- useExpandedMode,
} ) }
( this.picker = instance ) }
diff --git a/packages/block-editor/src/components/inserter/reusable-block-rename-hint.js b/packages/block-editor/src/components/inserter/reusable-block-rename-hint.js
new file mode 100644
index 00000000000000..6a3a3d1eec260b
--- /dev/null
+++ b/packages/block-editor/src/components/inserter/reusable-block-rename-hint.js
@@ -0,0 +1,69 @@
+/**
+ * WordPress dependencies
+ */
+import { Button } from '@wordpress/components';
+import { useDispatch, useSelect } from '@wordpress/data';
+import { focus } from '@wordpress/dom';
+import { useRef } from '@wordpress/element';
+import { __ } from '@wordpress/i18n';
+import { close } from '@wordpress/icons';
+import { store as preferencesStore } from '@wordpress/preferences';
+
+const PREFERENCE_NAME = 'isResuableBlocksrRenameHintVisible';
+/*
+ * This hook was added in 6.3 to help users with the transition from Reusable blocks to Patterns.
+ * It is only exported for use in the reusable-blocks package as well as block-editor.
+ * It will be removed in 6.4. and should not be used in any new code.
+ */
+export function useReusableBlocksRenameHint() {
+ return useSelect(
+ ( select ) =>
+ select( preferencesStore ).get( 'core', PREFERENCE_NAME ) ?? true,
+ []
+ );
+}
+
+/*
+ * This component was added in 6.3 to help users with the transition from Reusable blocks to Patterns.
+ * It is only exported for use in the reusable-blocks package as well as block-editor.
+ * It will be removed in 6.4. and should not be used in any new code.
+ */
+export default function ReusableBlocksRenameHint() {
+ const isReusableBlocksRenameHint = useSelect(
+ ( select ) =>
+ select( preferencesStore ).get( 'core', PREFERENCE_NAME ) ?? true,
+ []
+ );
+
+ const ref = useRef();
+
+ const { set: setPreference } = useDispatch( preferencesStore );
+ if ( ! isReusableBlocksRenameHint ) {
+ return null;
+ }
+
+ return (
+
+
+ { __(
+ 'Reusable blocks are now synced patterns. A synced pattern will behave in exactly the same way as a reusable block.'
+ ) }
+
+
+ );
+}
diff --git a/packages/block-editor/src/components/inserter/reusable-blocks-tab.js b/packages/block-editor/src/components/inserter/reusable-blocks-tab.js
index c16d5f1a78e543..08cd8d57ba0d0e 100644
--- a/packages/block-editor/src/components/inserter/reusable-blocks-tab.js
+++ b/packages/block-editor/src/components/inserter/reusable-blocks-tab.js
@@ -13,6 +13,7 @@ import BlockTypesList from '../block-types-list';
import InserterPanel from './panel';
import InserterNoResults from './no-results';
import useBlockTypesState from './hooks/use-block-types-state';
+import ReusableBlocksRenameHint from './reusable-block-rename-hint';
function ReusableBlocksList( { onHover, onInsert, rootClientId } ) {
const [ items, , , onSelectItem ] = useBlockTypesState(
@@ -54,6 +55,9 @@ function ReusableBlocksList( { onHover, onInsert, rootClientId } ) {
export function ReusableBlocksTab( { rootClientId, onInsert, onHover } ) {
return (
<>
+