From 039aa88eb592a56e3d99f54ddda79514d1983838 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Tue, 26 Nov 2024 12:10:07 +0000 Subject: [PATCH] Merge changes published in the Gutenberg plugin "trunk" branch --- .eslintrc.js | 36 +- .github/ISSUE_TEMPLATE/Bug_report.yml | 10 + .github/workflows/build-plugin-zip.yml | 19 +- .github/workflows/bundle-size.yml | 6 +- .../workflows/check-backport-changelog.yml | 2 +- .../workflows/check-components-changelog.yml | 2 +- .github/workflows/cherry-pick-wp-release.yml | 2 +- .github/workflows/create-block.yml | 2 +- .github/workflows/end2end-test.yml | 4 +- .github/workflows/enforce-pr-labels.yml | 2 +- .../workflows/gradle-wrapper-validation.yml | 6 +- .github/workflows/performance.yml | 12 +- .github/workflows/publish-npm-packages.yml | 10 +- .github/workflows/pull-request-automation.yml | 22 +- .github/workflows/rnmobile-android-runner.yml | 52 +- .github/workflows/rnmobile-ios-runner.yml | 10 +- .github/workflows/static-checks.yml | 4 +- .github/workflows/storybook-pages.yml | 2 +- .github/workflows/sync-backport-changelog.yml | 2 +- .github/workflows/unit-test.yml | 28 +- .../upload-release-to-plugin-repo.yml | 2 +- .gitignore | 1 + .npmrc | 1 + README.md | 2 + backport-changelog/6.7/7139.md | 1 + backport-changelog/6.7/7298.md | 3 + backport-changelog/6.7/7314.md | 3 + backport-changelog/6.7/7336.md | 3 + backport-changelog/6.7/7360.md | 3 + backport-changelog/6.7/7543.md | 3 + backport-changelog/6.7/7552.md | 3 + backport-changelog/6.7/7561.md | 3 + backport-changelog/6.7/7661.md | 4 + backport-changelog/6.7/7676.md | 3 + backport-changelog/6.8/7069.md | 5 + backport-changelog/6.8/7129.md | 3 + backport-changelog/6.8/7265.md | 4 + backport-changelog/6.8/7488.md | 3 + backport-changelog/6.8/7498.md | 3 + backport-changelog/6.8/7575.md | 3 + backport-changelog/6.8/7604.md | 5 + backport-changelog/6.8/7643.md | 4 + backport-changelog/6.8/7681.md | 3 + backport-changelog/6.8/7687.md | 3 + backport-changelog/6.8/7695.md | 3 + backport-changelog/6.8/7697.md | 3 + backport-changelog/6.8/7698.md | 3 + backport-changelog/6.8/7759.md | 4 + backport-changelog/6.8/7784.md | 3 + backport-changelog/6.8/7825.md | 3 + backport-changelog/6.8/7848.md | 3 + .../get-subcomponent-descriptions.mjs | 46 + bin/api-docs/gen-components-docs/index.mjs | 134 + .../gen-components-docs/markdown/index.mjs | 40 + .../gen-components-docs/markdown/props.mjs | 51 + bin/api-docs/gen-theme-reference.mjs | 29 +- bin/check-licenses.mjs | 69 + bin/packages/get-babel-config.js | 2 + changelog.txt | 2458 + composer.json | 7 +- docs/contributors/code/README.md | 6 +- .../code/back-merging-to-wp-core.md | 2 +- docs/contributors/code/managing-packages.md | 6 +- docs/contributors/versions-in-wordpress.md | 3 + docs/explanations/architecture/performance.md | 6 + docs/explanations/architecture/styles.md | 18 +- .../fundamentals/block-in-the-editor.md | 2 + docs/getting-started/tutorial.md | 12 +- .../disable-editor-functionality.md | 31 + .../data-basics/1-data-basics-setup.md | 6 +- .../data-basics/3-building-an-edit-form.md | 12 +- .../4-building-a-create-page-form.md | 6 +- docs/how-to-guides/metabox.md | 2 + docs/manifest.json | 50 +- docs/reference-guides/block-api/README.md | 1 + .../block-api/block-api-versions.md | 2 +- .../block-api/block-bindings.md | 330 + .../block-api/block-context.md | 2 + .../block-api/block-edit-save.md | 4 + docs/reference-guides/core-blocks.md | 16 +- .../data/data-core-block-editor.md | 55 +- .../data/data-core-edit-post.md | 4 + .../data/data-core-edit-site.md | 14 + .../reference-guides/data/data-core-editor.md | 81 +- .../reference-guides/filters/block-filters.md | 25 + .../interactivity-api/api-reference.md | 935 +- .../interactivity-api/core-concepts/README.md | 2 + ...l-state-local-context-and-derived-state.md | 106 +- .../core-concepts/using-typescript.md | 746 + .../plugin-sidebar-more-menu-item.md | 2 + .../slotfills/plugin-sidebar.md | 2 + docs/toc.json | 6 + docs/tool/manifest.js | 2 +- gutenberg.php | 10 +- lib/block-supports/border.php | 28 +- lib/block-supports/typography.php | 24 +- lib/block-template-utils.php | 4 +- ...est-global-styles-controller-gutenberg.php | 210 +- lib/class-wp-theme-json-gutenberg.php | 249 +- ...class-wp-theme-json-resolver-gutenberg.php | 10 +- lib/client-assets.php | 66 +- lib/compat/wordpress-6.6/admin-bar.php | 48 - .../block-bindings/pattern-overrides.php | 62 - lib/compat/wordpress-6.6/block-editor.php | 50 - .../wordpress-6.6/block-template-utils.php | 362 - lib/compat/wordpress-6.6/blocks.php | 46 - ...global-styles-revisions-controller-6-6.php | 97 - ...utenberg-rest-templates-controller-6-6.php | 131 - .../class-gutenberg-token-map-6-6.php | 818 - lib/compat/wordpress-6.6/compat.php | 32 - .../class-gutenberg-html-decoder-6-6.php | 463 - ...class-gutenberg-html-open-elements-6-6.php | 541 - .../class-gutenberg-html-processor-6-6.php | 2472 - ...ass-gutenberg-html-processor-state-6-6.php | 143 - .../class-gutenberg-html-stack-event-6-6.php | 82 - ...class-gutenberg-html-tag-processor-6-6.php | 3559 -- ...g-html5-named-character-references-6-6.php | 1315 - lib/compat/wordpress-6.6/option.php | 53 - lib/compat/wordpress-6.6/post.php | 39 - lib/compat/wordpress-6.6/resolve-patterns.php | 84 - lib/compat/wordpress-6.6/rest-api.php | 216 - lib/compat/wordpress-6.7/block-bindings.php | 79 +- lib/compat/wordpress-6.7/block-templates.php | 49 +- lib/compat/wordpress-6.7/blocks.php | 94 + ...ss-gutenberg-rest-posts-controller-6-7.php | 704 + .../class-gutenberg-rest-server.php | 38 +- ...utenberg-rest-templates-controller-6-7.php | 2 +- lib/compat/wordpress-6.7/compat.php | 8 +- lib/compat/wordpress-6.7/post-formats.php | 24 + lib/compat/wordpress-6.7/rest-api.php | 42 + lib/compat/wordpress-6.7/script-modules.php | 43 + lib/compat/wordpress-6.8/block-comments.php | 70 + lib/compat/wordpress-6.8/blocks.php | 146 + ...-gutenberg-rest-comment-controller-6-8.php | 123 + ...tenberg-rest-post-types-controller-6-8.php | 61 + lib/compat/wordpress-6.8/functions.php | 35 + lib/compat/wordpress-6.8/post.php | 57 + lib/compat/wordpress-6.8/preload.php | 76 + lib/compat/wordpress-6.8/rest-api.php | 89 + lib/experimental/editor-settings.php | 7 +- lib/experimental/media/load.php | 31 +- lib/experimental/script-modules.php | 27 - lib/experiments-page.php | 21 +- lib/global-styles-and-settings.php | 45 +- lib/init.php | 2 +- lib/interactivity-api.php | 45 +- lib/load.php | 41 +- lib/rest-api.php | 20 +- package-lock.json | 51665 ++-------------- package.json | 153 +- packages/README.md | 87 +- packages/a11y/CHANGELOG.md | 10 + packages/a11y/package.json | 11 +- packages/a11y/src/index.js | 25 +- packages/a11y/src/module/index.ts | 22 +- .../src/{shared => script}/add-container.js | 0 .../src/{shared => script}/add-intro-text.ts | 10 +- .../test/add-container.test.js | 0 packages/a11y/src/shared/index.js | 28 - packages/annotations/.npmrc | 1 - packages/annotations/CHANGELOG.md | 10 + packages/annotations/package.json | 13 +- packages/api-fetch/.npmrc | 1 - packages/api-fetch/CHANGELOG.md | 10 + packages/api-fetch/package.json | 9 +- packages/autop/.npmrc | 1 - packages/autop/CHANGELOG.md | 10 + packages/autop/package.json | 5 +- .../babel-plugin-import-jsx-pragma/.npmrc | 1 - .../CHANGELOG.md | 10 + .../package.json | 4 +- packages/babel-plugin-makepot/.npmrc | 1 - packages/babel-plugin-makepot/CHANGELOG.md | 10 + packages/babel-plugin-makepot/package.json | 4 +- packages/babel-preset-default/.npmrc | 1 - packages/babel-preset-default/CHANGELOG.md | 27 + packages/babel-preset-default/README.md | 4 +- packages/babel-preset-default/bin/index.js | 11 +- packages/babel-preset-default/index.js | 14 + packages/babel-preset-default/package.json | 22 +- .../polyfill-exclusions.js | 10 + .../babel-preset-default/replace-polyfills.js | 59 + .../test/fixtures/polyfill.js | 6 + packages/babel-preset-default/test/index.js | 18 + packages/base-styles/.npmrc | 1 - packages/base-styles/CHANGELOG.md | 10 + packages/base-styles/_animations.scss | 46 +- packages/base-styles/_colors.scss | 2 +- packages/base-styles/_mixins.scss | 68 + packages/base-styles/_variables.scss | 62 +- packages/base-styles/_z-index.scss | 18 +- packages/base-styles/package.json | 2 +- packages/blob/.npmrc | 1 - packages/blob/CHANGELOG.md | 10 + packages/blob/package.json | 5 +- packages/block-directory/.npmrc | 1 - packages/block-directory/CHANGELOG.md | 10 + packages/block-directory/package.json | 44 +- .../downloadable-block-list-item/index.js | 147 +- .../downloadable-block-list-item/style.scss | 50 +- .../downloadable-blocks-panel/style.scss | 3 - .../src/plugins/get-install-missing/index.js | 3 +- .../get-install-missing/install-button.js | 3 +- packages/block-editor/.npmrc | 1 - packages/block-editor/CHANGELOG.md | 10 + packages/block-editor/README.md | 58 +- packages/block-editor/package.json | 66 +- .../block-editor/src/autocompleters/block.js | 23 +- .../block-editor/src/autocompleters/link.js | 3 +- .../background-image-control/index.js | 741 + .../background-image-control/style.scss | 170 + .../background-image-control/test/index.js | 47 + .../src/components/block-actions/index.js | 14 +- .../src/components/block-canvas/index.js | 18 +- .../src/components/block-canvas/style.scss | 3 +- .../src/components/block-card/index.js | 15 +- .../src/components/block-controls/slot.js | 8 +- .../block-controls/use-has-block-controls.js | 35 - .../src/components/block-draggable/style.scss | 4 +- .../index.js | 2 +- .../block-heading-level-dropdown/index.js | 8 +- .../components/block-info-slot-fill/index.js | 27 - .../src/components/block-inspector/index.js | 176 +- .../src/components/block-inspector/style.scss | 7 +- .../src/components/block-list/block.js | 56 +- .../src/components/block-list/block.native.js | 4 - .../src/components/block-list/content.scss | 77 +- .../src/components/block-list/index.js | 58 +- .../block-list/use-block-props/index.js | 13 +- .../use-focus-first-element.js | 9 +- .../use-block-props/use-nav-mode-exit.js | 46 - .../use-selected-block-event-handlers.js | 16 +- .../block-list/use-in-between-inserter.js | 9 +- .../block-list/zoom-out-separator.js | 57 +- .../src/components/block-lock/modal.js | 2 +- .../src/components/block-manager/category.js | 102 + .../src/components/block-manager/checklist.js | 12 +- .../src/components/block-manager/index.js | 127 + .../src/components/block-manager/style.scss | 28 +- .../src/components/block-mover/README.md | 23 +- .../block-mover/stories/index.story.js | 144 +- .../src/components/block-mover/style.scss | 3 + .../components/block-navigation/dropdown.js | 3 +- .../components/block-parent-selector/index.js | 23 +- .../block-pattern-setup/setup-toolbar.js | 15 +- .../components/block-patterns-list/README.md | 16 +- .../components/block-patterns-list/index.js | 86 +- .../block-patterns-list/stories/fixtures.js | 834 + .../stories/index.story.js | 64 + .../components/block-patterns-list/style.scss | 2 + .../components/block-patterns-paging/index.js | 17 +- .../block-patterns-paging/style.scss | 37 +- .../src/components/block-popover/index.js | 12 +- .../src/components/block-preview/async.js} | 0 .../src/components/block-preview/auto.js | 5 +- .../src/components/block-preview/index.js | 11 +- .../block-quick-navigation/index.js | 3 +- .../block-settings-menu-controls/index.js | 15 - .../block-settings-dropdown.js | 230 +- .../components/block-settings-menu/index.js | 3 + .../src/components/block-switcher/index.js | 67 +- .../test/use-transformed.patterns.js | 6 +- .../components/block-switcher/test/utils.js | 6 +- .../src/components/block-switcher/utils.js | 2 +- .../components/block-toolbar/change-design.js | 127 + .../src/components/block-toolbar/index.js | 83 +- .../src/components/block-toolbar/shuffle.js | 111 - .../src/components/block-toolbar/style.scss | 34 +- .../block-toolbar/switch-section-style.js | 115 + .../block-toolbar/use-has-block-toolbar.js | 50 +- .../block-tools/block-selection-button.js | 302 - .../block-tools/block-toolbar-breadcrumb.js | 51 - .../src/components/block-tools/index.js | 91 +- .../components/block-tools/insertion-point.js | 12 +- .../src/components/block-tools/style.scss | 117 +- .../use-block-toolbar-popover-props.js | 4 +- .../block-tools/use-show-block-tools.js | 26 +- .../zoom-out-mode-inserter-button.js | 19 +- .../block-tools/zoom-out-mode-inserters.js | 79 +- .../block-tools/zoom-out-popover.js | 46 - .../block-tools/zoom-out-toolbar.js | 164 - .../block-variation-picker/index.js | 3 +- .../block-variation-transforms/index.js | 25 +- .../block-vertical-alignment-control/icons.js | 34 - .../block-vertical-alignment-control/ui.js | 26 +- .../border-radius-control/linked-button.js | 20 +- .../button-block-appender/content.scss | 5 - .../components/button-block-appender/index.js | 3 +- .../collab/block-comment-icon-slot.js | 8 + .../collab/block-comment-icon-toolbar-slot.js | 10 + .../color-palette/with-color-context.js | 32 +- .../components/colors-gradients/dropdown.js | 6 +- ...se-multiple-origin-colors-and-gradients.js | 8 +- .../convert-to-group-buttons/toolbar.js | 8 +- .../default-block-appender/content.scss | 32 +- .../src/components/font-family/README.md | 6 +- .../src/components/font-family/index.js | 26 +- .../global-styles/background-panel.js | 749 +- .../components/global-styles/border-panel.js | 2 +- .../components/global-styles/color-panel.js | 18 +- .../global-styles/dimensions-panel.js | 43 +- .../components/global-styles/filters-panel.js | 3 +- .../global-styles/shadow-panel-components.js | 61 +- .../src/components/global-styles/style.scss | 173 +- .../global-styles/test/background-panel.js | 48 +- .../test/use-global-styles-context.native.js | 1 + .../test/use-global-styles-output.js | 2 +- .../use-global-styles-context.native.js | 6 + .../global-styles/use-global-styles-output.js | 2 +- .../src/components/iframe/content.scss | 65 +- .../iframe/get-compatibility-styles.js | 13 +- .../src/components/iframe/index.js | 281 +- .../src/components/iframe/style.scss | 17 + .../components/image-editor/use-save-image.js | 7 + .../components/image-size-control/index.js | 117 +- .../image-size-control/test/index.js | 68 +- .../src/components/inner-blocks/content.scss | 13 - .../src/components/inner-blocks/index.js | 35 +- .../use-nested-settings-update.js | 26 +- .../inserter-button/index.native.js | 2 +- .../inserter-draggable-blocks/index.js | 11 +- .../src/components/inserter-listbox/item.js | 6 +- .../pattern-explorer-sidebar.js | 5 +- .../block-patterns-explorer/pattern-list.js | 9 +- .../inserter/block-patterns-tab/index.js | 4 +- .../pattern-category-previews.js | 33 +- .../block-patterns-tab/patterns-filter.js | 2 +- .../use-pattern-categories.js | 8 + .../inserter/block-patterns-tab/utils.js | 5 + .../components/inserter/block-types-tab.js | 2 +- .../inserter/category-tabs/index.js | 29 +- .../inserter/hooks/use-block-types-state.js | 53 +- .../inserter/hooks/use-insertion-point.js | 48 +- .../inserter/hooks/use-patterns-paging.js | 7 +- .../inserter/hooks/use-patterns-state.js | 55 +- .../inserter/media-tab/media-preview.js | 56 +- .../inserter/media-tab/media-tab.js | 3 +- .../src/components/inserter/menu.js | 21 +- .../inserter/mobile-tab-navigation.js | 23 +- .../src/components/inserter/quick-inserter.js | 14 +- .../src/components/inserter/search-results.js | 6 - .../src/components/inserter/style.scss | 84 +- .../src/components/inserter/tabs.js | 78 - .../inserter/test/block-types-tab.native.js | 67 - .../inspector-controls-tabs/index.js | 38 +- .../position-controls-panel.js | 4 +- .../inspector-controls-tabs/style.scss | 8 +- .../use-inspector-controls-tabs.js | 20 +- .../inspector-controls-tabs/utils.js | 3 - .../components/inspector-controls/README.md | 2 + .../src/components/inspector-controls/slot.js | 10 +- .../inspector-popover-header/index.js | 6 +- .../inspector-popover-header/style.scss | 13 - .../src/components/link-control/index.js | 38 +- .../components/link-control/link-preview.js | 23 +- .../components/link-control/search-input.js | 11 +- .../components/link-control/search-results.js | 15 +- .../link-control/settings-drawer.js | 3 +- .../src/components/link-control/style.scss | 22 - .../src/components/link-control/test/index.js | 217 +- .../src/components/list-view/appender.js | 11 +- .../components/list-view/block-contents.js | 29 +- .../list-view/block-select-button.js | 7 +- .../src/components/list-view/branch.js | 14 +- .../src/components/list-view/index.js | 3 +- .../src/components/list-view/style.scss | 34 +- .../components/media-placeholder/content.scss | 22 +- .../src/components/media-placeholder/index.js | 130 +- .../media-replace-flow/test/index.js | 2 +- .../src/components/provider/index.js | 4 +- .../provider/test/experimental-provider.js | 44 +- .../provider/test/use-block-sync.js | 4 +- .../responsive-block-control/style.scss | 1 - .../src/components/rich-text/content.scss | 25 +- .../rich-text/event-listeners/index.js | 6 +- .../event-listeners/paste-handler.js | 9 +- .../src/components/rich-text/index.js | 74 +- .../src/components/rich-text/index.native.js | 2 - .../src/components/rich-text/style.scss | 5 + .../skip-to-selected-block/index.js | 3 +- .../skip-to-selected-block/style.scss | 9 - .../components/spacing-sizes-control/index.js | 6 +- .../input-controls/spacing-input-control.js | 8 +- .../spacing-sizes-control/linked-button.js | 14 +- .../spacing-sizes-control/test/utils.js | 43 +- .../components/spacing-sizes-control/utils.js | 27 +- .../src/components/tabbed-sidebar/index.js | 2 +- .../src/components/tabbed-sidebar/style.scss | 2 +- .../src/components/tool-selector/index.js | 29 +- .../src/components/tool-selector/style.scss | 5 + .../src/components/url-input/button.js | 28 +- .../src/components/url-input/index.js | 21 +- .../src/components/url-input/style.scss | 35 +- .../components/use-block-commands/index.js | 525 +- .../components/use-block-drop-zone/index.js | 10 +- .../use-block-drop-zone/index.native.js | 1 - .../components/use-moving-animation/index.js | 1 - .../src/components/use-resize-canvas/index.js | 4 +- .../src/components/use-settings/index.js | 1 - .../src/components/writing-flow/index.js | 10 +- .../components/writing-flow/use-arrow-nav.js | 11 +- .../writing-flow/use-event-redirect.js | 72 - .../src/components/writing-flow/use-input.js | 37 +- .../components/writing-flow/use-select-all.js | 19 +- .../writing-flow/use-selection-observer.js | 17 +- .../components/writing-flow/use-tab-nav.js | 71 +- .../src/components/writing-flow/utils.js | 30 - packages/block-editor/src/content.scss | 1 - .../block-editor/src/hooks/block-bindings.js | 196 +- .../block-editor/src/hooks/block-hooks.js | 17 +- .../block-editor/src/hooks/block-hooks.scss | 9 - packages/block-editor/src/hooks/border.js | 12 +- packages/block-editor/src/hooks/color.js | 2 +- .../src/hooks/contrast-checker.js | 1 - packages/block-editor/src/hooks/dimensions.js | 4 +- packages/block-editor/src/hooks/duotone.js | 9 +- .../block-editor/src/hooks/font-family.js | 2 +- .../block-editor/src/hooks/grid-visualizer.js | 32 +- .../block-editor/src/hooks/layout-child.js | 56 +- packages/block-editor/src/hooks/layout.js | 29 +- packages/block-editor/src/hooks/position.js | 5 +- packages/block-editor/src/hooks/style.js | 28 +- packages/block-editor/src/hooks/supports.js | 14 +- packages/block-editor/src/hooks/test/style.js | 3 +- packages/block-editor/src/hooks/typography.js | 12 +- .../src/hooks/use-bindings-attributes.js | 151 +- .../block-editor/src/hooks/use-zoom-out.js | 42 +- packages/block-editor/src/hooks/utils.js | 11 +- packages/block-editor/src/index.js | 1 - packages/block-editor/src/layouts/flex.js | 107 +- .../src/{lock-unlock.js => lock-unlock.ts} | 0 packages/block-editor/src/private-apis.js | 13 +- packages/block-editor/src/store/actions.js | 85 +- packages/block-editor/src/store/defaults.js | 3 +- .../block-editor/src/store/private-actions.js | 106 +- .../src/store/private-selectors.js | 180 +- packages/block-editor/src/store/reducer.js | 121 +- packages/block-editor/src/store/selectors.js | 517 +- .../block-editor/src/store/test/actions.js | 41 + .../src/store/test/private-actions.js | 15 + .../src/store/test/private-selectors.js | 51 +- .../block-editor/src/store/test/reducer.js | 67 +- .../block-editor/src/store/test/selectors.js | 259 +- packages/block-editor/src/store/utils.js | 25 +- packages/block-editor/src/style.scss | 3 + .../block-editor/src/utils/block-bindings.js | 64 +- packages/block-editor/src/utils/dom.js | 59 +- .../src/utils/get-font-styles-and-weights.js | 4 +- packages/block-editor/src/utils/index.js | 1 + packages/block-editor/src/utils/test/dom.js | 224 + .../src/utils/test/transform-styles.js | 2 +- .../utils/test/use-block-bindings-utils.js | 174 + .../src/utils/transform-styles/index.js | 5 +- packages/block-editor/tsconfig.json | 1 + packages/block-library/.npmrc | 1 - packages/block-library/CHANGELOG.md | 10 + packages/block-library/README.md | 15 +- packages/block-library/package.json | 81 +- .../block-library/src/archives/block.json | 6 + .../block-library/src/archives/editor.scss | 8 + packages/block-library/src/audio/block.json | 8 +- packages/block-library/src/avatar/hooks.js | 5 +- packages/block-library/src/avatar/index.js | 1 + packages/block-library/src/avatar/index.php | 9 +- .../src/block-keyboard-shortcuts/index.js | 36 +- packages/block-library/src/block/edit.js | 3 +- packages/block-library/src/button/block.json | 10 +- packages/block-library/src/button/edit.js | 9 +- .../src/button/get-updated-link-attributes.js | 2 +- packages/block-library/src/button/index.js | 2 +- packages/block-library/src/button/style.scss | 3 + .../test/get-updated-link-attributes.js | 15 + packages/block-library/src/buttons/style.scss | 2 + .../block-library/src/categories/block.json | 11 +- packages/block-library/src/categories/edit.js | 99 +- .../block-library/src/categories/index.js | 2 + .../block-library/src/categories/index.php | 30 +- .../src/categories/variations.js | 40 + packages/block-library/src/code/style.scss | 5 + .../src/comment-author-avatar/index.php | 2 +- .../src/comment-author-name/index.js | 1 + .../src/comment-content/index.js | 1 + .../block-library/src/comment-date/index.js | 1 + .../src/comment-edit-link/index.js | 1 + .../src/comment-reply-link/index.js | 1 + .../src/comments-pagination-next/block.json | 5 + .../src/comments-pagination-next/index.php | 2 +- .../src/comments-pagination-numbers/index.js | 1 + .../comments-pagination-previous/block.json | 5 + .../comments-pagination-previous/index.php | 3 +- .../block-library/src/comments-title/index.js | 1 + .../block-library/src/comments/block.json | 12 + .../block-library/src/comments/style.scss | 5 +- packages/block-library/src/common.scss | 3 - packages/block-library/src/cover/block.json | 3 + packages/block-library/src/cover/constants.js | 1 + .../block-library/src/cover/deprecated.js | 186 +- .../src/cover/edit/block-controls.js | 2 +- .../src/cover/edit/cover-placeholder.js | 3 - .../block-library/src/cover/edit/index.js | 89 +- .../src/cover/edit/inspector-controls.js | 192 +- packages/block-library/src/cover/editor.scss | 9 +- packages/block-library/src/cover/index.js | 16 +- packages/block-library/src/cover/index.php | 57 +- packages/block-library/src/cover/save.js | 49 +- packages/block-library/src/cover/shared.js | 20 +- packages/block-library/src/cover/style.scss | 50 +- .../test/__snapshots__/edit.native.js.snap | 18 +- .../__snapshots__/transforms.native.js.snap | 8 +- packages/block-library/src/cover/test/edit.js | 12 +- .../src/cover/test/edit.native.js | 8 +- .../src/cover/test/transforms.native.js | 8 +- packages/block-library/src/details/block.json | 1 + packages/block-library/src/details/index.js | 24 +- packages/block-library/src/editor.scss | 1 - packages/block-library/src/embed/block.json | 12 +- packages/block-library/src/embed/edit.js | 21 +- .../block-library/src/embed/embed-preview.js | 194 +- packages/block-library/src/file/block.json | 14 +- packages/block-library/src/file/edit.js | 15 +- packages/block-library/src/file/index.php | 13 +- .../block-library/src/form-input/block.json | 4 +- .../src/form-input/deprecated.js | 8 +- packages/block-library/src/freeform/modal.js | 2 +- .../block-library/src/gallery/constants.js | 1 + packages/block-library/src/gallery/edit.js | 29 +- packages/block-library/src/gallery/utils.js | 25 +- packages/block-library/src/group/editor.scss | 4 +- packages/block-library/src/heading/block.json | 10 +- .../block-library/src/heading/deprecated.js | 2 +- packages/block-library/src/home-link/edit.js | 72 +- .../block-library/src/home-link/index.php | 3 - packages/block-library/src/html/edit.js | 8 +- packages/block-library/src/html/preview.js | 5 +- packages/block-library/src/image/block.json | 16 +- .../block-library/src/image/deprecated.js | 36 +- packages/block-library/src/image/edit.js | 11 +- packages/block-library/src/image/editor.scss | 4 + packages/block-library/src/image/image.js | 315 +- packages/block-library/src/image/index.php | 16 +- .../__snapshots__/transforms.native.js.snap | 2 +- .../block-library/src/latest-posts/edit.js | 11 +- .../src/latest-posts/editor.scss | 11 - .../block-library/src/latest-posts/index.php | 2 +- .../block-library/src/list-item/block.json | 2 +- packages/block-library/src/list/block.json | 4 +- packages/block-library/src/list/deprecated.js | 16 +- .../src/{lock-unlock.js => lock-unlock.ts} | 0 .../block-library/src/media-text/block.json | 10 +- .../src/media-text/deprecated.js | 10 +- .../block-library/src/media-text/style.scss | 2 +- .../__snapshots__/transforms.native.js.snap | 4 +- .../src/navigation-submenu/block.json | 13 + .../edit/menu-inspector-controls.js | 4 +- .../edit/navigation-menu-selector.js | 4 +- .../block-library/src/navigation/editor.scss | 1 + .../block-library/src/navigation/index.php | 179 +- .../block-library/src/navigation/style.scss | 2 +- .../use-template-part-area-label.js | 20 +- .../block-library/src/page-list/block.json | 14 + .../block-library/src/page-list/style.scss | 4 + .../block-library/src/paragraph/block.json | 2 +- packages/block-library/src/paragraph/edit.js | 39 +- packages/block-library/src/pattern/index.php | 7 - .../block-library/src/post-content/block.json | 15 +- .../block-library/src/post-content/edit.js | 31 +- .../src/post-content/editor.scss | 4 - .../block-library/src/post-content/style.scss | 6 +- .../src/post-featured-image/edit.js | 2 +- .../src/post-navigation-link/block.json | 6 + .../src/post-navigation-link/variations.js | 12 + .../src/post-template/block.json | 3 +- .../block-library/src/post-template/edit.js | 25 + .../block-library/src/post-terms/index.php | 13 +- .../src/post-time-to-read/edit.js | 4 +- .../src/post-time-to-read/index.js | 1 + .../src/post-time-to-read/index.php | 2 +- .../block-library/src/post-title/block.json | 5 +- .../block-library/src/post-title/style.scss | 25 +- .../block-library/src/preformatted/block.json | 2 +- .../block-library/src/pullquote/block.json | 4 +- .../block-library/src/pullquote/deprecated.js | 4 +- .../src/query-no-results/block.json | 10 + .../src/query-pagination-numbers/index.js | 1 + .../block-library/src/query-title/block.json | 5 + .../block-library/src/query-title/edit.js | 4 +- packages/block-library/src/query/block.json | 5 +- .../create-new-post-link.js | 32 - .../enhanced-pagination-control.js | 8 +- .../inspector-controls/format-controls.js | 90 + .../query/edit/inspector-controls/index.js | 91 +- .../edit/inspector-controls/order-control.js | 4 +- .../edit/inspector-controls/pages-control.js | 2 +- .../inspector-controls/per-page-control.js | 2 +- .../src/query/edit/pattern-selection-modal.js | 5 +- .../src/query/edit/query-content.js | 35 +- packages/block-library/src/query/editor.scss | 4 - packages/block-library/src/query/index.php | 24 +- .../block-library/src/query/test/utils.js | 60 +- packages/block-library/src/query/utils.js | 75 +- packages/block-library/src/quote/block.json | 4 +- .../block-library/src/quote/deprecated.js | 8 +- packages/block-library/src/rss/index.php | 19 +- packages/block-library/src/search/block.json | 6 +- packages/block-library/src/search/edit.js | 70 +- packages/block-library/src/search/index.php | 17 +- packages/block-library/src/search/style.scss | 8 +- .../__snapshots__/transforms.native.js.snap | 6 + .../src/separator/test/transforms.native.js | 2 +- .../block-library/src/separator/transforms.js | 11 + packages/block-library/src/site-logo/edit.js | 1 + .../block-library/src/site-title/block.json | 5 +- .../block-library/src/site-title/style.scss | 25 +- .../block-library/src/social-link/edit.js | 84 +- .../block-library/src/social-link/editor.scss | 13 +- .../block-library/src/social-links/edit.js | 1 - .../src/social-links/editor.scss | 17 +- packages/block-library/src/spacer/index.js | 2 + .../__snapshots__/transforms.native.js.snap | 6 + .../src/spacer/test/transforms.native.js | 2 +- .../block-library/src/spacer/transforms.js | 20 + .../src/table-of-contents/block.json | 53 +- .../src/table-of-contents/edit.js | 8 +- packages/block-library/src/table/edit.js | 1 - .../template-part/edit/advanced-controls.js | 26 +- .../src/template-part/edit/index.js | 7 +- .../src/template-part/edit/selection-modal.js | 5 +- .../edit/utils/get-template-part-icon.js | 20 + .../src/template-part/edit/utils/hooks.js | 9 +- .../src/template-part/variations.js | 20 +- .../src/term-description/index.js | 1 + packages/block-library/src/verse/block.json | 2 +- .../block-library/src/verse/deprecated.js | 2 +- packages/block-library/src/video/block.json | 10 +- packages/block-library/src/video/edit.js | 2 +- packages/block-library/src/video/editor.scss | 9 + .../__snapshots__/transforms.native.js.snap | 2 +- .../block-library/src/video/tracks-editor.js | 300 +- .../block-serialization-default-parser/.npmrc | 1 - .../CHANGELOG.md | 10 + .../package.json | 5 +- .../block-serialization-spec-parser/.npmrc | 1 - .../CHANGELOG.md | 10 + .../package.json | 3 +- packages/blocks/.npmrc | 1 - packages/blocks/CHANGELOG.md | 14 + packages/blocks/README.md | 99 +- packages/blocks/package.json | 35 +- packages/blocks/src/api/constants.js | 64 +- packages/blocks/src/api/index.js | 24 +- packages/blocks/src/api/registration.js | 55 +- packages/blocks/src/api/serializer.js | 11 + packages/blocks/src/api/test/registration.js | 130 +- packages/blocks/src/api/test/serializer.js | 2 +- packages/blocks/src/api/test/utils.js | 40 +- packages/blocks/src/api/utils.js | 33 +- packages/blocks/src/store/private-actions.js | 14 - .../blocks/src/store/private-selectors.js | 34 + .../blocks/src/store/process-block-type.js | 253 +- packages/blocks/src/store/reducer.js | 32 +- packages/blocks/src/store/selectors.js | 30 +- .../src/store/test/private-selectors.js | 12 +- .../src/store/test/process-block-type.js | 490 + packages/browserslist-config/.npmrc | 1 - packages/browserslist-config/CHANGELOG.md | 10 + packages/browserslist-config/package.json | 2 +- packages/commands/CHANGELOG.md | 10 + packages/commands/README.md | 8 +- packages/commands/package.json | 19 +- packages/components/.npmrc | 1 - packages/components/CHANGELOG.md | 171 +- packages/components/package.json | 41 +- .../components/schemas/docs-manifest.json | 38 + .../src/alignment-matrix-control/README.md | 81 +- .../docs-manifest.json | 12 + .../src/alignment-matrix-control/types.ts | 2 + .../src/angle-picker-control/README.md | 58 +- .../angle-picker-control/docs-manifest.json | 5 + .../src/animate/stories/index.story.tsx | 3 +- .../autocomplete/autocompleter-ui.native.js | 6 +- .../src/autocomplete/autocompleter-ui.tsx | 9 +- .../components/src/autocomplete/index.tsx | 14 +- .../components/src/base-control/README.md | 105 +- .../src/base-control/docs-manifest.json | 12 + .../src/base-control/stories/index.story.tsx | 7 +- packages/components/src/base-control/types.ts | 3 + .../component.tsx | 1 + .../border-box-control/README.md | 49 +- .../border-box-control/component.tsx | 19 +- .../border-box-control/hook.ts | 7 + .../stories/index.story.tsx | 4 +- .../src/border-box-control/test/index.tsx | 1 + .../border-control-dropdown/component.tsx | 54 +- .../border-control/border-control/README.md | 63 +- .../border-control/component.tsx | 5 +- .../src/border-control/border-control/hook.ts | 10 +- .../border-control/stories/index.story.tsx | 15 +- .../components/src/border-control/styles.ts | 1 - .../src/border-control/test/index.js | 18 +- .../components/src/border-control/types.ts | 26 +- packages/components/src/box-control/README.md | 28 +- .../src/box-control/all-input-control.tsx | 6 +- .../src/box-control/axial-input-controls.tsx | 1 + packages/components/src/box-control/index.tsx | 8 +- .../src/box-control/input-controls.tsx | 1 + .../src/box-control/stories/index.story.tsx | 2 +- packages/components/src/box-control/types.ts | 6 +- .../src/button-group/stories/index.story.tsx | 25 +- .../src/button/stories/index.story.tsx | 3 +- packages/components/src/button/style.scss | 6 +- .../components/src/card/card/component.tsx | 2 +- .../src/card/stories/index.story.tsx | 3 +- packages/components/src/card/styles.ts | 2 +- .../card/test/__snapshots__/index.tsx.snap | 108 +- .../checkbox-control/stories/index.story.tsx | 3 +- .../stories/index.story.tsx | 3 +- .../color-indicator/stories/index.story.tsx | 3 +- .../src/color-palette/index.native.js | 3 +- .../components/src/color-palette/index.tsx | 8 +- .../src/color-palette/stories/index.story.tsx | 3 +- .../components/src/color-palette/style.scss | 6 +- .../src/color-picker/color-copy-button.tsx | 18 +- .../components/src/color-picker/component.tsx | 1 + .../src/color-picker/index.native.js | 1 - .../src/color-picker/stories/index.story.tsx | 3 +- .../components/src/color-picker/styles.ts | 13 - .../components/src/combobox-control/README.md | 8 + .../components/src/combobox-control/index.tsx | 34 +- .../combobox-control/stories/index.story.tsx | 4 +- .../src/combobox-control/style.scss | 6 - .../src/combobox-control/test/index.tsx | 48 +- .../components/src/combobox-control/types.ts | 4 + .../components/src/composite/group-label.tsx | 12 +- packages/components/src/composite/group.tsx | 14 +- packages/components/src/composite/hover.tsx | 14 +- packages/components/src/composite/index.tsx | 7 +- packages/components/src/composite/item.tsx | 20 +- .../components/src/composite/legacy/index.tsx | 7 +- .../src/composite/legacy/test/index.tsx | 43 +- packages/components/src/composite/row.tsx | 14 +- .../src/composite/stories/index.story.tsx | 45 +- .../components/src/composite/test/index.tsx | 714 + .../components/src/composite/typeahead.tsx | 12 +- .../confirm-dialog/stories/index.story.tsx | 3 +- .../gradient-bar/control-points.tsx | 2 +- .../stories/index.story.tsx | 3 +- .../stories/index.story.tsx | 3 +- .../src/custom-select-control-v2/styles.ts | 1 + .../stories/index.story.tsx | 3 +- packages/components/src/dashicon/types.ts | 2 - .../components/src/date-time/date/index.tsx | 3 +- .../src/date-time/stories/date-time.story.tsx | 3 +- .../src/date-time/stories/date.story.tsx | 3 +- .../src/date-time/stories/time.story.tsx | 3 +- .../src/dimension-control/README.md | 1 + .../src/dimension-control/index.tsx | 8 + .../dimension-control/stories/index.story.tsx | 1 + .../test/__snapshots__/index.test.js.snap | 48 +- .../src/dimension-control/test/index.test.js | 8 +- packages/components/src/disabled/README.md | 16 +- packages/components/src/disabled/index.tsx | 9 +- .../src/disabled/stories/index.story.tsx | 4 +- .../src/draggable/stories/index.story.tsx | 3 +- packages/components/src/drop-zone/index.tsx | 3 +- .../src/drop-zone/stories/index.story.tsx | 3 +- packages/components/src/drop-zone/style.scss | 2 +- .../src/dropdown-menu-v2/context.tsx | 13 - .../components/src/dropdown-menu-v2/group.tsx | 26 - .../src/dropdown-menu-v2/separator.tsx | 27 - .../dropdown-menu-v2/stories/index.story.tsx | 639 - .../src/dropdown-menu/stories/index.story.tsx | 6 +- .../src/dropdown/stories/index.story.tsx | 4 +- packages/components/src/dropdown/style.scss | 23 +- .../src/duotone-picker/duotone-picker.tsx | 2 + .../src/external-link/stories/index.story.tsx | 3 +- .../components/src/font-size-picker/README.md | 1 + .../font-size-picker-toggle-group.tsx | 1 + .../src/font-size-picker/index.native.js | 14 +- .../components/src/font-size-picker/index.tsx | 8 + .../font-size-picker/stories/index.story.tsx | 1 + .../src/font-size-picker/test/index.tsx | 6 +- .../components/src/form-file-upload/index.tsx | 14 +- .../form-file-upload/stories/index.story.tsx | 3 +- .../components/src/form-toggle/style.scss | 1 + .../components/src/form-token-field/index.tsx | 3 - .../form-token-field/stories/index.story.tsx | 3 +- .../src/form-token-field/style.scss | 25 +- .../src/form-token-field/suggestions-list.tsx | 6 + .../components/src/form-token-field/token.tsx | 1 + .../components/src/gradient-picker/README.md | 176 +- .../src/gradient-picker/docs-manifest.json | 5 + .../components/src/gradient-picker/index.tsx | 66 +- .../gradient-picker/stories/index.story.tsx | 3 +- .../components/src/gradient-picker/types.ts | 8 +- packages/components/src/guide/index.tsx | 1 + .../components/src/guide/page-control.tsx | 1 + packages/components/src/guide/style.scss | 10 +- .../src/h-stack/stories/index.story.tsx | 3 +- .../src/heading/stories/index.story.tsx | 3 +- .../with-constrained-tabbing/README.md | 16 +- .../higher-order/with-focus-return/README.md | 11 +- packages/components/src/index.ts | 20 +- .../src/input-control/stories/index.story.tsx | 3 +- .../src/item-group/stories/index.story.tsx | 12 +- .../stories/index.story.tsx | 3 +- .../src/menu-group/stories/index.story.tsx | 3 +- packages/components/src/menu-group/style.scss | 5 +- packages/components/src/menu-item/index.tsx | 1 + .../src/menu-item/stories/index.story.tsx | 3 +- .../test/__snapshots__/index.js.snap | 8 +- .../menu-items-choice/stories/index.story.tsx | 3 +- .../src/menu-items-choice/style.scss | 2 + .../src/{dropdown-menu-v2 => menu}/README.md | 68 +- .../checkbox-item.tsx | 28 +- packages/components/src/menu/context.tsx | 13 + .../group-label.tsx | 16 +- packages/components/src/menu/group.tsx | 26 + .../src/{dropdown-menu-v2 => menu}/index.tsx | 135 +- .../item-help-text.tsx | 10 +- .../{dropdown-menu-v2 => menu}/item-label.tsx | 10 +- .../src/{dropdown-menu-v2 => menu}/item.tsx | 26 +- .../{dropdown-menu-v2 => menu}/radio-item.tsx | 28 +- packages/components/src/menu/separator.tsx | 27 + .../src/menu/stories/index.story.tsx | 543 + .../src/{dropdown-menu-v2 => menu}/styles.ts | 38 +- .../{dropdown-menu-v2 => menu}/test/index.tsx | 370 +- .../src/{dropdown-menu-v2 => menu}/types.ts | 47 +- .../use-temporary-focus-visible-fix.ts | 0 .../index.native.js | 4 +- .../navigation-screen.native.js | 8 +- .../mobile/bottom-sheet/range-cell.native.js | 2 +- .../bottom-sheet/stepper-cell/index.native.js | 2 +- .../bottom-sheet/sub-sheet/index.native.js | 4 +- .../src/mobile/color-settings/index.native.js | 4 +- .../color-settings/picker-screen.native.js | 4 +- .../src/mobile/image/index.native.js | 4 +- .../keyboard-avoiding-view/index.ios.js | 4 +- .../link-picker/link-picker-results.native.js | 7 +- .../link-picker/link-picker-screen.native.js | 4 +- .../src/mobile/link-settings/index.native.js | 24 +- .../link-settings-screen.native.js | 4 +- .../mobile/segmented-control/index.native.js | 8 +- .../use-unit-converter-to-mobile.native.js | 8 +- packages/components/src/modal/aria-helper.ts | 1 + packages/components/src/modal/index.tsx | 44 +- .../src/modal/stories/index.story.tsx | 5 +- packages/components/src/modal/style.scss | 33 +- packages/components/src/modal/types.ts | 24 +- .../src/modal/use-modal-exit-animation.ts | 99 + .../stories/navigable-menu.story.tsx | 3 +- .../stories/tabbable-container.story.tsx | 3 +- packages/components/src/navigation/index.tsx | 3 +- .../item/use-navigation-tree-item.tsx | 4 +- .../src/navigation/menu/menu-title-search.tsx | 4 +- .../menu/use-navigation-tree-menu.tsx | 4 +- packages/components/src/navigator/README.md | 176 + packages/components/src/navigator/index.ts | 6 - packages/components/src/navigator/index.tsx | 131 + packages/components/src/navigator/legacy.ts | 169 + .../navigator/navigator-back-button/README.md | 15 - .../navigator-back-button/component.tsx | 38 +- .../navigator/navigator-back-button/hook.ts | 2 +- .../src/navigator/navigator-button/README.md | 38 - .../navigator/navigator-button/component.tsx | 37 +- .../src/navigator/navigator-button/hook.ts | 2 +- .../navigator/navigator-provider/README.md | 94 - .../src/navigator/navigator-screen/README.md | 33 - .../navigator/navigator-screen/component.tsx | 124 +- .../use-screen-animate-presence.ts | 177 + .../navigator-to-parent-button/README.md | 17 - .../navigator-to-parent-button/component.tsx | 9 +- .../component.tsx | 55 +- .../src/navigator/stories/index.story.tsx | 110 +- packages/components/src/navigator/styles.ts | 153 +- .../components/src/navigator/test/index.tsx | 94 +- packages/components/src/navigator/types.ts | 20 +- .../components/src/navigator/use-navigator.ts | 5 +- packages/components/src/notice/index.tsx | 2 + .../src/notice/stories/index.story.tsx | 9 +- .../notice/test/__snapshots__/index.tsx.snap | 8 +- .../number-control/stories/index.story.tsx | 3 +- .../components/src/palette-edit/index.tsx | 49 +- .../components/src/palette-edit/styles.ts | 68 +- .../src/palette-edit/test/index.tsx | 51 +- packages/components/src/panel/body.tsx | 1 + .../src/panel/stories/index.story.tsx | 3 +- .../src/placeholder/stories/index.story.tsx | 1 + packages/components/src/popover/index.tsx | 3 + .../src/popover/stories/index.story.tsx | 3 +- packages/components/src/popover/style.scss | 2 +- packages/components/src/private-apis.ts | 8 +- .../src/progress-bar/stories/index.story.tsx | 3 +- .../src/radio-control/stories/index.story.tsx | 3 +- packages/components/src/radio-group/README.md | 16 +- packages/components/src/radio-group/index.tsx | 2 + packages/components/src/radio-group/radio.tsx | 7 + .../src/radio-group/stories/index.story.tsx | 20 +- packages/components/src/radio-group/types.ts | 7 +- .../components/src/range-control/README.md | 7 +- .../components/src/range-control/index.tsx | 11 + .../src/range-control/stories/index.story.tsx | 10 +- .../styles/range-control-styles.ts | 30 +- .../src/range-control/test/index.tsx | 8 +- .../components/src/range-control/tooltip.tsx | 2 +- .../components/src/range-control/types.ts | 7 + .../src/resizable-box/stories/index.story.tsx | 3 +- .../components/src/resizable-box/style.scss | 2 +- .../stories/index.story.tsx | 3 +- .../components/src/sandbox/index.native.js | 4 +- packages/components/src/sandbox/index.tsx | 9 +- .../src/sandbox/stories/index.story.tsx | 3 +- .../src/scroll-lock/stories/index.story.tsx | 3 +- .../components/src/search-control/README.md | 2 + .../src/search-control/index.native.js | 4 +- .../components/src/search-control/index.tsx | 11 +- .../search-control/stories/index.story.tsx | 18 +- .../src/search-control/test/index.tsx | 5 +- .../components/src/search-control/types.ts | 3 + .../select-control/stories/index.story.tsx | 18 +- .../src/shortcut/stories/index.story.tsx | 3 +- packages/components/src/slot-fill/README.md | 41 +- .../src/slot-fill/bubbles-virtually/fill.tsx | 46 +- .../bubbles-virtually/slot-fill-provider.tsx | 42 +- .../src/slot-fill/bubbles-virtually/slot.tsx | 23 +- .../slot-fill/bubbles-virtually/use-slot.ts | 29 +- packages/components/src/slot-fill/fill.ts | 32 +- packages/components/src/slot-fill/index.tsx | 12 +- .../components/src/slot-fill/provider.tsx | 25 +- packages/components/src/slot-fill/slot.tsx | 133 +- .../src/slot-fill/stories/index.story.tsx | 3 +- packages/components/src/slot-fill/types.ts | 65 +- packages/components/src/snackbar/index.tsx | 3 +- .../src/snackbar/stories/index.story.tsx | 3 +- .../src/snackbar/stories/list.story.tsx | 3 +- packages/components/src/snackbar/style.scss | 25 +- packages/components/src/spacer/hook.ts | 5 +- .../src/spinner/stories/index.story.tsx | 3 +- packages/components/src/tab-panel/index.tsx | 3 + .../src/tab-panel/stories/index.story.tsx | 3 +- packages/components/src/tab-panel/style.scss | 4 +- packages/components/src/tabs/README.md | 84 +- packages/components/src/tabs/index.tsx | 301 +- .../src/tabs/stories/index.story.tsx | 113 +- packages/components/src/tabs/styles.ts | 227 +- packages/components/src/tabs/tab.tsx | 36 +- packages/components/src/tabs/tablist.tsx | 150 +- packages/components/src/tabs/test/index.tsx | 249 +- packages/components/src/tabs/types.ts | 138 +- .../components/src/tabs/use-track-overflow.ts | 76 + .../components/src/text-control/README.md | 1 + .../components/src/text-control/index.tsx | 8 + .../src/text-control/stories/index.story.tsx | 4 +- .../src/text-control/test/text-control.tsx | 8 +- .../text-highlight/stories/index.story.tsx | 3 +- .../src/text/stories/index.story.tsx | 3 +- .../textarea-control/stories/index.story.tsx | 3 +- .../src/theme/stories/index.story.tsx | 3 +- .../src/tip/stories/index.story.tsx | 3 +- .../toggle-control/stories/index.story.tsx | 3 +- .../stories/index.story.tsx | 4 +- .../test/__snapshots__/index.tsx.snap | 288 +- .../src/toggle-group-control/test/index.tsx | 47 +- .../component.tsx | 67 +- .../styles.ts | 13 +- .../README.md | 2 +- .../component.tsx | 2 +- .../toggle-group-control-option/README.md | 2 +- .../toggle-group-control-option/component.tsx | 1 + .../toggle-group-control/README.md | 3 +- .../toggle-group-control/as-button-group.tsx | 28 +- .../toggle-group-control/as-radio-group.tsx | 42 +- .../toggle-group-control/component.tsx | 36 +- .../toggle-group-control/styles.ts | 41 + .../src/toggle-group-control/types.ts | 12 +- .../components/src/toolbar/toolbar/index.tsx | 3 + .../src/tools-panel/stories/index.story.tsx | 3 + .../tools-panel-header/component.tsx | 2 +- .../src/tools-panel/tools-panel-item/hook.ts | 2 - .../src/tools-panel/tools-panel/README.md | 20 +- .../src/tools-panel/tools-panel/hook.ts | 384 +- .../components/src/tooltip/index.native.js | 20 +- packages/components/src/tooltip/index.tsx | 9 +- .../src/tooltip/stories/index.story.tsx | 3 +- packages/components/src/tooltip/style.scss | 1 + .../components/src/tooltip/test/index.tsx | 78 + .../src/tree-grid/stories/index.story.tsx | 3 +- .../src/tree-select/stories/index.story.tsx | 3 +- .../src/truncate/stories/index.story.tsx | 3 +- .../src/unit-control/index.native.js | 8 +- .../src/unit-control/stories/index.story.tsx | 3 +- .../components/src/utils/config-values.js | 25 +- .../src/utils/deprecated-36px-size.ts | 30 + packages/components/src/utils/element-rect.ts | 63 +- .../utils/hooks/use-animated-offset-rect.ts | 119 + .../components/src/utils/hooks/use-event.ts | 38 - .../src/utils/hooks/use-on-value-update.ts | 9 +- .../src/utils/hooks/use-update-effect.js | 2 - .../src/v-stack/stories/index.story.tsx | 3 +- .../visually-hidden/stories/index.story.tsx | 3 +- packages/compose/.npmrc | 1 - packages/compose/CHANGELOG.md | 14 +- packages/compose/package.json | 19 +- .../src/hooks/use-copy-to-clipboard/index.js | 6 +- .../compose/src/hooks/use-drop-zone/index.js | 68 +- .../hooks/use-resize-observer/index.native.js | 1 + .../src/hooks/use-resize-observer/index.ts | 45 +- .../{_legacy => legacy}/index.native.js | 0 .../{_legacy => legacy}/index.tsx | 2 +- .../{_legacy => legacy}/test/index.native.js | 0 .../use-resize-observer.ts | 43 + packages/core-commands/.npmrc | 1 - packages/core-commands/CHANGELOG.md | 10 + packages/core-commands/package.json | 30 +- .../src/admin-navigation-commands.js | 99 +- .../src/site-editor-navigation-commands.js | 256 +- packages/core-data/.npmrc | 1 - packages/core-data/CHANGELOG.md | 10 + packages/core-data/README.md | 2 + packages/core-data/package.json | 37 +- packages/core-data/src/actions.js | 20 +- packages/core-data/src/entities.js | 68 +- .../core-data/src/entity-types/attachment.ts | 36 +- .../core-data/src/entity-types/settings.ts | 4 + .../src/hooks/test/use-entity-record.js | 11 +- .../src/hooks/use-entity-block-editor.js | 13 +- .../core-data/src/hooks/use-entity-record.ts | 2 + packages/core-data/src/index.js | 2 + .../src/{lock-unlock.js => lock-unlock.ts} | 0 packages/core-data/src/private-actions.js | 16 + packages/core-data/src/private-apis.js | 2 + packages/core-data/src/private-selectors.ts | 162 +- packages/core-data/src/reducer.js | 20 + packages/core-data/src/resolvers.js | 250 +- packages/core-data/src/selectors.ts | 33 +- packages/core-data/src/test/actions.js | 63 +- packages/core-data/src/test/entities.js | 80 - .../core-data/src/test/entity-provider.js | 2 +- packages/core-data/src/test/resolvers.js | 124 +- packages/core-data/src/utils/index.js | 1 + .../src/utils/receive-intermediate-results.js | 3 + .../create-block-interactive-template/.npmrc | 1 - .../CHANGELOG.md | 6 +- .../README.md | 2 +- .../block-templates/README.md.mustache | 2 - .../block-templates/render.php.mustache | 23 +- .../block-templates/style.scss.mustache | 15 + .../block-templates/view.js.mustache | 19 +- .../block-templates/view.ts.mustache | 46 + .../index.js | 11 +- .../package.json | 2 +- .../create-block-tutorial-template/.npmrc | 1 - .../CHANGELOG.md | 10 + .../package.json | 2 +- packages/create-block/.npmrc | 1 - packages/create-block/CHANGELOG.md | 14 + packages/create-block/README.md | 31 +- packages/create-block/lib/index.js | 10 +- packages/create-block/lib/init-block.js | 23 +- .../create-block/lib/init-package-json.js | 10 +- packages/create-block/lib/init-wp-env.js | 8 +- packages/create-block/lib/init-wp-scripts.js | 11 +- packages/create-block/lib/output.js | 13 +- packages/create-block/lib/scaffold.js | 14 +- packages/create-block/package.json | 4 +- packages/customize-widgets/.npmrc | 1 - packages/customize-widgets/CHANGELOG.md | 10 + packages/customize-widgets/package.json | 46 +- .../src/components/error-boundary/index.js | 7 +- .../src/components/inserter/index.js | 4 +- .../src/components/welcome-guide/index.js | 4 +- packages/customize-widgets/src/index.js | 5 + packages/data-controls/CHANGELOG.md | 10 + packages/data-controls/package.json | 11 +- packages/data-controls/src/index.ts | 4 +- packages/data/.npmrc | 1 - packages/data/CHANGELOG.md | 14 + packages/data/README.md | 37 +- packages/data/package.json | 21 +- .../data/src/components/use-select/index.js | 13 +- .../src/components/use-select/test/index.js | 4 +- .../src/{lock-unlock.js => lock-unlock.ts} | 0 packages/data/src/types.ts | 8 - .../data/src/utils/{emitter.js => emitter.ts} | 14 +- packages/dataviews/.npmrc | 1 - packages/dataviews/CHANGELOG.md | 19 +- packages/dataviews/README.md | 888 +- packages/dataviews/package.json | 23 +- .../src/components/dataform-context/index.tsx | 30 + .../src/components/dataform/index.tsx | 27 +- .../dataform/stories/index.story.tsx | 162 +- .../dataviews-bulk-actions/index.tsx | 12 +- .../src/components/dataviews-context/index.ts | 6 +- .../dataviews-filters/add-filter.tsx | 18 +- .../components/dataviews-filters/index.tsx | 115 +- .../components/dataviews-filters/style.scss | 1 - .../dataviews-item-actions/index.tsx | 128 +- .../src/components/dataviews-layout/index.tsx | 6 +- .../dataviews-selection-checkbox/index.tsx | 5 +- .../dataviews-view-config/index.tsx | 128 +- .../dataviews-view-config/style.scss | 2 +- .../src/components/dataviews/index.tsx | 19 +- .../components/dataviews/stories/fixtures.tsx | 1 + .../dataviews/stories/index.story.tsx | 19 +- .../src/components/dataviews/style.scss | 13 +- .../form-field-visibility/index.tsx | 32 + .../dataforms-layouts/data-form-layout.tsx | 87 + .../dataviews/src/dataforms-layouts/index.tsx | 14 +- .../dataforms-layouts/is-combined-field.ts | 10 + .../src/dataforms-layouts/panel/index.tsx | 288 +- .../src/dataforms-layouts/panel/style.scss | 13 +- .../src/dataforms-layouts/regular/index.tsx | 127 +- .../src/dataforms-layouts/regular/style.scss | 30 + .../src/dataviews-layouts/grid/index.tsx | 42 +- ...ity-picker.tsx => preview-size-picker.tsx} | 65 +- .../src/dataviews-layouts/grid/style.scss | 17 +- .../dataviews/src/dataviews-layouts/index.ts | 4 + .../src/dataviews-layouts/list/index.tsx | 197 +- .../src/dataviews-layouts/list/style.scss | 81 +- .../table/column-header-menu.tsx | 66 +- .../table/density-picker.tsx | 57 + .../src/dataviews-layouts/table/index.tsx | 51 +- .../src/dataviews-layouts/table/style.scss | 32 + .../utils/get-clickable-item-props.ts | 22 + packages/dataviews/src/normalize-fields.ts | 19 +- .../dataviews/src/normalize-form-fields.ts | 42 + packages/dataviews/src/style.scss | 1 + .../dataviews/src/test/normalize-fields.ts | 45 + packages/dataviews/src/types.ts | 68 +- packages/dataviews/src/validation.ts | 9 + packages/date/.npmrc | 1 - packages/date/CHANGELOG.md | 10 + packages/date/README.md | 2 +- packages/date/package.json | 7 +- packages/date/src/index.js | 18 +- .../CHANGELOG.md | 18 + .../lib/index.js | 145 +- .../package.json | 2 +- .../test/__snapshots__/build.js.snap | 115 +- .../test/fixtures/cyclic-external-deps/a.js | 8 + .../fixtures/cyclic-external-deps/index.js | 18 + .../cyclic-external-deps/webpack.config.js | 8 + .../polyfill-magic-comment-minified/index.js | 3 + .../webpack.config.js | 11 + .../fixtures/polyfill-magic-comment/index.js | 3 + .../polyfill-magic-comment/webpack.config.js | 8 + packages/deprecated/.npmrc | 1 - packages/deprecated/CHANGELOG.md | 10 + packages/deprecated/package.json | 7 +- packages/docgen/.npmrc | 1 - packages/docgen/CHANGELOG.md | 10 + packages/docgen/lib/index.js | 2 +- packages/docgen/package.json | 4 +- packages/dom-ready/.npmrc | 1 - packages/dom-ready/CHANGELOG.md | 10 + packages/dom-ready/package.json | 5 +- packages/dom/.npmrc | 1 - packages/dom/CHANGELOG.md | 10 + packages/dom/package.json | 7 +- packages/dom/src/dom/place-caret-at-edge.js | 12 +- packages/e2e-test-utils-playwright/.npmrc | 1 - .../e2e-test-utils-playwright/CHANGELOG.md | 10 + .../e2e-test-utils-playwright/package.json | 2 +- .../src/editor/index.ts | 3 + .../src/editor/switch-editor-tool.ts | 34 + .../src/request-utils/rest.ts | 2 +- packages/e2e-test-utils/.npmrc | 1 - packages/e2e-test-utils/CHANGELOG.md | 10 + packages/e2e-test-utils/package.json | 12 +- packages/e2e-test-utils/src/inserter.js | 14 +- packages/e2e-test-utils/src/site-editor.js | 8 +- packages/e2e-tests/.npmrc | 1 - packages/e2e-tests/CHANGELOG.md | 10 + packages/e2e-tests/package.json | 16 +- packages/e2e-tests/plugins/block-bindings.php | 212 +- .../e2e-tests/plugins/block-bindings/index.js | 48 + .../plugins/block-template-registration.php | 12 +- .../directive-class/render.php | 20 +- .../directive-class/view.js | 4 +- .../interactive-blocks/directive-init/view.js | 2 +- .../directive-on-document/view.js | 2 +- .../directive-on-window/view.js | 2 +- .../directive-priorities/view.js | 4 +- .../interactive-blocks/directive-run/view.js | 4 +- .../directive-watch/view.js | 2 +- .../get-server-context/block.json | 15 + .../get-server-context/render.php | 51 + .../get-server-context/view.asset.php | 9 + .../get-server-context/view.js | 46 + .../get-server-state/block.json | 15 + .../get-server-state/render.php | 50 + .../get-server-state/view.asset.php | 9 + .../get-server-state/view.js | 33 + .../interactive-blocks/tovdom-islands/view.js | 2 +- packages/edit-post/.npmrc | 1 - packages/edit-post/CHANGELOG.md | 10 + packages/edit-post/package.json | 63 +- .../back-button/fullscreen-mode-close.js | 3 +- .../fullscreen-mode-close.js.snap | 2 +- .../src/components/browser-url/index.js | 5 +- .../components/init-pattern-modal/index.js | 17 +- .../components/keyboard-shortcuts/index.js | 6 +- .../edit-post/src/components/layout/index.js | 418 +- .../src/components/layout/style.scss | 113 +- .../components/layout/use-padding-appender.js | 39 +- .../components/layout/use-should-iframe.js | 52 +- .../meta-boxes/meta-box-visibility.js | 37 +- .../src/components/more-menu/index.js | 6 +- .../preferences-modal/enable-custom-fields.js | 16 +- .../preferences-modal/enable-panel.js | 44 +- .../enable-custom-fields.js.snap | 4 +- .../test/enable-custom-fields.js | 35 +- packages/edit-post/src/index.js | 3 +- packages/edit-post/src/index.native.js | 1 + packages/edit-post/src/store/actions.js | 66 +- packages/edit-post/src/store/index.js | 3 - .../edit-post/src/store/private-selectors.js | 61 - packages/edit-post/src/store/selectors.js | 14 +- packages/edit-post/src/style.scss | 16 - packages/edit-site/.npmrc | 1 - packages/edit-site/CHANGELOG.md | 10 + packages/edit-site/package.json | 83 +- .../src/components/add-new-post/index.js | 2 +- .../add-custom-template-modal-content.js | 3 +- .../src/components/add-new-template/index.js | 5 +- .../src/components/add-new-template/utils.js | 25 +- .../edit-site/src/components/app/index.js | 11 +- .../block-editor/use-editor-iframe-props.js | 43 +- .../block-editor/use-site-editor-settings.js | 38 +- .../editor-canvas-container/index.js | 30 +- .../editor-canvas-container/style.scss | 5 +- .../edit-site/src/components/editor/index.js | 122 +- .../src/components/editor/style.scss | 4 + .../editor/use-adapt-editor-to-canvas.js | 53 + .../src/components/editor/use-editor-title.js | 69 +- .../editor/use-resolve-edited-entity.js | 132 + .../src/components/error-boundary/warning.js | 7 +- .../global-styles-renderer/index.js | 14 +- .../global-styles-sidebar/default-sidebar.js | 1 - .../components/global-styles-sidebar/index.js | 177 +- .../global-styles-sidebar/style.scss | 15 +- .../global-styles/block-preview-panel.js | 20 +- .../components/global-styles/font-families.js | 115 +- .../font-library-modal/font-card.js | 5 +- .../font-library-modal/font-collection.js | 21 +- .../global-styles/font-library-modal/index.js | 52 +- .../font-library-modal/installed-fonts.js | 26 +- .../font-library-modal/style.scss | 31 +- .../font-library-modal/upload-fonts.js | 3 +- .../global-styles/font-sizes/font-size.js | 56 +- .../font-sizes/font-sizes-count.js | 5 +- .../global-styles/font-sizes/font-sizes.js | 16 +- .../src/components/global-styles/header.js | 4 +- .../global-styles/navigation-button.js | 7 +- .../src/components/global-styles/palette.js | 42 +- .../src/components/global-styles/root-menu.js | 33 +- .../global-styles/screen-background.js | 37 + .../global-styles/screen-block-list.js | 9 +- .../components/global-styles/screen-block.js | 34 +- .../components/global-styles/screen-css.js | 1 + .../components/global-styles/screen-layout.js | 16 +- .../global-styles/screen-revisions/index.js | 14 +- .../screen-revisions/revisions-buttons.js | 64 +- .../global-styles/screen-revisions/style.scss | 28 +- .../components/global-styles/screen-root.js | 25 +- .../global-styles/screen-style-variations.js | 25 +- .../global-styles/screen-typeset.js | 42 - .../global-styles/screen-typography.js | 6 +- .../global-styles/shadows-edit-panel.js | 144 +- .../components/global-styles/shadows-panel.js | 4 - .../style-variations-container.js | 9 +- .../src/components/global-styles/style.scss | 8 + .../global-styles/typeset-button.js | 100 - .../global-styles/typography-elements.js | 14 +- .../src/components/global-styles/ui.js | 117 +- .../global-styles/variations/variation.js | 6 +- .../variations/variations-panel.js | 1 - .../components/keyboard-shortcuts/global.js | 47 - .../components/keyboard-shortcuts/register.js | 27 - .../src/components/layout/animation.js | 1 - .../edit-site/src/components/layout/hooks.js | 8 +- .../edit-site/src/components/layout/index.js | 75 +- .../edit-site/src/components/layout/router.js | 151 +- .../src/components/layout/style.scss | 13 +- .../delete-category-menu-item.js | 8 +- .../src/components/page-patterns/fields.js | 21 +- .../src/components/page-patterns/header.js | 5 +- .../src/components/page-patterns/index.js | 5 +- .../src/components/page-patterns/style.scss | 5 - .../page-patterns/use-pattern-settings.js | 2 +- .../components/page-patterns/use-patterns.js | 16 +- .../src/components/page-templates/fields.js | 5 +- .../src/components/page-templates/index.js | 1 - .../src/components/page-templates/style.scss | 1 + .../src/components/pagination/index.js | 2 +- .../src/components/post-edit/index.js | 52 +- .../src/components/post-edit/style.scss | 7 + .../src/components/post-fields/index.js | 408 - .../src/components/post-list/index.js | 61 +- .../src/components/post-list/style.scss | 34 +- .../src/components/posts-app-routes/home.js | 36 + .../src/components/posts-app-routes/index.js | 36 + .../components/posts-app-routes/posts-edit.js | 31 + .../posts-list-view-quick-edit.js | 52 + .../posts-app-routes/posts-list-view.js | 40 + .../posts-app-routes/posts-view-quick-edit.js | 49 + .../components/posts-app-routes/posts-view.js | 35 + .../src/components/posts-app/index.js | 9 +- .../src/components/posts-app/router.js | 69 - .../src/components/resizable-frame/index.js | 49 +- .../src/components/revisions/index.js | 5 +- .../edit-site/src/components/routes/link.js | 9 +- .../save-keyboard-shortcut/index.js | 69 + .../src/components/save-panel/index.js | 65 +- .../src/components/sidebar-button/index.js | 3 +- .../src/components/sidebar-button/style.scss | 4 +- .../sidebar-dataviews/add-new-view.js | 6 +- .../sidebar-dataviews/default-views.js | 111 +- .../sidebar-global-styles-wrapper/index.js | 150 + .../sidebar-global-styles-wrapper/style.scss | 35 + .../sidebar-navigation-item/style.scss | 4 +- .../index.js | 65 +- .../style.scss | 4 - .../index.js | 40 - ...r-navigation-screen-details-panel-label.js | 14 - ...bar-navigation-screen-details-panel-row.js | 31 - ...r-navigation-screen-details-panel-value.js | 14 - .../style.scss | 26 - .../index.js | 140 +- .../sidebar-navigation-screen-main/index.js | 91 +- .../use-navigation-menu-handlers.js | 4 +- .../build-navigation-label.js | 8 +- .../index.js | 24 +- .../style.scss | 10 +- .../use-pattern-categories.js | 2 +- .../use-template-part-areas.js | 8 +- .../sidebar-navigation-screen/index.js | 3 +- .../sidebar-navigation-screen/style.scss | 15 +- .../edit-site/src/components/sidebar/index.js | 30 +- .../components/site-editor-routes/README.md | 20 + .../site-editor-routes/home-edit.js | 17 + .../site-editor-routes/home-view.js | 16 + .../components/site-editor-routes/index.js | 58 + .../site-editor-routes/navigation-edit.js | 22 + .../navigation-item-edit.js | 26 + .../navigation-item-view.js | 25 + .../site-editor-routes/navigation-view.js | 21 + .../site-editor-routes/pages-edit.js | 35 + .../pages-list-view-quick-edit.js | 56 + .../site-editor-routes/pages-list-view.js | 44 + .../pages-view-quick-edit.js | 53 + .../site-editor-routes/pages-view.js | 39 + .../site-editor-routes/patterns-edit.js | 24 + .../site-editor-routes/patterns-view.js | 22 + .../site-editor-routes/styles-view.js | 26 + .../site-editor-routes/templates-edit.js | 22 + .../site-editor-routes/templates-list-view.js | 28 + .../site-editor-routes/templates-view.js | 22 + .../src/components/site-hub/index.js | 69 +- .../src/components/site-hub/style.scss | 4 + .../src/components/site-icon/style.scss | 16 + .../src/components/style-book/categories.ts | 91 + .../components/style-book/color-examples.tsx | 44 + .../src/components/style-book/constants.ts | 272 + .../style-book/duotone-examples.tsx | 53 + .../src/components/style-book/examples.tsx | 239 + .../src/components/style-book/index.js | 462 +- .../src/components/style-book/style.scss | 30 +- .../components/style-book/test/categories.js | 166 + .../src/components/style-book/types.ts | 60 + .../use-init-edited-entity-from-url.js | 257 - .../use-sync-canvas-mode-with-url.js | 73 - .../use-edited-entity-record/index.js | 58 - .../src/components/welcome-guide/index.js | 6 +- .../src/components/welcome-guide/page.js | 8 +- .../src/components/welcome-guide/template.js | 9 +- .../src/hooks/commands/use-common-commands.js | 487 +- .../hooks/commands/use-edit-mode-commands.js | 172 - .../hooks/commands/use-set-command-context.js | 16 +- .../use-theme-style-variations-by-property.js | 3 +- packages/edit-site/src/index.js | 21 +- packages/edit-site/src/posts.js | 1 + packages/edit-site/src/store/actions.js | 15 + .../edit-site/src/store/private-actions.js | 89 +- .../edit-site/src/store/private-selectors.js | 15 +- packages/edit-site/src/store/reducer.js | 28 +- packages/edit-site/src/store/selectors.js | 27 +- packages/edit-site/src/store/test/actions.js | 83 - packages/edit-site/src/store/test/reducer.js | 69 - .../edit-site/src/store/test/selectors.js | 41 - packages/edit-site/src/style.scss | 20 +- packages/edit-widgets/.npmrc | 1 - packages/edit-widgets/CHANGELOG.md | 10 + packages/edit-widgets/package.json | 58 +- .../src/components/error-boundary/index.js | 7 +- .../components/header/document-tools/index.js | 2 +- .../src/components/header/style.scss | 8 +- .../src/components/layout/index.js | 25 +- .../src/components/layout/interface.js | 15 - .../secondary-sidebar/inserter-sidebar.js | 5 +- .../secondary-sidebar/list-view-sidebar.js | 3 +- .../components/secondary-sidebar/style.scss | 2 +- .../src/components/sidebar/index.js | 7 +- .../src/components/sidebar/widget-areas.js | 3 +- packages/edit-widgets/src/index.js | 6 +- packages/editor/.npmrc | 1 - packages/editor/CHANGELOG.md | 14 + packages/editor/README.md | 233 +- packages/editor/package.json | 76 +- packages/editor/src/bindings/api.js | 34 +- .../editor/src/bindings/pattern-overrides.js | 57 +- packages/editor/src/bindings/post-meta.js | 127 +- .../src/components/block-manager/category.js | 96 - .../src/components/block-manager/index.js | 161 - .../content-only-settings-menu.js | 38 +- .../plugin-block-settings-menu-item.js | 2 +- .../components/collab-sidebar/add-comment.js | 64 + .../collab-sidebar/comment-author-info.js | 68 + .../collab-sidebar/comment-button-toolbar.js | 29 + .../collab-sidebar/comment-button.js | 31 + .../components/collab-sidebar/comment-form.js | 62 + .../src/components/collab-sidebar/comments.js | 342 + .../components/collab-sidebar/constants.js | 1 + .../src/components/collab-sidebar/index.js | 298 + .../src/components/collab-sidebar/style.scss | 111 + .../src/components/collab-sidebar/utils.js | 9 + .../editor/src/components/commands/index.js | 658 +- .../create-template-part-modal/index.js | 6 +- .../src/components/document-bar/index.js | 114 +- .../src/components/document-bar/style.scss | 61 +- .../src/components/document-outline/check.js | 8 +- .../src/components/document-outline/index.js | 18 +- .../src/components/document-tools/index.js | 22 +- .../src/components/editor-history/redo.js | 2 +- .../src/components/editor-history/undo.js | 2 +- .../editor-interface/content-slot-fill.js | 13 +- .../src/components/editor-interface/index.js | 34 +- .../src/components/editor-notices/index.js | 2 +- .../src/components/editor-snackbars/index.js | 2 +- .../entity-record-item.js | 16 +- .../components/entities-saved-states/index.js | 26 +- .../entities-saved-states/style.scss | 4 +- .../register-shortcuts.js | 6 +- .../global-styles-provider/index.js | 110 +- .../editor/src/components/header/index.js | 71 +- .../editor/src/components/header/style.scss | 4 +- .../src/components/inserter-sidebar/index.js | 28 +- .../editor/src/components/more-menu/index.js | 19 +- .../src/components/page-attributes/check.js | 6 +- .../src/components/page-attributes/order.js | 2 +- .../src/components/page-attributes/panel.js | 2 +- .../src/components/page-attributes/parent.js | 12 +- .../plugin-document-setting-panel/index.js | 4 +- .../components/plugin-more-menu-item/index.js | 26 +- .../plugin-post-publish-panel/index.js | 4 +- .../test/__snapshots__/index.js.snap | 2 +- .../plugin-post-status-info/index.js | 8 +- .../plugin-pre-publish-panel/index.js | 4 +- .../plugin-preview-menu-item/index.js | 30 +- .../plugin-sidebar-more-menu-item/index.js | 4 +- .../src/components/plugin-sidebar/index.js | 19 +- .../src/components/post-actions/actions.js | 6 +- .../src/components/post-actions/index.js | 19 +- .../src/components/post-author/check.js | 6 +- .../src/components/post-author/index.js | 2 +- .../src/components/post-author/panel.js | 8 +- .../src/components/post-card-panel/index.js | 75 +- .../src/components/post-card-panel/style.scss | 10 +- .../src/components/post-comments/index.js | 2 +- .../post-content-information/index.js | 2 +- .../src/components/post-discussion/panel.js | 2 +- .../src/components/post-excerpt/check.js | 6 +- .../src/components/post-excerpt/panel.js | 2 +- .../src/components/post-excerpt/plugin.js | 8 +- .../components/post-featured-image/check.js | 6 +- .../components/post-featured-image/index.js | 195 +- .../components/post-featured-image/panel.js | 2 +- .../components/post-featured-image/style.scss | 43 +- .../src/components/post-fields/index.ts | 76 + .../src/components/post-format/check.js | 20 +- .../src/components/post-format/index.js | 2 +- .../src/components/post-format/panel.js | 2 +- .../components/post-last-revision/check.js | 6 +- .../components/post-last-revision/index.js | 4 +- .../components/post-last-revision/panel.js | 2 +- .../src/components/post-locked-modal/index.js | 2 +- .../src/components/post-panel-row/style.scss | 1 + .../components/post-pending-status/check.js | 6 +- .../components/post-pending-status/index.js | 2 +- .../components/post-preview-button/index.js | 2 +- .../components/post-publish-button/index.js | 19 +- .../components/post-publish-panel/index.js | 40 +- .../post-publish-panel/maybe-upload-media.js | 6 +- .../components/post-publish-panel/style.scss | 4 +- .../test/__snapshots__/index.js.snap | 42 +- .../test/__snapshots__/index.js.snap | 2 +- .../src/components/post-schedule/check.js | 6 +- .../src/components/post-schedule/index.js | 2 +- .../src/components/post-schedule/label.js | 4 +- .../src/components/post-schedule/panel.js | 2 +- .../editor/src/components/post-slug/check.js | 6 +- .../editor/src/components/post-slug/index.js | 2 +- .../src/components/post-status/index.js | 1 + .../src/components/post-status/style.scss | 5 + .../src/components/post-sticky/check.js | 6 +- .../src/components/post-sticky/index.js | 2 +- .../src/components/post-sticky/test/index.js | 12 +- .../post-switch-to-draft-button/index.js | 2 +- .../src/components/post-sync-status/index.js | 2 +- .../src/components/post-taxonomies/check.js | 6 +- .../post-taxonomies/flat-term-selector.js | 21 +- .../hierarchical-term-selector.js | 8 +- .../post-taxonomies/most-used-terms.js | 3 +- .../src/components/post-taxonomies/panel.js | 27 +- .../src/components/post-taxonomies/style.scss | 4 - .../components/post-template/classic-theme.js | 7 +- .../src/components/post-template/panel.js | 2 +- .../post-template/swap-template-button.js | 3 - .../src/components/post-text-editor/index.js | 2 +- .../editor/src/components/post-title/index.js | 38 +- .../components/post-title/post-title-raw.js | 2 +- .../components/post-transform-panel/index.js | 3 - .../editor/src/components/post-trash/check.js | 6 +- .../editor/src/components/post-trash/index.js | 2 +- .../post-type-support-check/index.js | 12 +- .../editor/src/components/post-url/check.js | 6 +- .../editor/src/components/post-url/index.js | 124 +- .../editor/src/components/post-url/label.js | 2 +- .../editor/src/components/post-url/panel.js | 98 +- .../editor/src/components/post-url/style.scss | 24 +- .../src/components/post-visibility/check.js | 2 +- .../src/components/post-visibility/index.js | 2 +- .../preferences-modal/block-visibility.js | 96 + .../preferences-modal/enable-panel.js | 44 +- .../enable-publish-sidebar.js | 33 +- .../src/components/preferences-modal/index.js | 49 +- .../preferences-modal/test/index.js | 2 +- .../src/components/preview-dropdown/index.js | 71 +- .../disable-non-page-content-blocks.js | 54 +- .../editor/src/components/provider/index.js | 96 +- .../provider/use-block-editor-settings.js | 21 +- .../provider/use-post-content-blocks.js | 42 + .../resizable-editor/resize-handle.js | 5 + .../components/save-publish-panels/index.js | 8 +- .../editor/src/components/sidebar/header.js | 5 +- .../editor/src/components/sidebar/index.js | 8 +- .../src/components/sidebar/post-summary.js | 2 +- .../editor/src/components/sidebar/style.scss | 4 +- .../components/start-page-options/index.js | 3 - .../start-template-options/index.js | 3 - .../src/components/table-of-contents/index.js | 2 +- .../components/theme-support-check/index.js | 8 +- .../src/components/time-to-read/index.js | 8 +- .../unsaved-changes-warning/index.js | 2 +- .../edit-template-blocks-notification.js | 6 +- .../src/components/visual-editor/index.js | 91 +- .../src/components/visual-editor/style.scss | 11 + .../visual-editor}/use-zoom-out-mode-exit.js | 29 +- .../editor/src/components/word-count/index.js | 2 +- .../src/components/zoom-out-toggle/index.js | 84 +- .../src/dataviews/actions/delete-post.tsx | 109 - .../actions/duplicate-template-part.tsx | 6 +- .../src/dataviews/actions/reset-post.tsx | 147 - packages/editor/src/dataviews/api.js | 41 + packages/editor/src/dataviews/fields/index.ts | 26 - .../src/dataviews/store/private-actions.ts | 74 +- .../src/dataviews/store/private-selectors.ts | 4 + .../editor/src/dataviews/store/reducer.ts | 39 +- .../editor/src/hooks/pattern-overrides.js | 3 +- packages/editor/src/private-apis.js | 11 +- packages/editor/src/store/actions.js | 262 +- packages/editor/src/store/constants.ts | 2 - packages/editor/src/store/index.js | 4 - packages/editor/src/store/private-actions.js | 6 +- .../editor/src/store/private-selectors.js | 25 +- packages/editor/src/store/reducer.native.js | 2 + packages/editor/src/store/selectors.js | 172 +- packages/editor/src/store/test/actions.js | 76 + packages/editor/src/store/test/reducer.js | 22 - packages/editor/src/store/test/selectors.js | 255 - packages/editor/src/style.scss | 2 +- .../editor/src/utils/get-template-info.js | 52 + packages/editor/src/utils/pageTypeBadge.js | 41 + packages/editor/src/utils/terms.js | 6 +- .../src/utils/test/get-template-info.js | 224 + packages/editor/src/utils/test/terms.js | 6 +- packages/element/.npmrc | 1 - packages/element/CHANGELOG.md | 10 + packages/element/package.json | 7 +- packages/env/.npmrc | 1 - packages/env/CHANGELOG.md | 10 + packages/env/README.md | 2 +- packages/env/package.json | 2 +- packages/escape-html/.npmrc | 1 - packages/escape-html/CHANGELOG.md | 10 + packages/escape-html/package.json | 5 +- packages/eslint-plugin/.npmrc | 1 - packages/eslint-plugin/CHANGELOG.md | 10 + packages/eslint-plugin/package.json | 10 +- packages/fields/.npmrc | 1 - packages/fields/CHANGELOG.md | 8 + packages/fields/README.md | 52 + packages/fields/package.json | 50 +- .../fields/src/actions/base-post/index.ts | 5 - packages/fields/src/actions/common/index.ts | 2 - packages/fields/src/actions/delete-post.tsx | 206 + .../{pattern => }/duplicate-pattern.tsx | 4 +- .../{base-post => }/duplicate-post.native.tsx | 0 .../{base-post => }/duplicate-post.tsx | 10 +- .../{pattern => }/export-pattern.native.tsx | 0 .../actions/{pattern => }/export-pattern.tsx | 4 +- packages/fields/src/actions/index.ts | 18 +- packages/fields/src/actions/pattern/index.ts | 3 - .../{common => }/permanently-delete-post.tsx | 4 +- .../src}/actions/rename-post.tsx | 11 +- .../{base-post => }/reorder-page.native.tsx | 0 .../actions/{base-post => }/reorder-page.tsx | 4 +- packages/fields/src/actions/reset-post.tsx | 300 + .../src}/actions/restore-post.tsx | 0 .../src}/actions/trash-post.tsx | 0 packages/fields/src/actions/utils.ts | 4 +- .../{common => }/view-post-revisions.tsx | 4 +- .../src/actions/{base-post => }/view-post.tsx | 2 +- .../fields/src/fields/author/author-view.tsx | 63 + packages/fields/src/fields/author/index.tsx | 32 + .../src/fields/comment-status/index.tsx | 40 + packages/fields/src/fields/date/date-view.tsx | 92 + packages/fields/src/fields/date/index.tsx | 23 + .../featured-image/featured-image-edit.tsx | 123 + .../featured-image/featured-image-view.tsx | 38 + .../fields/src/fields/featured-image/index.ts | 23 + .../src/fields/featured-image/style.scss | 92 + packages/fields/src/fields/index.ts | 8 + packages/fields/src/fields/order/index.ts | 3 +- packages/fields/src/fields/parent/index.ts | 26 + .../fields/src/fields/parent/parent-edit.tsx | 348 + .../fields/src/fields/parent/parent-view.tsx | 33 + packages/fields/src/fields/parent/utils.ts | 18 + packages/fields/src/fields/password/edit.tsx | 68 + packages/fields/src/fields/password/index.tsx | 24 + packages/fields/src/fields/slug/index.ts | 22 + packages/fields/src/fields/slug/slug-edit.tsx | 153 + packages/fields/src/fields/slug/slug-view.tsx | 27 + packages/fields/src/fields/slug/style.scss | 22 + packages/fields/src/fields/slug/utils.ts | 15 + packages/fields/src/fields/status/index.tsx | 32 + .../src/fields/status/status-elements.tsx | 50 + .../fields/src/fields/status/status-view.tsx | 28 + packages/fields/src/fields/title/index.ts | 3 + .../fields/src/fields/title/title-view.tsx | 62 + packages/fields/src/index.native.ts | 4 +- packages/fields/src/index.ts | 1 + packages/fields/src/mutation/index.ts | 184 + packages/fields/src/style.scss | 2 + packages/fields/src/types.ts | 21 +- packages/fields/src/wordpress-editor.d.ts | 1 - packages/fields/tsconfig.json | 21 +- packages/format-library/.npmrc | 1 - packages/format-library/CHANGELOG.md | 10 + packages/format-library/package.json | 29 +- packages/format-library/src/link/index.js | 10 +- .../format-library/src/text-color/index.js | 2 +- packages/hooks/.npmrc | 1 - packages/hooks/CHANGELOG.md | 14 + packages/hooks/README.md | 2 + packages/hooks/package.json | 5 +- packages/hooks/src/createCurrentHook.js | 7 +- packages/hooks/src/createDoingHook.js | 10 +- packages/hooks/src/createHooks.js | 10 +- packages/hooks/src/createRunHook.js | 57 +- packages/hooks/src/index.js | 6 +- packages/hooks/src/test/index.test.js | 150 + packages/html-entities/.npmrc | 1 - packages/html-entities/CHANGELOG.md | 10 + packages/html-entities/package.json | 5 +- packages/i18n/.npmrc | 1 - packages/i18n/CHANGELOG.md | 10 + packages/i18n/package.json | 7 +- packages/icons/.npmrc | 1 - packages/icons/CHANGELOG.md | 26 + packages/icons/package.json | 11 +- .../icons/src/icon/stories/index.story.js | 2 +- packages/icons/src/index.js | 12 + .../icons/src/library/arrow-down-right.js | 12 + packages/icons/src/library/arrow-up-left.js | 12 + packages/icons/src/library/background.js | 16 + packages/icons/src/library/bell-unread.js | 13 + packages/icons/src/library/bell.js | 16 + packages/icons/src/library/cloud-download.js | 12 + packages/icons/src/library/cloud-upload.js | 2 +- packages/icons/src/library/envelope.js | 16 + packages/icons/src/library/justify-bottom.js | 12 + .../src/library/justify-center-vertical.js | 12 + .../library/justify-space-between-vertical.js | 12 + .../src/library/justify-stretch-vertical.js | 12 + packages/icons/src/library/justify-top.js | 12 + packages/icons/src/library/unseen.js | 2 +- packages/interactivity-router/.npmrc | 1 - packages/interactivity-router/CHANGELOG.md | 20 + packages/interactivity-router/README.md | 139 +- packages/interactivity-router/package.json | 7 +- packages/interactivity-router/src/head.ts | 114 +- packages/interactivity-router/src/index.ts | 144 +- packages/interactivity-router/tsconfig.json | 2 +- packages/interactivity/.npmrc | 1 - packages/interactivity/CHANGELOG.md | 32 +- packages/interactivity/package.json | 8 +- packages/interactivity/src/directives.tsx | 425 +- packages/interactivity/src/hooks.tsx | 46 +- packages/interactivity/src/index.ts | 4 +- packages/interactivity/src/init.ts | 11 + packages/interactivity/src/proxies/context.ts | 72 + packages/interactivity/src/proxies/index.ts | 1 + packages/interactivity/src/proxies/state.ts | 135 +- .../src/proxies/test/context-proxy.ts | 369 + .../src/proxies/test/deep-merge.ts | 198 +- .../src/proxies/test/state-proxy.ts | 199 +- packages/interactivity/src/scopes.ts | 44 + packages/interactivity/src/store.ts | 98 +- packages/interactivity/src/test/store.ts | 286 + packages/interactivity/src/utils.ts | 28 +- packages/interactivity/src/vdom.ts | 39 +- packages/interactivity/tsconfig.test.json | 13 + packages/interface/.npmrc | 1 - packages/interface/CHANGELOG.md | 18 + .../complementary-area-context/index.js | 12 - packages/interface/package.json | 28 +- .../complementary-area-context/index.js | 12 - .../complementary-area-header/index.js | 33 +- .../complementary-area-header/style.scss | 36 +- .../complementary-area-toggle/index.js | 40 +- .../components/complementary-area/README.md | 8 - .../components/complementary-area/index.js | 27 +- .../components/complementary-area/style.scss | 6 +- .../components/interface-skeleton/index.js | 16 +- .../src/components/navigable-region/index.js | 43 +- packages/is-shallow-equal/.npmrc | 1 - packages/is-shallow-equal/CHANGELOG.md | 10 + packages/is-shallow-equal/package.json | 5 +- packages/jest-console/.npmrc | 1 - packages/jest-console/CHANGELOG.md | 10 + packages/jest-console/package.json | 4 +- packages/jest-preset-default/.npmrc | 1 - packages/jest-preset-default/CHANGELOG.md | 10 + packages/jest-preset-default/package.json | 6 +- packages/jest-puppeteer-axe/.npmrc | 1 - packages/jest-puppeteer-axe/CHANGELOG.md | 10 + packages/jest-puppeteer-axe/package.json | 4 +- packages/keyboard-shortcuts/.npmrc | 0 packages/keyboard-shortcuts/CHANGELOG.md | 10 + packages/keyboard-shortcuts/package.json | 11 +- packages/keycodes/.npmrc | 1 - packages/keycodes/CHANGELOG.md | 10 + packages/keycodes/package.json | 7 +- packages/lazy-import/.npmrc | 1 - packages/lazy-import/CHANGELOG.md | 10 + packages/lazy-import/package.json | 2 +- packages/list-reusable-blocks/.npmrc | 1 - packages/list-reusable-blocks/CHANGELOG.md | 10 + packages/list-reusable-blocks/package.json | 17 +- .../src/components/import-dropdown/index.js | 4 +- .../src/components/import-dropdown/style.scss | 5 + .../src/components/import-form/index.js | 3 +- .../src/components/import-form/style.scss | 1 - packages/list-reusable-blocks/src/style.scss | 4 - packages/media-utils/.npmrc | 1 - packages/media-utils/CHANGELOG.md | 10 +- packages/media-utils/README.md | 4 + packages/media-utils/package.json | 14 +- .../src/components/media-upload/index.js | 97 +- packages/media-utils/src/index.ts | 2 + .../src/lock-unlock.ts} | 2 +- packages/media-utils/src/private-apis.ts | 14 + .../media-utils/src/utils/sideload-media.ts | 82 + .../src/utils/sideload-to-server.ts | 48 + .../src/utils/test/sideload-media.ts | 33 + packages/media-utils/src/utils/types.ts | 10 + packages/media-utils/tsconfig.json | 3 +- packages/notices/.npmrc | 1 - packages/notices/CHANGELOG.md | 10 + packages/notices/package.json | 9 +- packages/npm-package-json-lint-config/.npmrc | 1 - .../npm-package-json-lint-config/CHANGELOG.md | 14 + .../npm-package-json-lint-config/index.js | 4 + .../npm-package-json-lint-config/package.json | 2 +- packages/nux/.npmrc | 1 - packages/nux/CHANGELOG.md | 10 + packages/nux/package.json | 19 +- packages/nux/src/components/dot-tip/index.js | 6 +- .../dot-tip/test/__snapshots__/index.js.snap | 6 +- packages/patterns/.npmrc | 1 - packages/patterns/CHANGELOG.md | 10 + packages/patterns/package.json | 33 +- .../src/components/duplicate-pattern-modal.js | 10 +- .../src/components/pattern-convert-button.js | 12 +- .../pattern-overrides-block-controls.js | 2 +- .../components/pattern-overrides-controls.js | 5 +- packages/plugins/.npmrc | 1 - packages/plugins/CHANGELOG.md | 10 + packages/plugins/README.md | 2 + packages/plugins/package.json | 18 +- .../src/components/plugin-context/index.tsx | 7 + packages/plugins/tsconfig.json | 1 + packages/postcss-plugins-preset/.npmrc | 1 - packages/postcss-plugins-preset/CHANGELOG.md | 10 + packages/postcss-plugins-preset/package.json | 4 +- packages/postcss-themes/.npmrc | 1 - packages/postcss-themes/CHANGELOG.md | 10 + packages/postcss-themes/package.json | 2 +- packages/preferences-persistence/.npmrc | 1 - packages/preferences-persistence/CHANGELOG.md | 10 + packages/preferences-persistence/package.json | 7 +- packages/preferences/.npmrc | 1 - packages/preferences/CHANGELOG.md | 10 + packages/preferences/package.json | 23 +- .../preferences-modal-tabs/index.js | 26 +- packages/prettier-config/.npmrc | 1 - packages/prettier-config/CHANGELOG.md | 10 + packages/prettier-config/package.json | 2 +- packages/primitives/.npmrc | 1 - packages/primitives/CHANGELOG.md | 10 + packages/primitives/package.json | 9 +- packages/priority-queue/.npmrc | 1 - packages/priority-queue/CHANGELOG.md | 10 + packages/priority-queue/package.json | 5 +- packages/private-apis/CHANGELOG.md | 10 + packages/private-apis/package.json | 5 +- .../{implementation.js => implementation.ts} | 48 +- .../private-apis/src/{index.js => index.ts} | 0 packages/project-management-automation/.npmrc | 1 - .../CHANGELOG.md | 10 + .../package.json | 4 +- packages/react-i18n/CHANGELOG.md | 10 + packages/react-i18n/package.json | 9 +- packages/react-native-aztec/.npmrc | 1 - packages/react-native-aztec/package.json | 4 +- packages/react-native-bridge/.npmrc | 1 - packages/react-native-bridge/package.json | 2 +- packages/react-native-editor/.npmrc | 1 - packages/react-native-editor/babel.config.js | 2 +- packages/react-native-editor/package.json | 28 +- .../readable-js-assets-webpack-plugin/.npmrc | 1 - .../CHANGELOG.md | 10 + .../package.json | 2 +- .../test/__snapshots__/build.js.snap | 2 - packages/redux-routine/.npmrc | 1 - packages/redux-routine/CHANGELOG.md | 10 + packages/redux-routine/package.json | 5 +- packages/report-flaky-tests/.npmrc | 1 - packages/reusable-blocks/.npmrc | 1 - packages/reusable-blocks/CHANGELOG.md | 10 + packages/reusable-blocks/package.json | 27 +- .../reusable-block-convert-button.js | 6 +- .../reusable-blocks/src/store/test/actions.js | 2 + packages/rich-text/.npmrc | 1 - packages/rich-text/CHANGELOG.md | 10 + packages/rich-text/README.md | 2 +- packages/rich-text/package.json | 23 +- .../component/event-listeners/copy-handler.js | 17 +- .../src/component/event-listeners/index.js | 8 +- .../event-listeners/input-and-selection.js | 19 +- .../event-listeners/prevent-focus-capture.js | 44 + packages/rich-text/src/create.js | 32 +- .../src/remove-unregistered-formatting.js | 0 .../src/test/__snapshots__/to-dom.js.snap | 30 + packages/rich-text/src/test/helpers/index.js | 52 + packages/rich-text/src/to-dom.js | 12 +- packages/rich-text/src/to-html-string.js | 11 +- packages/rich-text/src/to-tree.js | 15 +- packages/router/.npmrc | 0 packages/router/CHANGELOG.md | 14 + packages/router/package.json | 12 +- packages/router/src/history.js | 61 - packages/router/src/history.ts | 99 + packages/router/src/{index.js => index.ts} | 0 .../src/{lock-unlock.js => lock-unlock.ts} | 0 .../src/{private-apis.js => private-apis.ts} | 0 packages/router/src/{router.js => router.tsx} | 7 +- packages/router/tsconfig.json | 17 + packages/scripts/.npmrc | 1 - packages/scripts/CHANGELOG.md | 36 +- packages/scripts/README.md | 43 + packages/scripts/config/webpack.config.js | 1 - packages/scripts/package.json | 36 +- .../scripts/scripts/build-blocks-manifest.js | 72 + packages/scripts/scripts/check-licenses.js | 346 +- packages/scripts/scripts/plugin-zip.js | 29 +- .../build-blocks-manifest.js.snap | 113 + .../scripts/test/build-blocks-manifest.js | 101 + .../build-blocks-manifest/empty-input/.keep} | 0 .../input/custom-header/block.json | 33 + .../input/image-gallery/block.json | 50 + .../input/simple-button/block.json | 16 + packages/scripts/utils/config.js | 102 +- packages/scripts/utils/license.js | 377 + .../test/license.js} | 5 +- .../test/licenses/apache2-mit.txt | 0 .../test/licenses/apache2.txt | 0 .../test/licenses/bsd3clause.txt | 0 .../{scripts => utils}/test/licenses/mit.txt | 0 .../test/licenses/w3cbsd.txt | 0 packages/server-side-render/.npmrc | 1 - packages/server-side-render/CHANGELOG.md | 10 + packages/server-side-render/README.md | 2 +- packages/server-side-render/package.json | 23 +- packages/shortcode/.npmrc | 1 - packages/shortcode/CHANGELOG.md | 10 + packages/shortcode/package.json | 5 +- packages/style-engine/.npmrc | 1 - packages/style-engine/CHANGELOG.md | 10 + .../style-engine/class-wp-style-engine.php | 11 +- packages/style-engine/package.json | 5 +- packages/stylelint-config/.npmrc | 1 - packages/stylelint-config/CHANGELOG.md | 10 +- packages/stylelint-config/package.json | 2 +- packages/sync/.npmrc | 1 - packages/sync/CHANGELOG.md | 10 + packages/sync/package.json | 7 +- packages/token-list/.npmrc | 1 - packages/token-list/CHANGELOG.md | 10 + packages/token-list/package.json | 5 +- packages/undo-manager/.npmrc | 1 - packages/undo-manager/CHANGELOG.md | 10 + packages/undo-manager/package.json | 7 +- packages/url/.npmrc | 1 - packages/url/CHANGELOG.md | 10 + packages/url/package.json | 5 +- packages/viewport/.npmrc | 1 - packages/viewport/CHANGELOG.md | 10 + packages/viewport/package.json | 11 +- packages/{a11y => vips}/.npmrc | 0 packages/vips/CHANGELOG.md | 7 + packages/vips/README.md | 98 + packages/vips/package.json | 36 + packages/vips/src/index.ts | 366 + packages/vips/src/test/resize-image.ts | 223 + packages/vips/src/types.ts | 170 + packages/vips/src/utils.ts | 43 + packages/vips/tsconfig.json | 9 + packages/warning/.npmrc | 1 - packages/warning/CHANGELOG.md | 10 + packages/warning/package.json | 3 +- packages/widgets/.npmrc | 1 - packages/widgets/CHANGELOG.md | 10 + packages/widgets/package.json | 27 +- .../src/blocks/legacy-widget/edit/index.js | 10 +- packages/wordcount/.npmrc | 1 - packages/wordcount/CHANGELOG.md | 10 + packages/wordcount/package.json | 5 +- patches/wasm-vips+0.0.10.patch | 15 + phpunit/block-supports/border-test.php | 281 +- phpunit/block-supports/typography-test.php | 105 + phpunit/block-template-test.php | 8 +- .../block-navigation-block-hooks-test.php | 148 - phpunit/blocks/get-block-templates-test.php | 109 - phpunit/blocks/render-block-image-test.php | 62 + phpunit/blocks/render-post-template-test.php | 72 +- phpunit/bootstrap.php | 6 - ...tenberg-rest-templates-controller-test.php | 4 +- .../class-test-plugin-version-meta-test.php | 26 + ...lobal-styles-controller-gutenberg-test.php | 77 +- phpunit/class-wp-theme-json-test.php | 386 +- platform-docs/package-lock.json | 391 +- react-scanner.config.js | 31 + readme.txt | 4 +- storybook/main.js | 11 + storybook/manager-head.html | 5 + storybook/package-styles/config.js | 4 +- storybook/preview.js | 22 + storybook/static/wp-logo@2x.png | Bin 0 -> 5395 bytes .../foundations/design-language/elevation.mdx | 87 + .../foundations/design-language/radius.mdx | 55 + .../static/elevation-examples.svg | 170 + .../design-language/static/elevation.svg | 208 + .../design-language/static/radius-do.svg | 58 + .../design-language/static/radius-dont.svg | 58 + .../design-language/static/radius.svg | 62 + .../design-language/static/wp-logo@2x.png | Bin 0 -> 5395 bytes storybook/stories/playground/box/index.js | 2 +- .../playground/fullpage/style.lazy.scss | 16 - storybook/stories/playground/index.story.js | 12 + .../playground/with-undo-redo/index.js | 2 + .../stories/playground/zoom-out/index.js | 68 + .../stories/playground/zoom-out/pattern.js | 39 + storybook/stories/tokens/color.mdx | 61 + storybook/stories/tokens/components.tsx | 53 + storybook/stories/tokens/elevation.mdx | 90 + storybook/stories/tokens/radius.mdx | 105 + storybook/stories/tokens/typography.mdx | 178 + storybook/theme.js | 35 +- test/e2e/specs/editor/blocks/buttons.spec.js | 20 +- test/e2e/specs/editor/blocks/columns.spec.js | 6 +- test/e2e/specs/editor/blocks/cover.spec.js | 71 + test/e2e/specs/editor/blocks/group.spec.js | 7 +- test/e2e/specs/editor/blocks/image.spec.js | 5 +- test/e2e/specs/editor/blocks/links.spec.js | 54 +- .../editor/blocks/navigation-colors.spec.js | 6 +- .../blocks/navigation-list-view.spec.js | 4 +- .../specs/editor/blocks/navigation.spec.js | 4 +- .../editor/plugins/allowed-blocks.spec.js | 4 +- .../editor/plugins/block-directory.spec.js | 8 +- .../specs/editor/plugins/block-icons.spec.js | 10 +- .../editor/plugins/block-variations.spec.js | 8 +- .../specs/editor/plugins/child-blocks.spec.js | 6 +- .../inner-blocks-allowed-blocks.spec.js | 4 +- .../specs/editor/plugins/meta-boxes.spec.js | 18 +- .../editor/plugins/pattern-recursion.spec.js | 4 +- .../editor/plugins/post-type-locking.spec.js | 5 +- .../plugins/register-block-type-hooks.spec.js | 2 +- .../editor/plugins/wp-editor-meta-box.spec.js | 2 +- ...aste-link-to-formatted-text-1-chromium.txt | 3 + ...ng-from-the-global-inserter-1-chromium.txt | 18 +- ...ping-from-the-global-inserter-1-webkit.txt | 18 +- test/e2e/specs/editor/various/a11y.spec.js | 11 +- .../editor/various/adding-patterns.spec.js | 12 +- .../editor/various/allowed-patterns.spec.js | 15 +- .../editor/various/block-bindings.spec.js | 2415 - .../block-bindings/custom-sources.spec.js | 1204 + .../various/block-bindings/post-meta.spec.js | 600 + .../editor/various/block-deletion.spec.js | 11 +- .../editor/various/block-moving-mode.spec.js | 155 - .../editor/various/block-visibility.spec.js | 258 + .../editor/various/copy-cut-paste.spec.js | 21 + .../specs/editor/various/editor-modes.spec.js | 2 +- .../specs/editor/various/embedding.spec.js | 6 +- .../editor/various/inserting-blocks.spec.js | 45 +- .../keep-styles-on-block-transforms.spec.js | 2 +- .../various/keyboard-navigable-blocks.spec.js | 126 +- .../various/multi-block-selection.spec.js | 9 +- .../editor/various/parsing-patterns.spec.js | 14 +- .../editor/various/pattern-overrides.spec.js | 9 +- .../e2e/specs/editor/various/patterns.spec.js | 8 +- .../various/post-editor-template-mode.spec.js | 2 +- .../editor/various/publish-button.spec.js | 7 +- .../editor/various/publish-panel.spec.js | 4 +- .../various/shortcut-focus-toolbar.spec.js | 30 +- .../editor/various/splitting-merging.spec.js | 106 + .../editor/various/write-design-mode.spec.js | 124 + .../specs/editor/various/writing-flow.spec.js | 78 +- .../interactivity/directive-class.spec.ts | 10 + .../interactivity/get-sever-context.spec.ts | 166 + .../interactivity/get-sever-state.spec.ts | 119 + .../block-style-variations.spec.js | 9 +- .../specs/site-editor/command-center.spec.js | 8 +- .../specs/site-editor/font-library.spec.js | 55 +- .../site-editor/global-styles-sidebar.spec.js | 8 +- test/e2e/specs/site-editor/navigation.spec.js | 13 - test/e2e/specs/site-editor/pages.spec.js | 4 +- .../site-editor/push-to-global-styles.spec.js | 15 +- .../site-editor/site-editor-inserter.spec.js | 15 +- test/e2e/specs/site-editor/style-book.spec.js | 28 +- .../site-editor/style-variations.spec.js | 22 +- test/e2e/specs/site-editor/styles.spec.js | 4 +- .../site-editor/template-hierarchy.spec.js | 35 + .../site-editor/template-registration.spec.js | 4 +- .../specs/site-editor/template-revert.spec.js | 8 +- test/e2e/specs/site-editor/title.spec.js | 4 +- .../user-global-styles-revisions.spec.js | 24 +- test/e2e/specs/site-editor/zoom-out.spec.js | 245 +- .../specs/widgets/customizing-widgets.spec.js | 16 +- .../e2e/specs/widgets/editing-widgets.spec.js | 8 +- .../block-bindings/index.php | 9 + .../block-bindings/style.css | 15 + .../templates/custom-template.html | 3 + .../block-bindings/templates/index.html | 8 + .../templates/single-movie.html | 2 + .../block-bindings/templates/single.html | 2 + .../block-bindings/theme.json | 18 + .../fixtures/blocks/core__categories.json | 1 + .../fixtures/blocks/core__cover.html | 2 +- .../fixtures/blocks/core__cover.parsed.json | 4 +- .../blocks/core__cover.serialized.html | 2 +- .../core__cover__alt-fixed-background.html | 4 +- ...e__cover__alt-fixed-background.parsed.json | 4 +- ...over__alt-fixed-background.serialized.html | 2 +- .../core__cover__deprecated-1.serialized.html | 2 +- .../blocks/core__cover__deprecated-10.json | 2 +- ...core__cover__deprecated-10.serialized.html | 2 +- .../blocks/core__cover__deprecated-14.html | 5 + .../blocks/core__cover__deprecated-14.json | 37 + .../core__cover__deprecated-14.parsed.json | 37 + ...core__cover__deprecated-14.serialized.html | 5 + .../core__cover__deprecated-2.serialized.html | 2 +- .../core__cover__deprecated-3.serialized.html | 2 +- .../core__cover__deprecated-4.serialized.html | 2 +- .../core__cover__deprecated-5.serialized.html | 2 +- .../core__cover__deprecated-6.serialized.html | 6 +- .../core__cover__deprecated-7.serialized.html | 2 +- .../core__cover__deprecated-8.serialized.html | 2 +- ...core__cover__duotone-fixed-background.html | 4 +- ...over__duotone-fixed-background.parsed.json | 4 +- ...__duotone-fixed-background.serialized.html | 2 +- .../blocks/core__cover__gradient-image.html | 2 +- .../core__cover__gradient-image.parsed.json | 4 +- ...ore__cover__gradient-image.serialized.html | 2 +- .../blocks/core__cover__gradient-video.html | 2 +- .../core__cover__gradient-video.parsed.json | 4 +- ...ore__cover__gradient-video.serialized.html | 2 +- .../blocks/core__cover__video-overlay.html | 4 +- .../blocks/core__cover__video-overlay.json | 6 +- .../core__cover__video-overlay.parsed.json | 7 +- ...core__cover__video-overlay.serialized.html | 2 +- .../fixtures/blocks/core__cover__video.html | 2 +- .../blocks/core__cover__video.parsed.json | 4 +- .../blocks/core__cover__video.serialized.html | 2 +- .../fixtures/blocks/core__query.json | 3 +- test/native/babel.config.js | 4 +- .../initialize-editor.js | 17 + test/performance/fixtures/perf-utils.ts | 24 +- test/performance/specs/post-editor.spec.js | 34 +- test/performance/specs/site-editor.spec.js | 2 + test/storybook-playwright/storybook/main.js | 1 + test/unit/config/global-mocks.js | 5 + test/unit/config/wasm-stub.js | 1 + test/unit/jest.config.js | 6 +- test/unit/mocks/match-media.js | 22 + tools/webpack/blocks.js | 4 +- tools/webpack/packages.js | 54 +- tools/webpack/script-modules.js | 51 +- tsconfig.json | 3 + 2119 files changed, 58787 insertions(+), 82794 deletions(-) create mode 100644 backport-changelog/6.7/7298.md create mode 100644 backport-changelog/6.7/7314.md create mode 100644 backport-changelog/6.7/7336.md create mode 100644 backport-changelog/6.7/7360.md create mode 100644 backport-changelog/6.7/7543.md create mode 100644 backport-changelog/6.7/7552.md create mode 100644 backport-changelog/6.7/7561.md create mode 100644 backport-changelog/6.7/7661.md create mode 100644 backport-changelog/6.7/7676.md create mode 100644 backport-changelog/6.8/7069.md create mode 100644 backport-changelog/6.8/7129.md create mode 100644 backport-changelog/6.8/7265.md create mode 100644 backport-changelog/6.8/7488.md create mode 100644 backport-changelog/6.8/7498.md create mode 100644 backport-changelog/6.8/7575.md create mode 100644 backport-changelog/6.8/7604.md create mode 100644 backport-changelog/6.8/7643.md create mode 100644 backport-changelog/6.8/7681.md create mode 100644 backport-changelog/6.8/7687.md create mode 100644 backport-changelog/6.8/7695.md create mode 100644 backport-changelog/6.8/7697.md create mode 100644 backport-changelog/6.8/7698.md create mode 100644 backport-changelog/6.8/7759.md create mode 100644 backport-changelog/6.8/7784.md create mode 100644 backport-changelog/6.8/7825.md create mode 100644 backport-changelog/6.8/7848.md create mode 100644 bin/api-docs/gen-components-docs/get-subcomponent-descriptions.mjs create mode 100644 bin/api-docs/gen-components-docs/index.mjs create mode 100644 bin/api-docs/gen-components-docs/markdown/index.mjs create mode 100644 bin/api-docs/gen-components-docs/markdown/props.mjs create mode 100755 bin/check-licenses.mjs create mode 100644 docs/reference-guides/block-api/block-bindings.md create mode 100644 docs/reference-guides/interactivity-api/core-concepts/using-typescript.md delete mode 100644 lib/compat/wordpress-6.6/admin-bar.php delete mode 100644 lib/compat/wordpress-6.6/block-bindings/pattern-overrides.php delete mode 100644 lib/compat/wordpress-6.6/block-editor.php delete mode 100644 lib/compat/wordpress-6.6/block-template-utils.php delete mode 100644 lib/compat/wordpress-6.6/blocks.php delete mode 100644 lib/compat/wordpress-6.6/class-gutenberg-rest-global-styles-revisions-controller-6-6.php delete mode 100644 lib/compat/wordpress-6.6/class-gutenberg-rest-templates-controller-6-6.php delete mode 100644 lib/compat/wordpress-6.6/class-gutenberg-token-map-6-6.php delete mode 100644 lib/compat/wordpress-6.6/compat.php delete mode 100644 lib/compat/wordpress-6.6/html-api/class-gutenberg-html-decoder-6-6.php delete mode 100644 lib/compat/wordpress-6.6/html-api/class-gutenberg-html-open-elements-6-6.php delete mode 100644 lib/compat/wordpress-6.6/html-api/class-gutenberg-html-processor-6-6.php delete mode 100644 lib/compat/wordpress-6.6/html-api/class-gutenberg-html-processor-state-6-6.php delete mode 100644 lib/compat/wordpress-6.6/html-api/class-gutenberg-html-stack-event-6-6.php delete mode 100644 lib/compat/wordpress-6.6/html-api/class-gutenberg-html-tag-processor-6-6.php delete mode 100644 lib/compat/wordpress-6.6/html-api/gutenberg-html5-named-character-references-6-6.php delete mode 100644 lib/compat/wordpress-6.6/option.php delete mode 100644 lib/compat/wordpress-6.6/post.php delete mode 100644 lib/compat/wordpress-6.6/resolve-patterns.php delete mode 100644 lib/compat/wordpress-6.6/rest-api.php create mode 100644 lib/compat/wordpress-6.7/class-gutenberg-rest-posts-controller-6-7.php create mode 100644 lib/compat/wordpress-6.7/post-formats.php create mode 100644 lib/compat/wordpress-6.8/block-comments.php create mode 100644 lib/compat/wordpress-6.8/blocks.php create mode 100644 lib/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php create mode 100644 lib/compat/wordpress-6.8/class-gutenberg-rest-post-types-controller-6-8.php create mode 100644 lib/compat/wordpress-6.8/functions.php create mode 100644 lib/compat/wordpress-6.8/post.php create mode 100644 lib/compat/wordpress-6.8/preload.php create mode 100644 lib/compat/wordpress-6.8/rest-api.php rename packages/a11y/src/{shared => script}/add-container.js (100%) rename packages/a11y/src/{shared => script}/add-intro-text.ts (83%) rename packages/a11y/src/{shared => script}/test/add-container.test.js (100%) delete mode 100644 packages/annotations/.npmrc delete mode 100644 packages/api-fetch/.npmrc delete mode 100644 packages/autop/.npmrc delete mode 100644 packages/babel-plugin-import-jsx-pragma/.npmrc delete mode 100644 packages/babel-plugin-makepot/.npmrc delete mode 100644 packages/babel-preset-default/.npmrc create mode 100644 packages/babel-preset-default/polyfill-exclusions.js create mode 100644 packages/babel-preset-default/replace-polyfills.js create mode 100644 packages/babel-preset-default/test/fixtures/polyfill.js delete mode 100644 packages/base-styles/.npmrc delete mode 100644 packages/blob/.npmrc delete mode 100644 packages/block-directory/.npmrc delete mode 100644 packages/block-editor/.npmrc create mode 100644 packages/block-editor/src/components/background-image-control/index.js create mode 100644 packages/block-editor/src/components/background-image-control/style.scss create mode 100644 packages/block-editor/src/components/background-image-control/test/index.js delete mode 100644 packages/block-editor/src/components/block-controls/use-has-block-controls.js delete mode 100644 packages/block-editor/src/components/block-info-slot-fill/index.js delete mode 100644 packages/block-editor/src/components/block-list/use-block-props/use-nav-mode-exit.js create mode 100644 packages/block-editor/src/components/block-manager/category.js rename packages/{editor => block-editor}/src/components/block-manager/checklist.js (70%) create mode 100644 packages/block-editor/src/components/block-manager/index.js rename packages/{editor => block-editor}/src/components/block-manager/style.scss (65%) create mode 100644 packages/block-editor/src/components/block-patterns-list/stories/fixtures.js create mode 100644 packages/block-editor/src/components/block-patterns-list/stories/index.story.js rename packages/{edit-site/src/components/async/index.js => block-editor/src/components/block-preview/async.js} (100%) create mode 100644 packages/block-editor/src/components/block-toolbar/change-design.js delete mode 100644 packages/block-editor/src/components/block-toolbar/shuffle.js create mode 100644 packages/block-editor/src/components/block-toolbar/switch-section-style.js delete mode 100644 packages/block-editor/src/components/block-tools/block-selection-button.js delete mode 100644 packages/block-editor/src/components/block-tools/block-toolbar-breadcrumb.js delete mode 100644 packages/block-editor/src/components/block-tools/zoom-out-popover.js delete mode 100644 packages/block-editor/src/components/block-tools/zoom-out-toolbar.js delete mode 100644 packages/block-editor/src/components/block-vertical-alignment-control/icons.js create mode 100644 packages/block-editor/src/components/collab/block-comment-icon-slot.js create mode 100644 packages/block-editor/src/components/collab/block-comment-icon-toolbar-slot.js create mode 100644 packages/block-editor/src/components/iframe/style.scss delete mode 100644 packages/block-editor/src/components/inner-blocks/content.scss delete mode 100644 packages/block-editor/src/components/inserter/tabs.js delete mode 100644 packages/block-editor/src/components/inserter/test/block-types-tab.native.js delete mode 100644 packages/block-editor/src/components/writing-flow/use-event-redirect.js rename packages/block-editor/src/{lock-unlock.js => lock-unlock.ts} (100%) create mode 100644 packages/block-editor/src/utils/test/dom.js create mode 100644 packages/block-editor/src/utils/test/use-block-bindings-utils.js delete mode 100644 packages/block-library/.npmrc create mode 100644 packages/block-library/src/categories/variations.js create mode 100644 packages/block-library/src/cover/constants.js rename packages/block-library/src/{lock-unlock.js => lock-unlock.ts} (100%) delete mode 100644 packages/block-library/src/post-content/editor.scss delete mode 100644 packages/block-library/src/query/edit/inspector-controls/create-new-post-link.js create mode 100644 packages/block-library/src/query/edit/inspector-controls/format-controls.js create mode 100644 packages/block-library/src/spacer/transforms.js create mode 100644 packages/block-library/src/template-part/edit/utils/get-template-part-icon.js delete mode 100644 packages/block-serialization-default-parser/.npmrc delete mode 100644 packages/block-serialization-spec-parser/.npmrc delete mode 100644 packages/blocks/.npmrc create mode 100644 packages/blocks/src/store/test/process-block-type.js delete mode 100644 packages/browserslist-config/.npmrc delete mode 100644 packages/components/.npmrc create mode 100644 packages/components/schemas/docs-manifest.json create mode 100644 packages/components/src/alignment-matrix-control/docs-manifest.json create mode 100644 packages/components/src/angle-picker-control/docs-manifest.json create mode 100644 packages/components/src/base-control/docs-manifest.json create mode 100644 packages/components/src/composite/test/index.tsx delete mode 100644 packages/components/src/dropdown-menu-v2/context.tsx delete mode 100644 packages/components/src/dropdown-menu-v2/group.tsx delete mode 100644 packages/components/src/dropdown-menu-v2/separator.tsx delete mode 100644 packages/components/src/dropdown-menu-v2/stories/index.story.tsx create mode 100644 packages/components/src/gradient-picker/docs-manifest.json rename packages/components/src/{dropdown-menu-v2 => menu}/README.md (70%) rename packages/components/src/{dropdown-menu-v2 => menu}/checkbox-item.tsx (63%) create mode 100644 packages/components/src/menu/context.tsx rename packages/components/src/{dropdown-menu-v2 => menu}/group-label.tsx (55%) create mode 100644 packages/components/src/menu/group.tsx rename packages/components/src/{dropdown-menu-v2 => menu}/index.tsx (60%) rename packages/components/src/{dropdown-menu-v2 => menu}/item-help-text.tsx (61%) rename packages/components/src/{dropdown-menu-v2 => menu}/item-label.tsx (62%) rename packages/components/src/{dropdown-menu-v2 => menu}/item.tsx (60%) rename packages/components/src/{dropdown-menu-v2 => menu}/radio-item.tsx (67%) create mode 100644 packages/components/src/menu/separator.tsx create mode 100644 packages/components/src/menu/stories/index.story.tsx rename packages/components/src/{dropdown-menu-v2 => menu}/styles.ts (90%) rename packages/components/src/{dropdown-menu-v2 => menu}/test/index.tsx (75%) rename packages/components/src/{dropdown-menu-v2 => menu}/types.ts (71%) rename packages/components/src/{dropdown-menu-v2 => menu}/use-temporary-focus-visible-fix.ts (100%) create mode 100644 packages/components/src/modal/use-modal-exit-animation.ts create mode 100644 packages/components/src/navigator/README.md delete mode 100644 packages/components/src/navigator/index.ts create mode 100644 packages/components/src/navigator/index.tsx create mode 100644 packages/components/src/navigator/legacy.ts delete mode 100644 packages/components/src/navigator/navigator-back-button/README.md delete mode 100644 packages/components/src/navigator/navigator-button/README.md delete mode 100644 packages/components/src/navigator/navigator-provider/README.md delete mode 100644 packages/components/src/navigator/navigator-screen/README.md create mode 100644 packages/components/src/navigator/navigator-screen/use-screen-animate-presence.ts delete mode 100644 packages/components/src/navigator/navigator-to-parent-button/README.md rename packages/components/src/navigator/{navigator-provider => navigator}/component.tsx (81%) create mode 100644 packages/components/src/tabs/use-track-overflow.ts create mode 100644 packages/components/src/utils/deprecated-36px-size.ts create mode 100644 packages/components/src/utils/hooks/use-animated-offset-rect.ts delete mode 100644 packages/components/src/utils/hooks/use-event.ts delete mode 100644 packages/compose/.npmrc create mode 100644 packages/compose/src/hooks/use-resize-observer/index.native.js rename packages/compose/src/hooks/use-resize-observer/{_legacy => legacy}/index.native.js (100%) rename packages/compose/src/hooks/use-resize-observer/{_legacy => legacy}/index.tsx (98%) rename packages/compose/src/hooks/use-resize-observer/{_legacy => legacy}/test/index.native.js (100%) create mode 100644 packages/compose/src/hooks/use-resize-observer/use-resize-observer.ts delete mode 100644 packages/core-commands/.npmrc delete mode 100644 packages/core-data/.npmrc rename packages/core-data/src/{lock-unlock.js => lock-unlock.ts} (100%) create mode 100644 packages/core-data/src/private-actions.js create mode 100644 packages/core-data/src/utils/receive-intermediate-results.js delete mode 100644 packages/create-block-interactive-template/.npmrc create mode 100644 packages/create-block-interactive-template/block-templates/view.ts.mustache delete mode 100644 packages/create-block-tutorial-template/.npmrc delete mode 100644 packages/create-block/.npmrc delete mode 100644 packages/customize-widgets/.npmrc delete mode 100644 packages/data/.npmrc rename packages/data/src/{lock-unlock.js => lock-unlock.ts} (100%) rename packages/data/src/utils/{emitter.js => emitter.ts} (71%) delete mode 100644 packages/dataviews/.npmrc create mode 100644 packages/dataviews/src/components/dataform-context/index.tsx create mode 100644 packages/dataviews/src/components/form-field-visibility/index.tsx create mode 100644 packages/dataviews/src/dataforms-layouts/data-form-layout.tsx create mode 100644 packages/dataviews/src/dataforms-layouts/is-combined-field.ts create mode 100644 packages/dataviews/src/dataforms-layouts/regular/style.scss rename packages/dataviews/src/dataviews-layouts/grid/{density-picker.tsx => preview-size-picker.tsx} (56%) create mode 100644 packages/dataviews/src/dataviews-layouts/table/density-picker.tsx create mode 100644 packages/dataviews/src/dataviews-layouts/utils/get-clickable-item-props.ts create mode 100644 packages/dataviews/src/normalize-form-fields.ts create mode 100644 packages/dataviews/src/test/normalize-fields.ts delete mode 100644 packages/date/.npmrc create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/cyclic-external-deps/a.js create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/cyclic-external-deps/index.js create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/cyclic-external-deps/webpack.config.js create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/polyfill-magic-comment-minified/index.js create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/polyfill-magic-comment-minified/webpack.config.js create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/polyfill-magic-comment/index.js create mode 100644 packages/dependency-extraction-webpack-plugin/test/fixtures/polyfill-magic-comment/webpack.config.js delete mode 100644 packages/deprecated/.npmrc delete mode 100644 packages/docgen/.npmrc delete mode 100644 packages/dom-ready/.npmrc delete mode 100644 packages/dom/.npmrc delete mode 100644 packages/e2e-test-utils-playwright/.npmrc create mode 100644 packages/e2e-test-utils-playwright/src/editor/switch-editor-tool.ts delete mode 100644 packages/e2e-test-utils/.npmrc delete mode 100644 packages/e2e-tests/.npmrc create mode 100644 packages/e2e-tests/plugins/block-bindings/index.js create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-context/block.json create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-context/render.php create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-context/view.asset.php create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-context/view.js create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-state/block.json create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-state/render.php create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-state/view.asset.php create mode 100644 packages/e2e-tests/plugins/interactive-blocks/get-server-state/view.js delete mode 100644 packages/edit-post/.npmrc delete mode 100644 packages/edit-post/src/store/private-selectors.js delete mode 100644 packages/edit-site/.npmrc create mode 100644 packages/edit-site/src/components/editor/use-adapt-editor-to-canvas.js create mode 100644 packages/edit-site/src/components/editor/use-resolve-edited-entity.js create mode 100644 packages/edit-site/src/components/global-styles/screen-background.js delete mode 100644 packages/edit-site/src/components/global-styles/screen-typeset.js delete mode 100644 packages/edit-site/src/components/global-styles/typeset-button.js delete mode 100644 packages/edit-site/src/components/keyboard-shortcuts/global.js delete mode 100644 packages/edit-site/src/components/keyboard-shortcuts/register.js delete mode 100644 packages/edit-site/src/components/post-fields/index.js create mode 100644 packages/edit-site/src/components/posts-app-routes/home.js create mode 100644 packages/edit-site/src/components/posts-app-routes/index.js create mode 100644 packages/edit-site/src/components/posts-app-routes/posts-edit.js create mode 100644 packages/edit-site/src/components/posts-app-routes/posts-list-view-quick-edit.js create mode 100644 packages/edit-site/src/components/posts-app-routes/posts-list-view.js create mode 100644 packages/edit-site/src/components/posts-app-routes/posts-view-quick-edit.js create mode 100644 packages/edit-site/src/components/posts-app-routes/posts-view.js delete mode 100644 packages/edit-site/src/components/posts-app/router.js create mode 100644 packages/edit-site/src/components/save-keyboard-shortcut/index.js create mode 100644 packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js create mode 100644 packages/edit-site/src/components/sidebar-global-styles-wrapper/style.scss delete mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js delete mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js delete mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js delete mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js delete mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-details-panel/style.scss create mode 100644 packages/edit-site/src/components/site-editor-routes/README.md create mode 100644 packages/edit-site/src/components/site-editor-routes/home-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/home-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/index.js create mode 100644 packages/edit-site/src/components/site-editor-routes/navigation-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/navigation-item-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/navigation-item-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/navigation-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/pages-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/pages-list-view-quick-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/pages-list-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/pages-view-quick-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/pages-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/patterns-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/patterns-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/styles-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/templates-edit.js create mode 100644 packages/edit-site/src/components/site-editor-routes/templates-list-view.js create mode 100644 packages/edit-site/src/components/site-editor-routes/templates-view.js create mode 100644 packages/edit-site/src/components/style-book/categories.ts create mode 100644 packages/edit-site/src/components/style-book/color-examples.tsx create mode 100644 packages/edit-site/src/components/style-book/constants.ts create mode 100644 packages/edit-site/src/components/style-book/duotone-examples.tsx create mode 100644 packages/edit-site/src/components/style-book/examples.tsx create mode 100644 packages/edit-site/src/components/style-book/test/categories.js create mode 100644 packages/edit-site/src/components/style-book/types.ts delete mode 100644 packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js delete mode 100644 packages/edit-site/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js delete mode 100644 packages/edit-site/src/components/use-edited-entity-record/index.js delete mode 100644 packages/edit-site/src/hooks/commands/use-edit-mode-commands.js delete mode 100644 packages/edit-site/src/store/test/actions.js delete mode 100644 packages/edit-site/src/store/test/reducer.js delete mode 100644 packages/edit-site/src/store/test/selectors.js delete mode 100644 packages/edit-widgets/.npmrc delete mode 100644 packages/editor/.npmrc delete mode 100644 packages/editor/src/components/block-manager/category.js delete mode 100644 packages/editor/src/components/block-manager/index.js create mode 100644 packages/editor/src/components/collab-sidebar/add-comment.js create mode 100644 packages/editor/src/components/collab-sidebar/comment-author-info.js create mode 100644 packages/editor/src/components/collab-sidebar/comment-button-toolbar.js create mode 100644 packages/editor/src/components/collab-sidebar/comment-button.js create mode 100644 packages/editor/src/components/collab-sidebar/comment-form.js create mode 100644 packages/editor/src/components/collab-sidebar/comments.js create mode 100644 packages/editor/src/components/collab-sidebar/constants.js create mode 100644 packages/editor/src/components/collab-sidebar/index.js create mode 100644 packages/editor/src/components/collab-sidebar/style.scss create mode 100644 packages/editor/src/components/collab-sidebar/utils.js create mode 100644 packages/editor/src/components/post-fields/index.ts create mode 100644 packages/editor/src/components/preferences-modal/block-visibility.js create mode 100644 packages/editor/src/components/provider/use-post-content-blocks.js rename packages/{block-editor/src/components/block-list/use-block-props => editor/src/components/visual-editor}/use-zoom-out-mode-exit.js (59%) delete mode 100644 packages/editor/src/dataviews/actions/delete-post.tsx delete mode 100644 packages/editor/src/dataviews/actions/reset-post.tsx delete mode 100644 packages/editor/src/dataviews/fields/index.ts create mode 100644 packages/editor/src/utils/get-template-info.js create mode 100644 packages/editor/src/utils/pageTypeBadge.js create mode 100644 packages/editor/src/utils/test/get-template-info.js delete mode 100644 packages/element/.npmrc delete mode 100644 packages/env/.npmrc delete mode 100644 packages/escape-html/.npmrc delete mode 100644 packages/eslint-plugin/.npmrc delete mode 100644 packages/fields/.npmrc delete mode 100644 packages/fields/src/actions/base-post/index.ts delete mode 100644 packages/fields/src/actions/common/index.ts create mode 100644 packages/fields/src/actions/delete-post.tsx rename packages/fields/src/actions/{pattern => }/duplicate-pattern.tsx (91%) rename packages/fields/src/actions/{base-post => }/duplicate-post.native.tsx (100%) rename packages/fields/src/actions/{base-post => }/duplicate-post.tsx (94%) rename packages/fields/src/actions/{pattern => }/export-pattern.native.tsx (100%) rename packages/fields/src/actions/{pattern => }/export-pattern.tsx (95%) delete mode 100644 packages/fields/src/actions/pattern/index.ts rename packages/fields/src/actions/{common => }/permanently-delete-post.tsx (96%) rename packages/{editor/src/dataviews => fields/src}/actions/rename-post.tsx (97%) rename packages/fields/src/actions/{base-post => }/reorder-page.native.tsx (100%) rename packages/fields/src/actions/{base-post => }/reorder-page.tsx (96%) create mode 100644 packages/fields/src/actions/reset-post.tsx rename packages/{editor/src/dataviews => fields/src}/actions/restore-post.tsx (100%) rename packages/{editor/src/dataviews => fields/src}/actions/trash-post.tsx (100%) rename packages/fields/src/actions/{common => }/view-post-revisions.tsx (92%) rename packages/fields/src/actions/{base-post => }/view-post.tsx (92%) create mode 100644 packages/fields/src/fields/author/author-view.tsx create mode 100644 packages/fields/src/fields/author/index.tsx create mode 100644 packages/fields/src/fields/comment-status/index.tsx create mode 100644 packages/fields/src/fields/date/date-view.tsx create mode 100644 packages/fields/src/fields/date/index.tsx create mode 100644 packages/fields/src/fields/featured-image/featured-image-edit.tsx create mode 100644 packages/fields/src/fields/featured-image/featured-image-view.tsx create mode 100644 packages/fields/src/fields/featured-image/index.ts create mode 100644 packages/fields/src/fields/featured-image/style.scss create mode 100644 packages/fields/src/fields/parent/index.ts create mode 100644 packages/fields/src/fields/parent/parent-edit.tsx create mode 100644 packages/fields/src/fields/parent/parent-view.tsx create mode 100644 packages/fields/src/fields/parent/utils.ts create mode 100644 packages/fields/src/fields/password/edit.tsx create mode 100644 packages/fields/src/fields/password/index.tsx create mode 100644 packages/fields/src/fields/slug/index.ts create mode 100644 packages/fields/src/fields/slug/slug-edit.tsx create mode 100644 packages/fields/src/fields/slug/slug-view.tsx create mode 100644 packages/fields/src/fields/slug/style.scss create mode 100644 packages/fields/src/fields/slug/utils.ts create mode 100644 packages/fields/src/fields/status/index.tsx create mode 100644 packages/fields/src/fields/status/status-elements.tsx create mode 100644 packages/fields/src/fields/status/status-view.tsx create mode 100644 packages/fields/src/fields/title/title-view.tsx create mode 100644 packages/fields/src/mutation/index.ts create mode 100644 packages/fields/src/style.scss delete mode 100644 packages/fields/src/wordpress-editor.d.ts delete mode 100644 packages/format-library/.npmrc delete mode 100644 packages/hooks/.npmrc delete mode 100644 packages/html-entities/.npmrc delete mode 100644 packages/i18n/.npmrc delete mode 100644 packages/icons/.npmrc create mode 100644 packages/icons/src/library/arrow-down-right.js create mode 100644 packages/icons/src/library/arrow-up-left.js create mode 100644 packages/icons/src/library/background.js create mode 100644 packages/icons/src/library/bell-unread.js create mode 100644 packages/icons/src/library/bell.js create mode 100644 packages/icons/src/library/cloud-download.js create mode 100644 packages/icons/src/library/envelope.js create mode 100644 packages/icons/src/library/justify-bottom.js create mode 100644 packages/icons/src/library/justify-center-vertical.js create mode 100644 packages/icons/src/library/justify-space-between-vertical.js create mode 100644 packages/icons/src/library/justify-stretch-vertical.js create mode 100644 packages/icons/src/library/justify-top.js delete mode 100644 packages/interactivity-router/.npmrc delete mode 100644 packages/interactivity/.npmrc create mode 100644 packages/interactivity/src/proxies/context.ts create mode 100644 packages/interactivity/src/proxies/test/context-proxy.ts create mode 100644 packages/interactivity/src/test/store.ts create mode 100644 packages/interactivity/tsconfig.test.json delete mode 100644 packages/interface/.npmrc delete mode 100644 packages/interface/complementary-area-context/index.js delete mode 100644 packages/interface/src/components/complementary-area-context/index.js delete mode 100644 packages/is-shallow-equal/.npmrc delete mode 100644 packages/jest-console/.npmrc delete mode 100644 packages/jest-preset-default/.npmrc delete mode 100644 packages/jest-puppeteer-axe/.npmrc delete mode 100644 packages/keyboard-shortcuts/.npmrc delete mode 100644 packages/keycodes/.npmrc delete mode 100644 packages/lazy-import/.npmrc delete mode 100644 packages/list-reusable-blocks/.npmrc delete mode 100644 packages/media-utils/.npmrc rename packages/{interface/lock-unlock.js => media-utils/src/lock-unlock.ts} (92%) create mode 100644 packages/media-utils/src/private-apis.ts create mode 100644 packages/media-utils/src/utils/sideload-media.ts create mode 100644 packages/media-utils/src/utils/sideload-to-server.ts create mode 100644 packages/media-utils/src/utils/test/sideload-media.ts delete mode 100644 packages/notices/.npmrc delete mode 100644 packages/npm-package-json-lint-config/.npmrc delete mode 100644 packages/nux/.npmrc delete mode 100644 packages/patterns/.npmrc delete mode 100644 packages/plugins/.npmrc delete mode 100644 packages/postcss-plugins-preset/.npmrc delete mode 100644 packages/postcss-themes/.npmrc delete mode 100644 packages/preferences-persistence/.npmrc delete mode 100644 packages/preferences/.npmrc delete mode 100644 packages/prettier-config/.npmrc delete mode 100644 packages/primitives/.npmrc delete mode 100644 packages/priority-queue/.npmrc rename packages/private-apis/src/{implementation.js => implementation.ts} (82%) rename packages/private-apis/src/{index.js => index.ts} (100%) delete mode 100644 packages/project-management-automation/.npmrc delete mode 100644 packages/react-native-aztec/.npmrc delete mode 100644 packages/react-native-bridge/.npmrc delete mode 100644 packages/react-native-editor/.npmrc delete mode 100644 packages/readable-js-assets-webpack-plugin/.npmrc delete mode 100644 packages/redux-routine/.npmrc delete mode 100644 packages/report-flaky-tests/.npmrc delete mode 100644 packages/reusable-blocks/.npmrc delete mode 100644 packages/rich-text/.npmrc create mode 100644 packages/rich-text/src/component/event-listeners/prevent-focus-capture.js delete mode 100644 packages/rich-text/src/remove-unregistered-formatting.js delete mode 100644 packages/router/.npmrc delete mode 100644 packages/router/src/history.js create mode 100644 packages/router/src/history.ts rename packages/router/src/{index.js => index.ts} (100%) rename packages/router/src/{lock-unlock.js => lock-unlock.ts} (100%) rename packages/router/src/{private-apis.js => private-apis.ts} (100%) rename packages/router/src/{router.js => router.tsx} (71%) create mode 100644 packages/router/tsconfig.json delete mode 100644 packages/scripts/.npmrc create mode 100644 packages/scripts/scripts/build-blocks-manifest.js create mode 100644 packages/scripts/scripts/test/__snapshots__/build-blocks-manifest.js.snap create mode 100644 packages/scripts/scripts/test/build-blocks-manifest.js rename packages/{commands/.npmrc => scripts/scripts/test/fixtures/build-blocks-manifest/empty-input/.keep} (100%) create mode 100644 packages/scripts/scripts/test/fixtures/build-blocks-manifest/input/custom-header/block.json create mode 100644 packages/scripts/scripts/test/fixtures/build-blocks-manifest/input/image-gallery/block.json create mode 100644 packages/scripts/scripts/test/fixtures/build-blocks-manifest/input/simple-button/block.json create mode 100644 packages/scripts/utils/license.js rename packages/scripts/{scripts/test/check-licenses.js => utils/test/license.js} (96%) rename packages/scripts/{scripts => utils}/test/licenses/apache2-mit.txt (100%) rename packages/scripts/{scripts => utils}/test/licenses/apache2.txt (100%) rename packages/scripts/{scripts => utils}/test/licenses/bsd3clause.txt (100%) rename packages/scripts/{scripts => utils}/test/licenses/mit.txt (100%) rename packages/scripts/{scripts => utils}/test/licenses/w3cbsd.txt (100%) delete mode 100644 packages/server-side-render/.npmrc delete mode 100644 packages/shortcode/.npmrc delete mode 100644 packages/style-engine/.npmrc delete mode 100644 packages/stylelint-config/.npmrc delete mode 100644 packages/sync/.npmrc delete mode 100644 packages/token-list/.npmrc delete mode 100644 packages/undo-manager/.npmrc delete mode 100644 packages/url/.npmrc delete mode 100644 packages/viewport/.npmrc rename packages/{a11y => vips}/.npmrc (100%) create mode 100644 packages/vips/CHANGELOG.md create mode 100644 packages/vips/README.md create mode 100644 packages/vips/package.json create mode 100644 packages/vips/src/index.ts create mode 100644 packages/vips/src/test/resize-image.ts create mode 100644 packages/vips/src/types.ts create mode 100644 packages/vips/src/utils.ts create mode 100644 packages/vips/tsconfig.json delete mode 100644 packages/warning/.npmrc delete mode 100644 packages/widgets/.npmrc delete mode 100644 packages/wordcount/.npmrc create mode 100644 patches/wasm-vips+0.0.10.patch delete mode 100644 phpunit/blocks/block-navigation-block-hooks-test.php delete mode 100644 phpunit/blocks/get-block-templates-test.php create mode 100644 phpunit/blocks/render-block-image-test.php create mode 100644 phpunit/class-test-plugin-version-meta-test.php create mode 100644 react-scanner.config.js create mode 100644 storybook/static/wp-logo@2x.png create mode 100644 storybook/stories/foundations/design-language/elevation.mdx create mode 100644 storybook/stories/foundations/design-language/radius.mdx create mode 100644 storybook/stories/foundations/design-language/static/elevation-examples.svg create mode 100644 storybook/stories/foundations/design-language/static/elevation.svg create mode 100644 storybook/stories/foundations/design-language/static/radius-do.svg create mode 100644 storybook/stories/foundations/design-language/static/radius-dont.svg create mode 100644 storybook/stories/foundations/design-language/static/radius.svg create mode 100644 storybook/stories/foundations/design-language/static/wp-logo@2x.png create mode 100644 storybook/stories/playground/zoom-out/index.js create mode 100644 storybook/stories/playground/zoom-out/pattern.js create mode 100644 storybook/stories/tokens/color.mdx create mode 100644 storybook/stories/tokens/components.tsx create mode 100644 storybook/stories/tokens/elevation.mdx create mode 100644 storybook/stories/tokens/radius.mdx create mode 100644 storybook/stories/tokens/typography.mdx create mode 100644 test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-link-to-formatted-text-1-chromium.txt delete mode 100644 test/e2e/specs/editor/various/block-bindings.spec.js create mode 100644 test/e2e/specs/editor/various/block-bindings/custom-sources.spec.js create mode 100644 test/e2e/specs/editor/various/block-bindings/post-meta.spec.js delete mode 100644 test/e2e/specs/editor/various/block-moving-mode.spec.js create mode 100644 test/e2e/specs/editor/various/block-visibility.spec.js create mode 100644 test/e2e/specs/editor/various/write-design-mode.spec.js create mode 100644 test/e2e/specs/interactivity/get-sever-context.spec.ts create mode 100644 test/e2e/specs/interactivity/get-sever-state.spec.ts create mode 100644 test/e2e/specs/site-editor/template-hierarchy.spec.js create mode 100644 test/gutenberg-test-themes/block-bindings/index.php create mode 100644 test/gutenberg-test-themes/block-bindings/style.css create mode 100644 test/gutenberg-test-themes/block-bindings/templates/custom-template.html create mode 100644 test/gutenberg-test-themes/block-bindings/templates/index.html create mode 100644 test/gutenberg-test-themes/block-bindings/templates/single-movie.html create mode 100644 test/gutenberg-test-themes/block-bindings/templates/single.html create mode 100644 test/gutenberg-test-themes/block-bindings/theme.json create mode 100644 test/integration/fixtures/blocks/core__cover__deprecated-14.html create mode 100644 test/integration/fixtures/blocks/core__cover__deprecated-14.json create mode 100644 test/integration/fixtures/blocks/core__cover__deprecated-14.parsed.json create mode 100644 test/integration/fixtures/blocks/core__cover__deprecated-14.serialized.html create mode 100644 test/unit/config/wasm-stub.js create mode 100644 test/unit/mocks/match-media.js diff --git a/.eslintrc.js b/.eslintrc.js index b5349d2de0a1ff..d0c22090b93e87 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -156,6 +156,7 @@ module.exports = { 'plugin:eslint-comments/recommended', 'plugin:storybook/recommended', ], + plugins: [ 'react-compiler' ], globals: { wp: 'off', globalThis: 'readonly', @@ -222,6 +223,15 @@ module.exports = { definedTags: [ 'jest-environment' ], }, ], + 'react-compiler/react-compiler': [ + 'error', + { + environment: { + enableTreatRefLikeIdentifiersAsRefs: true, + validateRefAccessDuringRender: false, + }, + }, + ], }, overrides: [ { @@ -236,6 +246,7 @@ module.exports = { 'import/no-unresolved': 'off', 'import/named': 'off', '@wordpress/data-no-store-string-literals': 'off', + 'react-compiler/react-compiler': 'off', }, }, { @@ -321,6 +332,8 @@ module.exports = { ...[ 'BorderBoxControl', 'BorderControl', + 'BoxControl', + 'Button', 'ComboboxControl', 'CustomSelectControl', 'DimensionControl', @@ -342,7 +355,7 @@ module.exports = { selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"][value.expression.value!=false])):not(:has(JSXAttribute[name.name="size"][value.value!="default"]))`, message: componentName + - ' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', + ' should have the `__next40pxDefaultSize` prop when using the default size.', } ) ), { // Falsy `__next40pxDefaultSize` without a `render` prop. @@ -351,29 +364,9 @@ module.exports = { message: 'FormFileUpload should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', }, - // Temporary rules until all existing components have the `__next40pxDefaultSize` prop. - ...[ 'Button' ].map( ( componentName ) => ( { - // Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated. - selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`, - message: - componentName + - ' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', - } ) ), ], }, }, - { - files: [ - // Components package. - 'packages/components/src/**/*.[tj]s?(x)', - // Navigation block. - 'packages/block-library/src/navigation/**/*.[tj]s?(x)', - ], - excludedFiles: [ ...developmentFiles ], - rules: { - 'react-hooks/exhaustive-deps': 'error', - }, - }, { files: [ 'packages/jest*/**/*.js', '**/test/**/*.js' ], excludedFiles: [ 'test/e2e/**/*.js', 'test/performance/**/*.js' ], @@ -569,6 +562,7 @@ module.exports = { { files: [ 'packages/interactivity*/src/**' ], rules: { + 'react-compiler/react-compiler': 'off', 'react/react-in-jsx-scope': 'error', }, }, diff --git a/.github/ISSUE_TEMPLATE/Bug_report.yml b/.github/ISSUE_TEMPLATE/Bug_report.yml index 5d7c876ccefca7..41bb6f1c9ba108 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.yml +++ b/.github/ISSUE_TEMPLATE/Bug_report.yml @@ -65,3 +65,13 @@ body: options: - label: 'Yes' required: true + + - type: checkboxes + id: themes + attributes: + label: Please confirm which theme type you used for testing. + options: + - label: 'Block' + - label: 'Classic' + - label: 'Hybrid (e.g. classic with theme.json)' + - label: 'Not sure' diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index 603d6123df1ea2..7ed57c5c5865ac 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -3,7 +3,10 @@ name: Build Gutenberg Plugin Zip on: pull_request: push: - branches: [trunk] + branches: + - trunk + - 'release/**' + - 'wp/**' workflow_dispatch: inputs: version: @@ -69,7 +72,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: token: ${{ secrets.GUTENBERG_TOKEN }} show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -165,13 +168,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ needs.bump-version.outputs.release_branch || github.ref }} show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Node.js - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version-file: '.nvmrc' check-latest: true @@ -222,7 +225,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 2 ref: ${{ needs.bump-version.outputs.release_branch }} @@ -311,14 +314,14 @@ jobs: if: ${{ endsWith( needs.bump-version.outputs.new_version, '-rc.1' ) }} steps: - name: Checkout (for CLI) - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: main ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Checkout (for publishing) - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: publish # Later, we switch this branch in the script that publishes packages. @@ -333,7 +336,7 @@ jobs: git config user.email gutenberg@wordpress.org - name: Setup Node.js - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version-file: 'main/.nvmrc' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index 499a2c020255cb..3d95e7aa92bc16 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -37,19 +37,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 1 show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Node.js - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version-file: '.nvmrc' check-latest: true cache: npm - - uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c # v2.6.0 + - uses: preactjs/compressed-size-action@6fa0e7ca017120c754863b31123c5ee2860fd434 # v2.7.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pattern: '{build/**/*.min.js,build/**/*.css,build-module/**/*.min.js}' diff --git a/.github/workflows/check-backport-changelog.yml b/.github/workflows/check-backport-changelog.yml index 366bad9fdbc247..48fb56b425be39 100644 --- a/.github/workflows/check-backport-changelog.yml +++ b/.github/workflows/check-backport-changelog.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Core Sync Required') && !contains(github.event.pull_request.labels.*.name, 'Backport from WordPress Core') }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/check-components-changelog.yml b/.github/workflows/check-components-changelog.yml index 1f6863b4a486e1..373a782d5d6ddf 100644 --- a/.github/workflows/check-components-changelog.yml +++ b/.github/workflows/check-components-changelog.yml @@ -22,7 +22,7 @@ jobs: - name: 'Get PR commit count' run: echo "PR_COMMIT_COUNT=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" - name: Checkout code - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/cherry-pick-wp-release.yml b/.github/workflows/cherry-pick-wp-release.yml index b43b0cc267314d..14bee71c90c909 100644 --- a/.github/workflows/cherry-pick-wp-release.yml +++ b/.github/workflows/cherry-pick-wp-release.yml @@ -70,7 +70,7 @@ jobs: - name: Checkout repository if: env.cherry_pick == 'true' - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: token: ${{ secrets.GUTENBERG_TOKEN }} fetch-depth: 0 diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 0de1b9ee6566ae..1cb40466abe1ef 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -24,7 +24,7 @@ jobs: os: ['macos-latest', 'ubuntu-latest', 'windows-latest'] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/end2end-test.yml b/.github/workflows/end2end-test.yml index 99166989cd68ca..ea85a8949573f3 100644 --- a/.github/workflows/end2end-test.yml +++ b/.github/workflows/end2end-test.yml @@ -27,7 +27,7 @@ jobs: totalParts: [8] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -102,7 +102,7 @@ jobs: steps: # Checkout defaults to using the branch which triggered the event, which # isn't necessarily `trunk` (e.g. in the case of a merge). - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/enforce-pr-labels.yml b/.github/workflows/enforce-pr-labels.yml index 093eb9a325e365..7493459a6ff35c 100644 --- a/.github/workflows/enforce-pr-labels.yml +++ b/.github/workflows/enforce-pr-labels.yml @@ -12,7 +12,7 @@ jobs: with: mode: exactly count: 1 - labels: '[Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core' + labels: '[Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin' add_comment: true message: "**Warning: Type of PR label mismatch**\n\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}.\n\nRead more about [Type labels in Gutenberg](https://github.com/WordPress/gutenberg/labels?q=type). Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task." exit_type: failure diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 8cc11b9bd913bb..2bb5676ae9ed66 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -6,7 +6,9 @@ jobs: name: 'Validation' runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - uses: gradle/wrapper-validation-action@v3 + - name: Validate checksums + uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 98615b93b8a176..4a5b576b424b53 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -33,7 +33,7 @@ jobs: WP_ARTIFACTS_PATH: ${{ github.workspace }}/artifacts steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -47,9 +47,9 @@ jobs: [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" nvm -v - - name: Compare performance with trunk + - name: Compare performance with base branch if: github.event_name == 'pull_request' - run: ./bin/plugin/cli.js perf $GITHUB_SHA trunk --tests-branch $GITHUB_SHA + run: ./bin/plugin/cli.js perf $GITHUB_SHA ${{ github.base_ref }} --tests-branch $GITHUB_SHA - name: Compare performance with current WordPress Core and previous Gutenberg versions if: github.event_name == 'release' @@ -69,13 +69,13 @@ jobs: - name: Compare performance with base branch if: github.event_name == 'push' # The base hash used here need to be a commit that is compatible with the current WP version - # The current one is 5f4c9c853b15092ed885d5280edefb973c37d9e9 and it needs to be updated every WP major release. + # The current one is c7722262e65a3f4d0f1a2d1ad29eccb2069509e4 and it needs to be updated every WP major release. # It is used as a base comparison point to avoid fluctuation in the performance metrics. run: | WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt) IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION" WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}" - ./bin/plugin/cli.js perf $GITHUB_SHA 5f4c9c853b15092ed885d5280edefb973c37d9e9 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR" + ./bin/plugin/cli.js perf $GITHUB_SHA c7722262e65a3f4d0f1a2d1ad29eccb2069509e4 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR" - name: Compare performance with custom branches if: github.event_name == 'workflow_dispatch' @@ -101,7 +101,7 @@ jobs: CODEHEALTH_PROJECT_TOKEN: ${{ secrets.CODEHEALTH_PROJECT_TOKEN }} run: | COMMITTED_AT=$(git show -s $GITHUB_SHA --format="%cI") - ./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA 5f4c9c853b15092ed885d5280edefb973c37d9e9 $COMMITTED_AT + ./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA c7722262e65a3f4d0f1a2d1ad29eccb2069509e4 $COMMITTED_AT - name: Archive debug artifacts (screenshots, HTML snapshots) uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 diff --git a/.github/workflows/publish-npm-packages.yml b/.github/workflows/publish-npm-packages.yml index a24e5012474025..11cff85f4717a7 100644 --- a/.github/workflows/publish-npm-packages.yml +++ b/.github/workflows/publish-npm-packages.yml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout (for CLI) if: ${{ github.event.inputs.release_type != 'wp' }} - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: cli ref: trunk @@ -39,7 +39,7 @@ jobs: - name: Checkout (for publishing) if: ${{ github.event.inputs.release_type != 'wp' }} - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: publish # Later, we switch this branch in the script that publishes packages. @@ -49,7 +49,7 @@ jobs: - name: Checkout (for publishing WP major version) if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }} - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: publish ref: wp/${{ github.event.inputs.wp_version }} @@ -67,7 +67,7 @@ jobs: - name: Setup Node.js if: ${{ github.event.inputs.release_type != 'wp' }} - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version-file: 'cli/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -75,7 +75,7 @@ jobs: - name: Setup Node.js (for WP major version) if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }} - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version-file: 'publish/.nvmrc' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index 996bb1667ada57..e1a3defc641aa3 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -12,29 +12,13 @@ jobs: steps: # Checkout defaults to using the branch which triggered the event, which # isn't necessarily `trunk` (e.g. in the case of a merge). - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - name: Use desired version of Node.js - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 - with: - node-version-file: '.nvmrc' - check-latest: true - - - name: Cache NPM packages - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.node }}-npm-pr-automation-cache-${{ hashFiles('**/package-lock.json') }} - - # Changing into the action's directory and running `npm install` is much - # faster than a full project-wide `npm ci`. - - name: Install NPM dependencies - run: npm install - working-directory: packages/project-management-automation + - name: Setup Node.js and install dependencies + uses: ./.github/setup-node - uses: ./packages/project-management-automation with: diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index 3efd7d79ee2276..f8ff0441a95b7b 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -23,12 +23,12 @@ jobs: steps: - name: checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Java - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2 + uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 with: distribution: 'corretto' java-version: '17' @@ -37,7 +37,7 @@ jobs: uses: ./.github/setup-node - name: Restore tests setup cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ~/.appium @@ -47,31 +47,33 @@ jobs: run: npm run native test:e2e:setup - name: Gradle cache - uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 - - name: AVD cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: avd-${{ matrix.api-level }} - - - name: Create AVD and generate snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # v2.32.0 - with: - api-level: ${{ matrix.api-level }} - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: false - arch: x86_64 - profile: Nexus 6 - script: echo "Generated AVD snapshot for caching." + # AVD cache disabled as it caused emulator termination to hang indefinitely. + # https://github.com/ReactiveCircus/android-emulator-runner/issues/385 + # - name: AVD cache + # uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + # id: avd-cache + # with: + # path: | + # ~/.android/avd/* + # ~/.android/adb* + # key: avd-${{ matrix.api-level }} + # + # - name: Create AVD and generate snapshot for caching + # if: steps.avd-cache.outputs.cache-hit != 'true' + # uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # v2.33.0 + # with: + # api-level: ${{ matrix.api-level }} + # force-avd-creation: false + # emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + # disable-animations: false + # arch: x86_64 + # profile: Nexus 6 + # script: echo "Generated AVD snapshot for caching." - name: Run tests - uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # v2.32.0 + uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # v2.33.0 with: api-level: ${{ matrix.api-level }} force-avd-creation: false diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 2926e494b09f89..d28ee65c719e43 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -23,11 +23,11 @@ jobs: native-test-name: [gutenberg-editor-rendering] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0 + - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 with: # `.ruby-version` file location working-directory: packages/react-native-editor/ios @@ -42,7 +42,7 @@ jobs: uses: ./.github/setup-node - name: Restore tests setup cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | ~/.appium @@ -55,7 +55,7 @@ jobs: run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt - name: Restore build cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app @@ -63,7 +63,7 @@ jobs: key: ${{ runner.os }}-ios-build-${{ matrix.xcode }}-${{ matrix.device }}-${{ hashFiles('ios-checksums.txt') }} - name: Restore pods cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: | packages/react-native-editor/ios/Pods diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 1efd248bf7f306..baf97e8d390e91 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -22,12 +22,12 @@ jobs: if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Use desired version of Node.js - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: node-version-file: '.nvmrc' check-latest: true diff --git a/.github/workflows/storybook-pages.yml b/.github/workflows/storybook-pages.yml index 65dd46b3a76108..4af4934cf0325b 100644 --- a/.github/workflows/storybook-pages.yml +++ b/.github/workflows/storybook-pages.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/sync-backport-changelog.yml b/.github/workflows/sync-backport-changelog.yml index bbc5663cf715be..e530ca667de3d7 100644 --- a/.github/workflows/sync-backport-changelog.yml +++ b/.github/workflows/sync-backport-changelog.yml @@ -20,7 +20,7 @@ jobs: ) steps: - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 2 # Fetch the last two commits to compare changes - name: Check for changes in backport-changelog diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index c0f70070908c1c..46aa109c23e658 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -70,7 +70,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -121,7 +121,7 @@ jobs: name: Build JavaScript assets for PHP unit tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -135,7 +135,9 @@ jobs: uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: name: build-assets - path: ./build/ + path: | + ./build/ + ./build-module/ test-php: name: PHP ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.wordpress != '' && format( ' (WP {0}) ', matrix.wordpress ) || '' }} on ubuntu-latest @@ -153,6 +155,7 @@ jobs: - '8.0' - '8.1' - '8.2' + - '8.3' multisite: [false, true] wordpress: [''] # Latest WordPress version. include: @@ -161,7 +164,7 @@ jobs: wordpress: 'previous major version' - php: '7.4' wordpress: 'previous major version' - - php: '8.2' + - php: '8.3' wordpress: 'previous major version' env: @@ -170,7 +173,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -195,12 +198,6 @@ jobs: - name: Override PHP version in composer.json run: composer config platform.php ${{ matrix.php }} - # The spatie/phpunit-watcher package is not compatible with PHP < 7.2. - # It must be removed before running the tests. - - name: Remove incompatible Composer packages - if: ${{ matrix.php < '7.2' }} - run: composer remove spatie/phpunit-watcher --dev --no-update - # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies @@ -212,7 +209,6 @@ jobs: uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: build-assets - path: ./build - name: Docker debug information run: | @@ -282,7 +278,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} @@ -300,7 +296,7 @@ jobs: run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT - name: Cache PHPCS scan cache - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: .cache/phpcs.json key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }} @@ -352,7 +348,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} diff --git a/.github/workflows/upload-release-to-plugin-repo.yml b/.github/workflows/upload-release-to-plugin-repo.yml index 81a9c4739ac19b..e866964e69b2d1 100644 --- a/.github/workflows/upload-release-to-plugin-repo.yml +++ b/.github/workflows/upload-release-to-plugin-repo.yml @@ -96,7 +96,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ matrix.branch }} token: ${{ secrets.GUTENBERG_TOKEN }} diff --git a/.gitignore b/.gitignore index f699ecfcd4b9ba..4cd1d9706b7370 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ coverage # Directories/files that may appear in your environment *.log yarn.lock +results /artifacts /test/e2e/artifacts /perf-envs diff --git a/.npmrc b/.npmrc index 7a346f877b9319..84662ee5b78b78 100644 --- a/.npmrc +++ b/.npmrc @@ -2,3 +2,4 @@ save-exact = true engine-strict = true legacy-peer-deps = true prefer-dedupe = true +lockfile-version = 3 diff --git a/README.md b/README.md index 9c920337ef5941..87db481b5b6b4f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ [![React Native E2E Tests (iOS)]()](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28iOS%29%22+branch%3Atrunk) [![React Native E2E Tests (Android)]()](https://github.com/WordPress/gutenberg/actions?query=workflow%3A%22React+Native+E2E+Tests+%28Android%29%22+branch%3Atrunk) +Storybook Badge + [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org) ![Screenshot of the Gutenberg Editor, editing a post in WordPress](https://user-images.githubusercontent.com/1204802/100067796-fc3e8700-2e36-11eb-993b-6b80b4310b87.png) diff --git a/backport-changelog/6.7/7139.md b/backport-changelog/6.7/7139.md index 9023695102a919..b5b0090fbaa563 100644 --- a/backport-changelog/6.7/7139.md +++ b/backport-changelog/6.7/7139.md @@ -1,3 +1,4 @@ https://github.com/WordPress/wordpress-develop/pull/7139 * https://github.com/WordPress/gutenberg/pull/64504 +* https://github.com/WordPress/gutenberg/pull/65280 diff --git a/backport-changelog/6.7/7298.md b/backport-changelog/6.7/7298.md new file mode 100644 index 00000000000000..4c01ef5d4f46e6 --- /dev/null +++ b/backport-changelog/6.7/7298.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7298 + +* https://github.com/WordPress/gutenberg/pull/65099 \ No newline at end of file diff --git a/backport-changelog/6.7/7314.md b/backport-changelog/6.7/7314.md new file mode 100644 index 00000000000000..7d75cdff0f9075 --- /dev/null +++ b/backport-changelog/6.7/7314.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7314 + +* https://github.com/WordPress/gutenberg/pull/64167 diff --git a/backport-changelog/6.7/7336.md b/backport-changelog/6.7/7336.md new file mode 100644 index 00000000000000..7cb2e26d7eeb95 --- /dev/null +++ b/backport-changelog/6.7/7336.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7336 + +* https://github.com/WordPress/gutenberg/pull/65071 diff --git a/backport-changelog/6.7/7360.md b/backport-changelog/6.7/7360.md new file mode 100644 index 00000000000000..b2fb8efd624b93 --- /dev/null +++ b/backport-changelog/6.7/7360.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7360 + +* https://github.com/WordPress/gutenberg/pull/65460 diff --git a/backport-changelog/6.7/7543.md b/backport-changelog/6.7/7543.md new file mode 100644 index 00000000000000..7dcb74354ac813 --- /dev/null +++ b/backport-changelog/6.7/7543.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7543 + +* https://github.com/WordPress/gutenberg/pull/65958 diff --git a/backport-changelog/6.7/7552.md b/backport-changelog/6.7/7552.md new file mode 100644 index 00000000000000..d304162b3cae67 --- /dev/null +++ b/backport-changelog/6.7/7552.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7552 + +* https://github.com/WordPress/gutenberg/pull/66058 diff --git a/backport-changelog/6.7/7561.md b/backport-changelog/6.7/7561.md new file mode 100644 index 00000000000000..43fcffa41c02a5 --- /dev/null +++ b/backport-changelog/6.7/7561.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7561 + +* https://github.com/WordPress/gutenberg/pull/66084 diff --git a/backport-changelog/6.7/7661.md b/backport-changelog/6.7/7661.md new file mode 100644 index 00000000000000..711d03595162ca --- /dev/null +++ b/backport-changelog/6.7/7661.md @@ -0,0 +1,4 @@ +https://github.com/WordPress/wordpress-develop/pull/7661 + +* https://github.com/WordPress/gutenberg/pull/66468 +* https://github.com/WordPress/gutenberg/pull/66543 diff --git a/backport-changelog/6.7/7676.md b/backport-changelog/6.7/7676.md new file mode 100644 index 00000000000000..19d9dc59048457 --- /dev/null +++ b/backport-changelog/6.7/7676.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7676 + +* https://github.com/WordPress/gutenberg/pull/66359 diff --git a/backport-changelog/6.8/7069.md b/backport-changelog/6.8/7069.md new file mode 100644 index 00000000000000..69edbde58902d1 --- /dev/null +++ b/backport-changelog/6.8/7069.md @@ -0,0 +1,5 @@ +https://github.com/WordPress/wordpress-develop/pull/7069 + +* https://github.com/WordPress/gutenberg/pull/63401 +* https://github.com/WordPress/gutenberg/pull/66918 +* https://github.com/WordPress/gutenberg/pull/67018 diff --git a/backport-changelog/6.8/7129.md b/backport-changelog/6.8/7129.md new file mode 100644 index 00000000000000..90c9168cdc6f8a --- /dev/null +++ b/backport-changelog/6.8/7129.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7129 + +* https://github.com/WordPress/gutenberg/pull/62304 diff --git a/backport-changelog/6.8/7265.md b/backport-changelog/6.8/7265.md new file mode 100644 index 00000000000000..44ba36053aa0d9 --- /dev/null +++ b/backport-changelog/6.8/7265.md @@ -0,0 +1,4 @@ +https://github.com/WordPress/wordpress-develop/pull/7265 + +* https://github.com/WordPress/gutenberg/pull/66850 +* https://github.com/WordPress/gutenberg/pull/66947 diff --git a/backport-changelog/6.8/7488.md b/backport-changelog/6.8/7488.md new file mode 100644 index 00000000000000..a588bef0e01796 --- /dev/null +++ b/backport-changelog/6.8/7488.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7488 + +* https://github.com/WordPress/gutenberg/pull/60622 \ No newline at end of file diff --git a/backport-changelog/6.8/7498.md b/backport-changelog/6.8/7498.md new file mode 100644 index 00000000000000..6c903246166b64 --- /dev/null +++ b/backport-changelog/6.8/7498.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7498 + +* https://github.com/WordPress/gutenberg/pull/60622 \ No newline at end of file diff --git a/backport-changelog/6.8/7575.md b/backport-changelog/6.8/7575.md new file mode 100644 index 00000000000000..f1c6a84da1368e --- /dev/null +++ b/backport-changelog/6.8/7575.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7575 + +* https://github.com/WordPress/gutenberg/pull/66154 diff --git a/backport-changelog/6.8/7604.md b/backport-changelog/6.8/7604.md new file mode 100644 index 00000000000000..0ab47698103409 --- /dev/null +++ b/backport-changelog/6.8/7604.md @@ -0,0 +1,5 @@ +https://github.com/WordPress/wordpress-develop/pull/7604 + +* https://github.com/WordPress/gutenberg/pull/66285 +* https://github.com/WordPress/gutenberg/pull/66302 +* https://github.com/WordPress/gutenberg/pull/66306 diff --git a/backport-changelog/6.8/7643.md b/backport-changelog/6.8/7643.md new file mode 100644 index 00000000000000..f83aa411f9fff3 --- /dev/null +++ b/backport-changelog/6.8/7643.md @@ -0,0 +1,4 @@ +https://github.com/WordPress/wordpress-develop/pull/7643 + +* https://github.com/WordPress/gutenberg/pull/66432 +* https://github.com/WordPress/gutenberg/pull/66556 diff --git a/backport-changelog/6.8/7681.md b/backport-changelog/6.8/7681.md new file mode 100644 index 00000000000000..b8cffc70c68561 --- /dev/null +++ b/backport-changelog/6.8/7681.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7681 + +* https://github.com/WordPress/gutenberg/pull/66541 diff --git a/backport-changelog/6.8/7687.md b/backport-changelog/6.8/7687.md new file mode 100644 index 00000000000000..f1505645df20c6 --- /dev/null +++ b/backport-changelog/6.8/7687.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7687 + +* https://github.com/WordPress/gutenberg/pull/66488 diff --git a/backport-changelog/6.8/7695.md b/backport-changelog/6.8/7695.md new file mode 100644 index 00000000000000..095c058e6fd10b --- /dev/null +++ b/backport-changelog/6.8/7695.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7695 + +* https://github.com/WordPress/gutenberg/pull/66631 diff --git a/backport-changelog/6.8/7697.md b/backport-changelog/6.8/7697.md new file mode 100644 index 00000000000000..e53fbf4bdb8ae5 --- /dev/null +++ b/backport-changelog/6.8/7697.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7697 + +* https://github.com/WordPress/gutenberg/pull/66656 diff --git a/backport-changelog/6.8/7698.md b/backport-changelog/6.8/7698.md new file mode 100644 index 00000000000000..3ded160e7ec449 --- /dev/null +++ b/backport-changelog/6.8/7698.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7698 + +* https://github.com/WordPress/gutenberg/pull/66662 diff --git a/backport-changelog/6.8/7759.md b/backport-changelog/6.8/7759.md new file mode 100644 index 00000000000000..a0ad85b06e6b05 --- /dev/null +++ b/backport-changelog/6.8/7759.md @@ -0,0 +1,4 @@ +https://github.com/WordPress/wordpress-develop/pull/7759 + +* https://github.com/WordPress/gutenberg/pull/66896 + diff --git a/backport-changelog/6.8/7784.md b/backport-changelog/6.8/7784.md new file mode 100644 index 00000000000000..b18dca88112a71 --- /dev/null +++ b/backport-changelog/6.8/7784.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7784 + +* https://github.com/WordPress/gutenberg/pull/66948 diff --git a/backport-changelog/6.8/7825.md b/backport-changelog/6.8/7825.md new file mode 100644 index 00000000000000..42d09c86b7f3ba --- /dev/null +++ b/backport-changelog/6.8/7825.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7825 + +* https://github.com/WordPress/gutenberg/pull/67061 diff --git a/backport-changelog/6.8/7848.md b/backport-changelog/6.8/7848.md new file mode 100644 index 00000000000000..84600eb4847cdb --- /dev/null +++ b/backport-changelog/6.8/7848.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/7848 + +* https://github.com/WordPress/gutenberg/pull/67154 diff --git a/bin/api-docs/gen-components-docs/get-subcomponent-descriptions.mjs b/bin/api-docs/gen-components-docs/get-subcomponent-descriptions.mjs new file mode 100644 index 00000000000000..4bb82652f1737a --- /dev/null +++ b/bin/api-docs/gen-components-docs/get-subcomponent-descriptions.mjs @@ -0,0 +1,46 @@ +/** + * External dependencies + */ +import fs from 'node:fs/promises'; +import babel from '@babel/core'; +import { parse as commentParser } from 'comment-parser'; + +/** + * Try to get subcomponent descriptions from the main component Object.assign() call. + */ +export async function getDescriptionsForSubcomponents( + filePath, + mainComponentName +) { + const fileContent = await fs.readFile( filePath, 'utf8' ); + const parsedFile = babel.parse( fileContent, { + filename: filePath, + } ); + const mainComponent = parsedFile.program.body + .filter( ( node ) => node.type === 'ExportNamedDeclaration' ) + .flatMap( ( node ) => node.declaration?.declarations ) + .find( ( node ) => node?.id.name === mainComponentName ); + + if ( + ! ( + // If the main component export has `Object.assign( ... )` + ( + mainComponent?.init?.type === 'CallExpression' && + mainComponent?.init?.callee?.object?.name === 'Object' && + mainComponent?.init?.callee?.property?.name === 'assign' + ) + ) + ) { + return; + } + + const properties = mainComponent?.init?.arguments[ 1 ]?.properties.map( + ( node ) => [ + node.key.name, + commentParser( `/*${ node.leadingComments?.[ 0 ].value }*/`, { + spacing: 'preserve', + } )?.[ 0 ]?.description, + ] + ); + return Object.fromEntries( properties ); +} diff --git a/bin/api-docs/gen-components-docs/index.mjs b/bin/api-docs/gen-components-docs/index.mjs new file mode 100644 index 00000000000000..c7109dc4982c36 --- /dev/null +++ b/bin/api-docs/gen-components-docs/index.mjs @@ -0,0 +1,134 @@ +/** + * External dependencies + */ +import docgen from 'react-docgen-typescript'; +import glob from 'glob'; +import fs from 'node:fs/promises'; +import path from 'path'; + +/** + * Internal dependencies + */ +import { generateMarkdownDocs } from './markdown/index.mjs'; +import { getDescriptionsForSubcomponents } from './get-subcomponent-descriptions.mjs'; + +const MANIFEST_GLOB = 'packages/components/src/**/docs-manifest.json'; + +// For consistency, options should generally match the options used in Storybook. +const OPTIONS = { + shouldExtractLiteralValuesFromEnum: true, + shouldRemoveUndefinedFromOptional: true, + propFilter: ( prop ) => + prop.parent ? ! /node_modules/.test( prop.parent.fileName ) : true, + savePropValueAsString: true, +}; + +function getTypeDocsForComponent( { + manifestPath, + componentFilePath, + displayName, +} ) { + const resolvedPath = path.resolve( + path.dirname( manifestPath ), + componentFilePath + ); + + const typeDocs = docgen.parse( resolvedPath, OPTIONS ); + + if ( typeDocs.length === 0 ) { + throw new Error( + `react-docgen-typescript could not generate any type docs from ${ resolvedPath }` + ); + } + + const matchingTypeDoc = typeDocs.find( + ( obj ) => obj.displayName === displayName + ); + + if ( typeof matchingTypeDoc === 'undefined' ) { + const unmatchedTypeDocs = typeDocs + .map( ( obj ) => `\`${ obj.displayName }\`` ) + .join( ', ' ); + + throw new Error( + `react-docgen-typescript could not find type docs for ${ displayName } in ${ resolvedPath }. (Found ${ unmatchedTypeDocs })` + ); + } + + return matchingTypeDoc; +} + +async function parseManifest( manifestPath ) { + try { + return JSON.parse( await fs.readFile( manifestPath, 'utf8' ) ); + } catch ( e ) { + throw new Error( + `Error parsing docs manifest at ${ manifestPath }: ${ e.message }` + ); + } +} + +const manifests = glob.sync( MANIFEST_GLOB ); + +await Promise.all( + manifests.map( async ( manifestPath ) => { + const manifest = await parseManifest( manifestPath ); + + const typeDocs = getTypeDocsForComponent( { + manifestPath, + componentFilePath: manifest.filePath, + displayName: manifest.displayName, + } ); + + let subcomponentDescriptions; + + const subcomponentTypeDocs = await Promise.all( + manifest.subcomponents?.map( async ( subcomponent ) => { + const docs = getTypeDocsForComponent( { + manifestPath, + componentFilePath: subcomponent.filePath, + displayName: subcomponent.displayName, + } ); + + if ( subcomponent.preferredDisplayName ) { + docs.displayName = subcomponent.preferredDisplayName; + } + + if ( ! subcomponent.description ) { + subcomponentDescriptions ??= + getDescriptionsForSubcomponents( + path.resolve( + path.dirname( manifestPath ), + manifest.filePath + ), + manifest.displayName + ); + + docs.description = ( await subcomponentDescriptions )?.[ + subcomponent.displayName + ]; + } + + return docs; + } ) ?? [] + ); + + const docs = generateMarkdownDocs( { + typeDocs, + subcomponentTypeDocs, + } ); + const outputFile = path.resolve( + path.dirname( manifestPath ), + './README.md' + ); + + try { + console.log( `Writing docs to ${ outputFile }` ); + return fs.writeFile( outputFile, docs ); + } catch ( e ) { + throw new Error( + `Error writing docs to ${ outputFile }: ${ e.message }` + ); + } + } ) +); diff --git a/bin/api-docs/gen-components-docs/markdown/index.mjs b/bin/api-docs/gen-components-docs/markdown/index.mjs new file mode 100644 index 00000000000000..126fdf0057b6e5 --- /dev/null +++ b/bin/api-docs/gen-components-docs/markdown/index.mjs @@ -0,0 +1,40 @@ +/** + * External dependencies + */ +import json2md from 'json2md'; + +/** + * Internal dependencies + */ +import { generateMarkdownPropsJson } from './props.mjs'; + +export function generateMarkdownDocs( { typeDocs, subcomponentTypeDocs } ) { + const mainDocsJson = [ + { h1: typeDocs.displayName }, + '', + { + p: `

See the WordPress Storybook for more detailed, interactive documentation.

`, + }, + typeDocs.description, + ...generateMarkdownPropsJson( typeDocs.props ), + ]; + + const subcomponentDocsJson = subcomponentTypeDocs?.length + ? [ + { h2: 'Subcomponents' }, + ...subcomponentTypeDocs.flatMap( ( subcomponentTypeDoc ) => [ + { + h3: subcomponentTypeDoc.displayName, + }, + subcomponentTypeDoc.description, + ...generateMarkdownPropsJson( subcomponentTypeDoc.props, { + headingLevel: 4, + } ), + ] ), + ] + : []; + + return json2md( + [ ...mainDocsJson, ...subcomponentDocsJson ].filter( Boolean ) + ); +} diff --git a/bin/api-docs/gen-components-docs/markdown/props.mjs b/bin/api-docs/gen-components-docs/markdown/props.mjs new file mode 100644 index 00000000000000..9d019c4240f008 --- /dev/null +++ b/bin/api-docs/gen-components-docs/markdown/props.mjs @@ -0,0 +1,51 @@ +function renderPropType( type ) { + const MAX_ENUM_VALUES = 10; + + switch ( type.name ) { + case 'enum': { + const string = type.value + .slice( 0, MAX_ENUM_VALUES ) + .map( ( { value } ) => value ) + .join( ' | ' ); + + if ( type.value.length > MAX_ENUM_VALUES ) { + return `${ string } | ...`; + } + return string; + } + default: + return type.name; + } +} + +export function generateMarkdownPropsJson( props, { headingLevel = 2 } = {} ) { + const sortedKeys = Object.keys( props ).sort( ( [ a ], [ b ] ) => + a.localeCompare( b ) + ); + + const propsJson = sortedKeys + .flatMap( ( key ) => { + const prop = props[ key ]; + + if ( prop.description?.includes( '@ignore' ) ) { + return null; + } + + return [ + { [ `h${ headingLevel + 1 }` ]: `\`${ key }\`` }, + prop.description, + { + ul: [ + `Type: \`${ renderPropType( prop.type ) }\``, + `Required: ${ prop.required ? 'Yes' : 'No' }`, + prop.defaultValue && + `Default: \`${ prop.defaultValue.value }\``, + ].filter( Boolean ), + }, + ]; + } ) + .filter( Boolean ); + + return [ { [ `h${ headingLevel }` ]: 'Props' }, ...propsJson ]; +} + diff --git a/bin/api-docs/gen-theme-reference.mjs b/bin/api-docs/gen-theme-reference.mjs index 6dc7791e288b9e..f50d194c17ee79 100644 --- a/bin/api-docs/gen-theme-reference.mjs +++ b/bin/api-docs/gen-theme-reference.mjs @@ -9,6 +9,7 @@ */ import fs from 'node:fs/promises'; import $RefParser from '@apidevtools/json-schema-ref-parser'; +import { fileURLToPath } from 'node:url'; /** * @typedef {import('@apidevtools/json-schema-ref-parser').JSONSchema} JSONSchema @@ -19,9 +20,8 @@ import $RefParser from '@apidevtools/json-schema-ref-parser'; * * @type {URL} */ -const THEME_JSON_SCHEMA_URL = new URL( - '../../schemas/json/theme.json', - import.meta.url +const THEME_JSON_SCHEMA_PATH = fileURLToPath( + new URL( '../../schemas/json/theme.json', import.meta.url ) ); /** @@ -29,9 +29,11 @@ const THEME_JSON_SCHEMA_URL = new URL( * * @type {URL} */ -const REFERENCE_DOC_URL = new URL( - '../../docs/reference-guides/theme-json-reference/theme-json-living.md', - import.meta.url +const REFERENCE_DOC_PATH = fileURLToPath( + new URL( + '../../docs/reference-guides/theme-json-reference/theme-json-living.md', + import.meta.url + ) ); /** @@ -265,15 +267,12 @@ function generateDocs( themeJson ) { * Main function. */ async function main() { - const themeJson = await $RefParser.dereference( - THEME_JSON_SCHEMA_URL.pathname, - { - parse: { binary: false, text: false, yaml: false }, - resolve: { external: false }, - } - ); + const themeJson = await $RefParser.dereference( THEME_JSON_SCHEMA_PATH, { + parse: { binary: false, text: false, yaml: false }, + resolve: { external: false }, + } ); - const themeJsonReference = await fs.readFile( REFERENCE_DOC_URL, { + const themeJsonReference = await fs.readFile( REFERENCE_DOC_PATH, { encoding: 'utf8', flag: 'r', } ); @@ -285,7 +284,7 @@ async function main() { `${ START_TOKEN }\n${ generatedDocs }\n${ END_TOKEN }` ); - await fs.writeFile( REFERENCE_DOC_URL, updatedThemeJsonReference, { + await fs.writeFile( REFERENCE_DOC_PATH, updatedThemeJsonReference, { encoding: 'utf8', } ); } diff --git a/bin/check-licenses.mjs b/bin/check-licenses.mjs new file mode 100755 index 00000000000000..458590e696a9fd --- /dev/null +++ b/bin/check-licenses.mjs @@ -0,0 +1,69 @@ +#!/usr/bin/env node + +/** + * External dependencies + */ +import { spawnSync } from 'node:child_process'; + +/** + * Internal dependencies + */ +import { checkDepsInTree } from '../packages/scripts/utils/license.js'; + +const ignored = [ '@ampproject/remapping' ]; + +/* + * `wp-scripts check-licenses` uses prod and dev dependencies of the package to scan for dependencies. With npm workspaces, workspace packages (the @wordpress/* packages) are not listed in the main package json and this approach does not work. + * + * Instead, work from an npm query that uses some custom information in package.json files to declare packages that are shipped with WordPress (and must be GPLv2 compatible) or other files that may use more permissive licenses. + */ + +/** + * @typedef PackageInfo + * @property {string} name Package name. + */ + +/** @type {ReadonlyArray} */ +const workspacePackages = JSON.parse( + spawnSync( + 'npm', + [ + 'query', + '.workspace:attr([wpScript]), .workspace:attr([wpScriptModuleExports])', + ], + /* + * Set the max buffer to ~157MB, since the output size for + * prod is ~21 MB and dev is ~110 MB + */ + { maxBuffer: 1024 * 1024 * 150 } + ).stdout +); + +const packageNames = workspacePackages.map( ( { name } ) => name ); + +const dependenciesToProcess = JSON.parse( + spawnSync( + 'npm', + [ + 'ls', + '--json', + '--long', + '--all', + '--lockfile-only', + '--omit=dev', + ...packageNames.map( + ( packageName ) => `--workspace=${ packageName }` + ), + ], + /* + * Set the max buffer to ~157MB, since the output size for + * prod is ~21 MB and dev is ~110 MB + */ + { maxBuffer: 1024 * 1024 * 150 } + ).stdout +).dependencies; + +checkDepsInTree( dependenciesToProcess, { + ignored, + gpl2: true, +} ); diff --git a/bin/packages/get-babel-config.js b/bin/packages/get-babel-config.js index 91fe4b07d325e6..9427549cafaba6 100644 --- a/bin/packages/get-babel-config.js +++ b/bin/packages/get-babel-config.js @@ -11,6 +11,8 @@ module.exports = ( environment = '', file ) => { name: `WP_BUILD_${ environment.toUpperCase() }`, }, }; + // Add `/* wp:polyfill */` magic comment where needed. + callerOpts.caller.addPolyfillComments = true; switch ( environment ) { case 'main': // To be merged as a presetEnv option. diff --git a/changelog.txt b/changelog.txt index b0e6c8e907582e..1a6b45a37fc7cf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,2463 @@ == Changelog == += 19.7.0 = + +## Changelog + +### Enhancements + +- Add "show template" to preview dropdown. ([66514](https://github.com/WordPress/gutenberg/pull/66514)) +- Iframe: Always enable for block themes, in core too. ([66800](https://github.com/WordPress/gutenberg/pull/66800)) +- Media Utils: Add experimental `sideloadMedia`. ([66378](https://github.com/WordPress/gutenberg/pull/66378)) +- Post fields: Clean up. ([66941](https://github.com/WordPress/gutenberg/pull/66941)) +- Post fields: Extract `title` from `edit-site` to `fields` package. ([66940](https://github.com/WordPress/gutenberg/pull/66940)) +- Post fields: Move `comment_status` from edit-site to fields package. ([66934](https://github.com/WordPress/gutenberg/pull/66934)) +- Post fields: Move `date` fields from `edit-site` to `fields` package. ([66938](https://github.com/WordPress/gutenberg/pull/66938)) +- Post fields: Move `status` from `edit-site` to `fields`. ([66937](https://github.com/WordPress/gutenberg/pull/66937)) +- Relocate “View” external link to end of editor header controls. ([66785](https://github.com/WordPress/gutenberg/pull/66785)) + +#### Block Library +- Added toggle control to set any image as feature image if no feature image is set for post. ([65896](https://github.com/WordPress/gutenberg/pull/65896)) +- Improve cover z-index solution. ([66249](https://github.com/WordPress/gutenberg/pull/66249)) +- Post Content: Add border and spacing support. ([66366](https://github.com/WordPress/gutenberg/pull/66366)) +- Query Loop: Use templateSlug and postType for more context. ([65820](https://github.com/WordPress/gutenberg/pull/65820)) +- Update text case of "Starter Content". ([66954](https://github.com/WordPress/gutenberg/pull/66954)) +- [Details Block]: Adds anchor support in details block. ([66734](https://github.com/WordPress/gutenberg/pull/66734)) + +#### Components +- Guide: Use small size button for page controls. ([66607](https://github.com/WordPress/gutenberg/pull/66607)) +- MenuItem: Add 40px size prop on Button. ([66596](https://github.com/WordPress/gutenberg/pull/66596)) +- Notice: Add appropriate size props to Buttons. ([66593](https://github.com/WordPress/gutenberg/pull/66593)) +- PaletteEdit: Add appropriate size props to Buttons. ([66590](https://github.com/WordPress/gutenberg/pull/66590)) +- Popover: Add small size prop to close button. ([66587](https://github.com/WordPress/gutenberg/pull/66587)) + +#### Global Styles +- Global styles revisions: Move focus and active state to list item. ([66780](https://github.com/WordPress/gutenberg/pull/66780)) +- Site editor: Integrate global styles controls and style book preview into the styles panel. ([65619](https://github.com/WordPress/gutenberg/pull/65619)) + +#### DataViews +- DataViews Fields API: Default getValueFromId supports nested objects. ([66890](https://github.com/WordPress/gutenberg/pull/66890)) + +#### Block Editor +- Inserter: Add 'Starter Content' category to the inserter. ([66819](https://github.com/WordPress/gutenberg/pull/66819)) + +#### Zoom Out +- Enable zoom out mode for non-iframe editor. ([66789](https://github.com/WordPress/gutenberg/pull/66789)) + +#### Themes +- Theme JSON Resolver: Remove theme json merge in resolve_theme_file_uris. ([66662](https://github.com/WordPress/gutenberg/pull/66662)) + +#### Edit Mode +- Image block: Add support for "more" dropdown for additional tools in Write mode. ([66605](https://github.com/WordPress/gutenberg/pull/66605)) + +#### Style Book +- Add a landing section to stylebook tabs. ([66545](https://github.com/WordPress/gutenberg/pull/66545)) + +#### Media +- Media Library: Expose filters dropdown for individual images, such as with the Image block. ([65965](https://github.com/WordPress/gutenberg/pull/65965)) + + +### Bug Fixes + +- Block toolbar: Restrict visible child calculation to known blocks. ([66702](https://github.com/WordPress/gutenberg/pull/66702)) +- ComplementaryArea: Fix button position. ([66677](https://github.com/WordPress/gutenberg/pull/66677)) +- Fix Paragraph appender layout shift (building on 66061). ([66779](https://github.com/WordPress/gutenberg/pull/66779)) +- Fix: Set the `fit-content` width for images that are not `.svg`. ([66643](https://github.com/WordPress/gutenberg/pull/66643)) +- Preference modal: Avoid fetching all reusable blocks when the site editor loads. ([66621](https://github.com/WordPress/gutenberg/pull/66621)) +- Revert "Set image width to `fit-content` to solve aspect ratio problems in Firefox. (#66217)". ([66804](https://github.com/WordPress/gutenberg/pull/66804)) +- Safari: Fix site editor template error. ([66647](https://github.com/WordPress/gutenberg/pull/66647)) +- Safari: Prevent focus capturing caused by flex display. ([66402](https://github.com/WordPress/gutenberg/pull/66402)) +- Select Mode: Hide tool selector in the post editor and force design mode. ([66784](https://github.com/WordPress/gutenberg/pull/66784)) +- Shadow panel: Make the delete modal text translatable. ([66712](https://github.com/WordPress/gutenberg/pull/66712)) +- Site Editor: Fix template for page-on-front option. ([66739](https://github.com/WordPress/gutenberg/pull/66739)) +- WP Scripts: Make watch mode more resilient for developer errors. ([66752](https://github.com/WordPress/gutenberg/pull/66752)) +- getDefaultTemplateId: Ensure entity configuration is loaded. ([66650](https://github.com/WordPress/gutenberg/pull/66650)) +- Comments controller: fix issue where comments are allowed when closed (https://github.com/WordPress/gutenberg/pull/66976) + +#### Block Library +- Cover: Fix media library image selection. ([66782](https://github.com/WordPress/gutenberg/pull/66782)) +- Cover: Show DropZone only when dragging withing the block. ([66912](https://github.com/WordPress/gutenberg/pull/66912)) +- Media & Text: Set `.wp-block-media-text__media a` display to block. ([66915](https://github.com/WordPress/gutenberg/pull/66915)) +- Prevent duplicate post format taxonomy queries. ([66627](https://github.com/WordPress/gutenberg/pull/66627)) +- Query Loop: Check for postTypeFromContext before using it. ([66655](https://github.com/WordPress/gutenberg/pull/66655)) +- Query Loop: Remove postTypeFromContext. ([66681](https://github.com/WordPress/gutenberg/pull/66681)) + +#### Block Editor +- Appender: Fix initial position. ([66711](https://github.com/WordPress/gutenberg/pull/66711)) +- Appender: Fix outside canvas styles. ([66630](https://github.com/WordPress/gutenberg/pull/66630)) +- Block Inspector: Restore bottom margin for RadioControl. ([66688](https://github.com/WordPress/gutenberg/pull/66688)) +- Iframed editor: Fix relative wp-content URLs. ([66751](https://github.com/WordPress/gutenberg/pull/66751)) + +#### Global Styles +- Section Styles: Fix insecure properties removal for inner block types and elements. ([66896](https://github.com/WordPress/gutenberg/pull/66896)) +- Style book: Reduce margin selector specificity so that it doesn't override global block styles. ([66895](https://github.com/WordPress/gutenberg/pull/66895)) +- Theme JSON: Replace top-level background style objects on merge. ([66656](https://github.com/WordPress/gutenberg/pull/66656)) + +#### Components +- FormTokenField: Fix token styles. ([66640](https://github.com/WordPress/gutenberg/pull/66640)) +- Storybook: Fix DataViews action modals. ([66727](https://github.com/WordPress/gutenberg/pull/66727)) +- ToggleGroupControl: Fix active background for `zero` value. ([66855](https://github.com/WordPress/gutenberg/pull/66855)) + +#### Post Editor +- Disable device preview button in pattern/template part/navitation editor. ([65970](https://github.com/WordPress/gutenberg/pull/65970)) +- PostTaxonomiesFlatTermSelector: Abstract wrapper component. ([66625](https://github.com/WordPress/gutenberg/pull/66625)) +- VisualEditor: Always output has-global-padding classname when in post only mode. ([66626](https://github.com/WordPress/gutenberg/pull/66626)) + +#### DataViews +- Fix TypeError when duplicating uncategorized theme patterns. ([66889](https://github.com/WordPress/gutenberg/pull/66889)) +- Tweak primary field in patterns grid layout. ([66733](https://github.com/WordPress/gutenberg/pull/66733)) + +#### Meta Boxes +- Fix: Show Meta Boxes at the bottom of the screen regardless of the current rendering mode. ([66508](https://github.com/WordPress/gutenberg/pull/66508)) +- Hide metaboxes in Zoom Out. ([66886](https://github.com/WordPress/gutenberg/pull/66886)) + +#### Site Editor +- DataViews: Fix 'aria-label' for pattern preview element. ([66601](https://github.com/WordPress/gutenberg/pull/66601)) +- Site Hub: Fixed navigation redirect on mobile devices for classic themes. ([66867](https://github.com/WordPress/gutenberg/pull/66867)) + +#### Media +- Add `x-wav` mime type for wav files in Firefox. ([66850](https://github.com/WordPress/gutenberg/pull/66850)) +- Ensure HEIC files selectable from “Upload” button. ([66292](https://github.com/WordPress/gutenberg/pull/66292)) + +#### Patterns +- Fix uncategorized pattern browsing when pattern has no categories. ([66945](https://github.com/WordPress/gutenberg/pull/66945)) + +#### Interactivity API +- Fix property modification from inherited context two or more levels above. ([66872](https://github.com/WordPress/gutenberg/pull/66872)) + +#### Block API +- Process Block Type: Copy deprecation to a new object instead of mutating when stabilizing supports. ([66849](https://github.com/WordPress/gutenberg/pull/66849)) + +#### Design Tools +- Block Gap: Fix block spacing control for axial gap supported blocks. ([66783](https://github.com/WordPress/gutenberg/pull/66783)) + +#### Document Settings +- Editor: Restore the 'PluginPostStatusInfo' slot position. ([66665](https://github.com/WordPress/gutenberg/pull/66665)) + +#### Templates API +- Fix flash when clicking template name in the editor when a plugin registered template matches a default WP theme template. ([66359](https://github.com/WordPress/gutenberg/pull/66359)) + +#### Block bindings +- Fix unset array key warning in block-bindings.php. ([66337](https://github.com/WordPress/gutenberg/pull/66337)) + + +### Accessibility + +- Fix : Snackbar Notice Inconsistency. ([66405](https://github.com/WordPress/gutenberg/pull/66405)) +- Image: Add `aria-haspopup` prop write mode `more` tools menu items. ([66815](https://github.com/WordPress/gutenberg/pull/66815)) +- Site Icon Focus fix. ([66952](https://github.com/WordPress/gutenberg/pull/66952)) + +#### Components +- Popover: Fix missing label of the headerTitle Close button. ([66813](https://github.com/WordPress/gutenberg/pull/66813)) + +#### Post Editor +- Fix inconsistent sidebars close buttons sizes. ([66756](https://github.com/WordPress/gutenberg/pull/66756)) + +#### Block Library +- Remove unnecessary tooltip from Video block Text tracks button. ([66716](https://github.com/WordPress/gutenberg/pull/66716)) + +#### Block Editor +- Speak 'Block moved up/down' after using keyboard actions to move up/down. ([64966](https://github.com/WordPress/gutenberg/pull/64966)) + +#### Patterns +- Block Patterns List: Fix visual title and tooltip inconsistencies. ([64815](https://github.com/WordPress/gutenberg/pull/64815)) + + +### Performance + +- Inline Commenting: Avoid querying comments on editor load. ([66670](https://github.com/WordPress/gutenberg/pull/66670)) +- Patterns: Receive intermediate responses while unbound request is resolving. ([66713](https://github.com/WordPress/gutenberg/pull/66713)) +- Perf metrics: Update select and other metrics to use non-empty paragraphs. ([66762](https://github.com/WordPress/gutenberg/pull/66762)) +- Site Editor: Preload settings requests. ([66488](https://github.com/WordPress/gutenberg/pull/66488)) +- Site Editor: Speed up load by preloading home and front-page templates. ([66579](https://github.com/WordPress/gutenberg/pull/66579)) +- Site editor: Preload post if needed. ([66631](https://github.com/WordPress/gutenberg/pull/66631)) + +#### Global Styles +- Preload user global styles based on user caps. ([66541](https://github.com/WordPress/gutenberg/pull/66541)) + + +### Experiments + +- Add `isVisible` option to fields within DataForm. ([65826](https://github.com/WordPress/gutenberg/pull/65826)) +- DataViews: Implement `isItemClickable` and `onClickItem` props. ([66365](https://github.com/WordPress/gutenberg/pull/66365)) + +#### DataViews +- Quick Edit - Slug Field: Improve slug preview. ([66559](https://github.com/WordPress/gutenberg/pull/66559)) +- QuickEdit: Add password field data to the pages quick edit. ([66567](https://github.com/WordPress/gutenberg/pull/66567)) + + +### Documentation + +- Add 6.6.2 to Version in WordPress. ([66870](https://github.com/WordPress/gutenberg/pull/66870)) +- Add missing properties for DataViews/DataForm components. ([66749](https://github.com/WordPress/gutenberg/pull/66749)) +- Add section about the Fields API. ([66761](https://github.com/WordPress/gutenberg/pull/66761)) +- Block Bindings: Documentation API reference. ([66251](https://github.com/WordPress/gutenberg/pull/66251)) +- Docs: Include a note about supported licenses in WordPress packages. ([66562](https://github.com/WordPress/gutenberg/pull/66562)) +- Document `filterSortAndPaginate` & `isItemValid` utilities. ([66738](https://github.com/WordPress/gutenberg/pull/66738)) +- Feat: Storybook: Improve component organisation - Navigation Category - Issue #66275. ([66658](https://github.com/WordPress/gutenberg/pull/66658)) +- Feat: Storybook: Improve component organisation - Overlays Category - Issue #66275. ([66657](https://github.com/WordPress/gutenberg/pull/66657)) +- Feat: Storybook: Improve component organisation - Selection & Input Category - Issue #66275. ([66660](https://github.com/WordPress/gutenberg/pull/66660)) +- Feat: Storybook: Improve component organisation - Typography - Issue #66275. ([66633](https://github.com/WordPress/gutenberg/pull/66633)) +- Improve readability of DataViews documentation. ([66766](https://github.com/WordPress/gutenberg/pull/66766)) +- Move documentation for filter operators to proper place. ([66743](https://github.com/WordPress/gutenberg/pull/66743)) +- Reorganize to bootstrap DataForm API section. ([66729](https://github.com/WordPress/gutenberg/pull/66729)) +- Storybook: Improve component organisation - Actions. ([66680](https://github.com/WordPress/gutenberg/pull/66680)) +- Storybook: Log `warning()` when in dev mode. ([66568](https://github.com/WordPress/gutenberg/pull/66568)) +- Update Commands documentation with the existing contexts. ([66860](https://github.com/WordPress/gutenberg/pull/66860)) + + +### Code Quality + +- BlockPatternsList: Use the Async component. ([66744](https://github.com/WordPress/gutenberg/pull/66744)) +- Core Commands: Fix add new post URL assignment. ([66830](https://github.com/WordPress/gutenberg/pull/66830)) +- Inline Commenting: Optimize store selector and misc changes. ([66592](https://github.com/WordPress/gutenberg/pull/66592)) +- Remove unnecessary boolean assignments. ([66857](https://github.com/WordPress/gutenberg/pull/66857)) +- TypeScript: Fix and improve types for private-apis. ([66667](https://github.com/WordPress/gutenberg/pull/66667)) + +#### Block Editor +- Fix 'useSelect' dependencies for the 'RichText' component. ([66964](https://github.com/WordPress/gutenberg/pull/66964)) +- Fix ESLint warning for 'useBlockTypesState' hook. ([66757](https://github.com/WordPress/gutenberg/pull/66757)) +- Fix React Compiler error for 'BlockProps' util component. ([66809](https://github.com/WordPress/gutenberg/pull/66809)) +- Optimize `getVisibleElementBounds` in scrollable cases. ([66546](https://github.com/WordPress/gutenberg/pull/66546)) +- Revert: Fix unable to remove empty blocks on merge (#65262) + alternative. ([66564](https://github.com/WordPress/gutenberg/pull/66564)) +- URLInput: Fix incorrect classname for suggestions. ([66714](https://github.com/WordPress/gutenberg/pull/66714)) + +#### Site Editor +- Avoid using edited entity state in site editor loading hook. ([66924](https://github.com/WordPress/gutenberg/pull/66924)) +- Avoid using edited post selectors in welcome guide. ([66926](https://github.com/WordPress/gutenberg/pull/66926)) +- Edit Site: Refactor to remove usage of edited entity state. ([66922](https://github.com/WordPress/gutenberg/pull/66922)) +- Edit Site: Remove leftover 'priority-queue' dependency. ([66773](https://github.com/WordPress/gutenberg/pull/66773)) +- Remove useEditedEntityRecord hook. ([66955](https://github.com/WordPress/gutenberg/pull/66955)) + +#### Components +- Fix React Compiler error for 'useScrollRectIntoView'. ([66498](https://github.com/WordPress/gutenberg/pull/66498)) +- Panel: Add 40px size prop to Button. ([66589](https://github.com/WordPress/gutenberg/pull/66589)) +- Radio: Deprecate 36px default size. ([66572](https://github.com/WordPress/gutenberg/pull/66572)) +- Snackbar: Use `link` variant for action Button. ([66560](https://github.com/WordPress/gutenberg/pull/66560)) + +#### Data Layer +- Convert the emitter module in data package to TS. ([66669](https://github.com/WordPress/gutenberg/pull/66669)) +- Data: Rename useSelect internals to fix React Compiler violations. ([66807](https://github.com/WordPress/gutenberg/pull/66807)) +- Data: Upgrade Redux to v5.0.1. ([66966](https://github.com/WordPress/gutenberg/pull/66966)) + +#### Post Editor +- ESLint: Fix React Compiler violations in various commands. ([66787](https://github.com/WordPress/gutenberg/pull/66787)) +- Fix TS types for editor package. ([66754](https://github.com/WordPress/gutenberg/pull/66754)) + +#### Zoom Out +- Zoom-out: Move default background to the iframe component. ([66284](https://github.com/WordPress/gutenberg/pull/66284)) + +#### Design Tools +- Typography: Stabilize typography block supports within block processing. ([63401](https://github.com/WordPress/gutenberg/pull/63401)) + + +### Tools + +#### Testing +- Media: Check for `wav` mime type using isset. ([66947](https://github.com/WordPress/gutenberg/pull/66947)) + +#### Build Tooling +- Enforce the same order of fields in `package.json` files. ([66239](https://github.com/WordPress/gutenberg/pull/66239)) +- Introduce React Scanner for component usage stats. ([65463](https://github.com/WordPress/gutenberg/pull/65463)) + + +### Various + +- Style engine: Wrap array_merge in conditionals to prevent unnecessary merging. ([66661](https://github.com/WordPress/gutenberg/pull/66661)) + +#### Block Library +- Update placeholder text for blocks that support drag and drop. ([66842](https://github.com/WordPress/gutenberg/pull/66842)) +- update: Add Media to Add media in cover block. ([66835](https://github.com/WordPress/gutenberg/pull/66835)) + + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @benharri: Fix unset array key warning in block-bindings.php. ([66337](https://github.com/WordPress/gutenberg/pull/66337)) +- @benniledl: Add 6.6.2 to Version in WordPress. ([66870](https://github.com/WordPress/gutenberg/pull/66870)) +- @Infinite-Null: Media & Text: Set `.wp-block-media-text__media a` display to block. ([66915](https://github.com/WordPress/gutenberg/pull/66915)) +- @karthick-murugan: Site Icon Focus fix. ([66952](https://github.com/WordPress/gutenberg/pull/66952)) +- @rinkalpagdar: Post Content: Add border and spacing support. ([66366](https://github.com/WordPress/gutenberg/pull/66366)) +- @yogeshbhutkar: Site Hub: Fixed navigation redirect on mobile devices for classic themes. ([66867](https://github.com/WordPress/gutenberg/pull/66867)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @adamsilverstein @afercia @Aljullu @amitraj2203 @andrewserong @benharri @benniledl @carolinan @cbravobernal @DAreRodz @dcalhoun @ellatrix @fabiankaegy @gigitux @gziolo @hbhalodia @Infinite-Null @jasmussen @jorgefilipecosta @jsnajdr @juanfra @karthick-murugan @kevin940726 @louwie17 @Mamaduka @manzoorwanijk @matiasbenedetto @mikachan @mirka @n2erjo00 @ntsekouras @oandregal @ramonjd @renatho @rinkalpagdar @Soean @stokesman @swissspidy @t-hamano @tellthemachines @tyxla @up1512001 @Vrishabhsk @yogeshbhutkar @youknowriad + + + + += 19.6.4 = + +- PostTaxonomiesFlatTermSelector: abstract wrapper component (#66625) + + += 19.6.3 = + +- Revert "Set image width to fit-content to solve aspect ratio problems in Firefox. ([#66217](https://github.com/WordPress/gutenberg/pull/66804)) + + += 19.7.0-rc.2 = + + +- Comments controller: fix issue where comments are allowed when closed (https://github.com/WordPress/gutenberg/pull/66976) + + += 19.6.2 = + +- Comments controller: fix issue where comments are allowed when closed [#66976](https://github.com/WordPress/gutenberg/pull/66976) + + += 19.7.0-rc.1 = + + +## Changelog + +### Enhancements + +- Add "show template" to preview dropdown. ([66514](https://github.com/WordPress/gutenberg/pull/66514)) +- Iframe: Always enable for block themes, in core too. ([66800](https://github.com/WordPress/gutenberg/pull/66800)) +- Media Utils: Add experimental `sideloadMedia`. ([66378](https://github.com/WordPress/gutenberg/pull/66378)) +- Post fields: Clean up. ([66941](https://github.com/WordPress/gutenberg/pull/66941)) +- Post fields: Extract `title` from `edit-site` to `fields` package. ([66940](https://github.com/WordPress/gutenberg/pull/66940)) +- Post fields: Move `comment_status` from edit-site to fields package. ([66934](https://github.com/WordPress/gutenberg/pull/66934)) +- Post fields: Move `date` fields from `edit-site` to `fields` package. ([66938](https://github.com/WordPress/gutenberg/pull/66938)) +- Post fields: Move `status` from `edit-site` to `fields`. ([66937](https://github.com/WordPress/gutenberg/pull/66937)) +- Relocate “View” external link to end of editor header controls. ([66785](https://github.com/WordPress/gutenberg/pull/66785)) + +#### Block Library +- Added toggle control to set any image as feature image if no feature image is set for post. ([65896](https://github.com/WordPress/gutenberg/pull/65896)) +- Improve cover z-index solution. ([66249](https://github.com/WordPress/gutenberg/pull/66249)) +- Post Content: Add border and spacing support. ([66366](https://github.com/WordPress/gutenberg/pull/66366)) +- Query Loop: Use templateSlug and postType for more context. ([65820](https://github.com/WordPress/gutenberg/pull/65820)) +- Update text case of "Starter Content". ([66954](https://github.com/WordPress/gutenberg/pull/66954)) +- [Details Block]: Adds anchor support in details block. ([66734](https://github.com/WordPress/gutenberg/pull/66734)) + +#### Components +- Guide: Use small size button for page controls. ([66607](https://github.com/WordPress/gutenberg/pull/66607)) +- MenuItem: Add 40px size prop on Button. ([66596](https://github.com/WordPress/gutenberg/pull/66596)) +- Notice: Add appropriate size props to Buttons. ([66593](https://github.com/WordPress/gutenberg/pull/66593)) +- PaletteEdit: Add appropriate size props to Buttons. ([66590](https://github.com/WordPress/gutenberg/pull/66590)) +- Popover: Add small size prop to close button. ([66587](https://github.com/WordPress/gutenberg/pull/66587)) + +#### Global Styles +- Global styles revisions: Move focus and active state to list item. ([66780](https://github.com/WordPress/gutenberg/pull/66780)) +- Site editor: Integrate global styles controls and style book preview into the styles panel. ([65619](https://github.com/WordPress/gutenberg/pull/65619)) + +#### DataViews +- DataViews Fields API: Default getValueFromId supports nested objects. ([66890](https://github.com/WordPress/gutenberg/pull/66890)) + +#### Block Editor +- Inserter: Add 'Starter Content' category to the inserter. ([66819](https://github.com/WordPress/gutenberg/pull/66819)) + +#### Zoom Out +- Enable zoom out mode for non-iframe editor. ([66789](https://github.com/WordPress/gutenberg/pull/66789)) + +#### Themes +- Theme JSON Resolver: Remove theme json merge in resolve_theme_file_uris. ([66662](https://github.com/WordPress/gutenberg/pull/66662)) + +#### Edit Mode +- Image block: Add support for "more" dropdown for additional tools in Write mode. ([66605](https://github.com/WordPress/gutenberg/pull/66605)) + +#### Style Book +- Add a landing section to stylebook tabs. ([66545](https://github.com/WordPress/gutenberg/pull/66545)) + +#### Media +- Media Library: Expose filters dropdown for individual images, such as with the Image block. ([65965](https://github.com/WordPress/gutenberg/pull/65965)) + + +### Bug Fixes + +- Block toolbar: Restrict visible child calculation to known blocks. ([66702](https://github.com/WordPress/gutenberg/pull/66702)) +- ComplementaryArea: Fix button position. ([66677](https://github.com/WordPress/gutenberg/pull/66677)) +- Fix Paragraph appender layout shift (building on 66061). ([66779](https://github.com/WordPress/gutenberg/pull/66779)) +- Fix: Set the `fit-content` width for images that are not `.svg`. ([66643](https://github.com/WordPress/gutenberg/pull/66643)) +- Preference modal: Avoid fetching all reusable blocks when the site editor loads. ([66621](https://github.com/WordPress/gutenberg/pull/66621)) +- Revert "Set image width to `fit-content` to solve aspect ratio problems in Firefox. (#66217)". ([66804](https://github.com/WordPress/gutenberg/pull/66804)) +- Safari: Fix site editor template error. ([66647](https://github.com/WordPress/gutenberg/pull/66647)) +- Safari: Prevent focus capturing caused by flex display. ([66402](https://github.com/WordPress/gutenberg/pull/66402)) +- Select Mode: Hide tool selector in the post editor and force design mode. ([66784](https://github.com/WordPress/gutenberg/pull/66784)) +- Shadow panel: Make the delete modal text translatable. ([66712](https://github.com/WordPress/gutenberg/pull/66712)) +- Site Editor: Fix template for page-on-front option. ([66739](https://github.com/WordPress/gutenberg/pull/66739)) +- WP Scripts: Make watch mode more resilient for developer errors. ([66752](https://github.com/WordPress/gutenberg/pull/66752)) +- getDefaultTemplateId: Ensure entity configuration is loaded. ([66650](https://github.com/WordPress/gutenberg/pull/66650)) + +#### Block Library +- Cover: Fix media library image selection. ([66782](https://github.com/WordPress/gutenberg/pull/66782)) +- Cover: Show DropZone only when dragging withing the block. ([66912](https://github.com/WordPress/gutenberg/pull/66912)) +- Media & Text: Set `.wp-block-media-text__media a` display to block. ([66915](https://github.com/WordPress/gutenberg/pull/66915)) +- Prevent duplicate post format taxonomy queries. ([66627](https://github.com/WordPress/gutenberg/pull/66627)) +- Query Loop: Check for postTypeFromContext before using it. ([66655](https://github.com/WordPress/gutenberg/pull/66655)) +- Query Loop: Remove postTypeFromContext. ([66681](https://github.com/WordPress/gutenberg/pull/66681)) + +#### Block Editor +- Appender: Fix initial position. ([66711](https://github.com/WordPress/gutenberg/pull/66711)) +- Appender: Fix outside canvas styles. ([66630](https://github.com/WordPress/gutenberg/pull/66630)) +- Block Inspector: Restore bottom margin for RadioControl. ([66688](https://github.com/WordPress/gutenberg/pull/66688)) +- Iframed editor: Fix relative wp-content URLs. ([66751](https://github.com/WordPress/gutenberg/pull/66751)) + +#### Global Styles +- Section Styles: Fix insecure properties removal for inner block types and elements. ([66896](https://github.com/WordPress/gutenberg/pull/66896)) +- Style book: Reduce margin selector specificity so that it doesn't override global block styles. ([66895](https://github.com/WordPress/gutenberg/pull/66895)) +- Theme JSON: Replace top-level background style objects on merge. ([66656](https://github.com/WordPress/gutenberg/pull/66656)) + +#### Components +- FormTokenField: Fix token styles. ([66640](https://github.com/WordPress/gutenberg/pull/66640)) +- Storybook: Fix DataViews action modals. ([66727](https://github.com/WordPress/gutenberg/pull/66727)) +- ToggleGroupControl: Fix active background for `zero` value. ([66855](https://github.com/WordPress/gutenberg/pull/66855)) + +#### Post Editor +- Disable device preview button in pattern/template part/navitation editor. ([65970](https://github.com/WordPress/gutenberg/pull/65970)) +- PostTaxonomiesFlatTermSelector: Abstract wrapper component. ([66625](https://github.com/WordPress/gutenberg/pull/66625)) +- VisualEditor: Always output has-global-padding classname when in post only mode. ([66626](https://github.com/WordPress/gutenberg/pull/66626)) + +#### DataViews +- Fix TypeError when duplicating uncategorized theme patterns. ([66889](https://github.com/WordPress/gutenberg/pull/66889)) +- Tweak primary field in patterns grid layout. ([66733](https://github.com/WordPress/gutenberg/pull/66733)) + +#### Meta Boxes +- Fix: Show Meta Boxes at the bottom of the screen regardless of the current rendering mode. ([66508](https://github.com/WordPress/gutenberg/pull/66508)) +- Hide metaboxes in Zoom Out. ([66886](https://github.com/WordPress/gutenberg/pull/66886)) + +#### Site Editor +- DataViews: Fix 'aria-label' for pattern preview element. ([66601](https://github.com/WordPress/gutenberg/pull/66601)) +- Site Hub: Fixed navigation redirect on mobile devices for classic themes. ([66867](https://github.com/WordPress/gutenberg/pull/66867)) + +#### Media +- Add `x-wav` mime type for wav files in Firefox. ([66850](https://github.com/WordPress/gutenberg/pull/66850)) +- Ensure HEIC files selectable from “Upload” button. ([66292](https://github.com/WordPress/gutenberg/pull/66292)) + +#### Patterns +- Fix uncategorized pattern browsing when pattern has no categories. ([66945](https://github.com/WordPress/gutenberg/pull/66945)) + +#### Interactivity API +- Fix property modification from inherited context two or more levels above. ([66872](https://github.com/WordPress/gutenberg/pull/66872)) + +#### Block API +- Process Block Type: Copy deprecation to a new object instead of mutating when stabilizing supports. ([66849](https://github.com/WordPress/gutenberg/pull/66849)) + +#### Design Tools +- Block Gap: Fix block spacing control for axial gap supported blocks. ([66783](https://github.com/WordPress/gutenberg/pull/66783)) + +#### Document Settings +- Editor: Restore the 'PluginPostStatusInfo' slot position. ([66665](https://github.com/WordPress/gutenberg/pull/66665)) + +#### Templates API +- Fix flash when clicking template name in the editor when a plugin registered template matches a default WP theme template. ([66359](https://github.com/WordPress/gutenberg/pull/66359)) + +#### Block bindings +- Fix unset array key warning in block-bindings.php. ([66337](https://github.com/WordPress/gutenberg/pull/66337)) + + +### Accessibility + +- Fix : Snackbar Notice Inconsistency. ([66405](https://github.com/WordPress/gutenberg/pull/66405)) +- Image: Add `aria-haspopup` prop write mode `more` tools menu items. ([66815](https://github.com/WordPress/gutenberg/pull/66815)) +- Site Icon Focus fix. ([66952](https://github.com/WordPress/gutenberg/pull/66952)) + +#### Components +- Popover: Fix missing label of the headerTitle Close button. ([66813](https://github.com/WordPress/gutenberg/pull/66813)) + +#### Post Editor +- Fix inconsistent sidebars close buttons sizes. ([66756](https://github.com/WordPress/gutenberg/pull/66756)) + +#### Block Library +- Remove unnecessary tooltip from Video block Text tracks button. ([66716](https://github.com/WordPress/gutenberg/pull/66716)) + +#### Block Editor +- Speak 'Block moved up/down' after using keyboard actions to move up/down. ([64966](https://github.com/WordPress/gutenberg/pull/64966)) + +#### Patterns +- Block Patterns List: Fix visual title and tooltip inconsistencies. ([64815](https://github.com/WordPress/gutenberg/pull/64815)) + + +### Performance + +- Inline Commenting: Avoid querying comments on editor load. ([66670](https://github.com/WordPress/gutenberg/pull/66670)) +- Patterns: Receive intermediate responses while unbound request is resolving. ([66713](https://github.com/WordPress/gutenberg/pull/66713)) +- Perf metrics: Update select and other metrics to use non-empty paragraphs. ([66762](https://github.com/WordPress/gutenberg/pull/66762)) +- Site Editor: Preload settings requests. ([66488](https://github.com/WordPress/gutenberg/pull/66488)) +- Site Editor: Speed up load by preloading home and front-page templates. ([66579](https://github.com/WordPress/gutenberg/pull/66579)) +- Site editor: Preload post if needed. ([66631](https://github.com/WordPress/gutenberg/pull/66631)) + +#### Global Styles +- Preload user global styles based on user caps. ([66541](https://github.com/WordPress/gutenberg/pull/66541)) + + +### Experiments + +- Add `isVisible` option to fields within DataForm. ([65826](https://github.com/WordPress/gutenberg/pull/65826)) +- DataViews: Implement `isItemClickable` and `onClickItem` props. ([66365](https://github.com/WordPress/gutenberg/pull/66365)) + +#### DataViews +- Quick Edit - Slug Field: Improve slug preview. ([66559](https://github.com/WordPress/gutenberg/pull/66559)) +- QuickEdit: Add password field data to the pages quick edit. ([66567](https://github.com/WordPress/gutenberg/pull/66567)) + + +### Documentation + +- Add 6.6.2 to Version in WordPress. ([66870](https://github.com/WordPress/gutenberg/pull/66870)) +- Add missing properties for DataViews/DataForm components. ([66749](https://github.com/WordPress/gutenberg/pull/66749)) +- Add section about the Fields API. ([66761](https://github.com/WordPress/gutenberg/pull/66761)) +- Block Bindings: Documentation API reference. ([66251](https://github.com/WordPress/gutenberg/pull/66251)) +- Docs: Include a note about supported licenses in WordPress packages. ([66562](https://github.com/WordPress/gutenberg/pull/66562)) +- Document `filterSortAndPaginate` & `isItemValid` utilities. ([66738](https://github.com/WordPress/gutenberg/pull/66738)) +- Feat: Storybook: Improve component organisation - Navigation Category - Issue #66275. ([66658](https://github.com/WordPress/gutenberg/pull/66658)) +- Feat: Storybook: Improve component organisation - Overlays Category - Issue #66275. ([66657](https://github.com/WordPress/gutenberg/pull/66657)) +- Feat: Storybook: Improve component organisation - Selection & Input Category - Issue #66275. ([66660](https://github.com/WordPress/gutenberg/pull/66660)) +- Feat: Storybook: Improve component organisation - Typography - Issue #66275. ([66633](https://github.com/WordPress/gutenberg/pull/66633)) +- Improve readability of DataViews documentation. ([66766](https://github.com/WordPress/gutenberg/pull/66766)) +- Move documentation for filter operators to proper place. ([66743](https://github.com/WordPress/gutenberg/pull/66743)) +- Reorganize to bootstrap DataForm API section. ([66729](https://github.com/WordPress/gutenberg/pull/66729)) +- Storybook: Improve component organisation - Actions. ([66680](https://github.com/WordPress/gutenberg/pull/66680)) +- Storybook: Log `warning()` when in dev mode. ([66568](https://github.com/WordPress/gutenberg/pull/66568)) +- Update Commands documentation with the existing contexts. ([66860](https://github.com/WordPress/gutenberg/pull/66860)) + + +### Code Quality + +- BlockPatternsList: Use the Async component. ([66744](https://github.com/WordPress/gutenberg/pull/66744)) +- Core Commands: Fix add new post URL assignment. ([66830](https://github.com/WordPress/gutenberg/pull/66830)) +- Inline Commenting: Optimize store selector and misc changes. ([66592](https://github.com/WordPress/gutenberg/pull/66592)) +- Remove unnecessary boolean assignments. ([66857](https://github.com/WordPress/gutenberg/pull/66857)) +- TypeScript: Fix and improve types for private-apis. ([66667](https://github.com/WordPress/gutenberg/pull/66667)) + +#### Block Editor +- Fix 'useSelect' dependencies for the 'RichText' component. ([66964](https://github.com/WordPress/gutenberg/pull/66964)) +- Fix ESLint warning for 'useBlockTypesState' hook. ([66757](https://github.com/WordPress/gutenberg/pull/66757)) +- Fix React Compiler error for 'BlockProps' util component. ([66809](https://github.com/WordPress/gutenberg/pull/66809)) +- Optimize `getVisibleElementBounds` in scrollable cases. ([66546](https://github.com/WordPress/gutenberg/pull/66546)) +- Revert: Fix unable to remove empty blocks on merge (#65262) + alternative. ([66564](https://github.com/WordPress/gutenberg/pull/66564)) +- URLInput: Fix incorrect classname for suggestions. ([66714](https://github.com/WordPress/gutenberg/pull/66714)) + +#### Site Editor +- Avoid using edited entity state in site editor loading hook. ([66924](https://github.com/WordPress/gutenberg/pull/66924)) +- Avoid using edited post selectors in welcome guide. ([66926](https://github.com/WordPress/gutenberg/pull/66926)) +- Edit Site: Refactor to remove usage of edited entity state. ([66922](https://github.com/WordPress/gutenberg/pull/66922)) +- Edit Site: Remove leftover 'priority-queue' dependency. ([66773](https://github.com/WordPress/gutenberg/pull/66773)) +- Remove useEditedEntityRecord hook. ([66955](https://github.com/WordPress/gutenberg/pull/66955)) + +#### Components +- Fix React Compiler error for 'useScrollRectIntoView'. ([66498](https://github.com/WordPress/gutenberg/pull/66498)) +- Panel: Add 40px size prop to Button. ([66589](https://github.com/WordPress/gutenberg/pull/66589)) +- Radio: Deprecate 36px default size. ([66572](https://github.com/WordPress/gutenberg/pull/66572)) +- Snackbar: Use `link` variant for action Button. ([66560](https://github.com/WordPress/gutenberg/pull/66560)) + +#### Data Layer +- Convert the emitter module in data package to TS. ([66669](https://github.com/WordPress/gutenberg/pull/66669)) +- Data: Rename useSelect internals to fix React Compiler violations. ([66807](https://github.com/WordPress/gutenberg/pull/66807)) +- Data: Upgrade Redux to v5.0.1. ([66966](https://github.com/WordPress/gutenberg/pull/66966)) + +#### Post Editor +- ESLint: Fix React Compiler violations in various commands. ([66787](https://github.com/WordPress/gutenberg/pull/66787)) +- Fix TS types for editor package. ([66754](https://github.com/WordPress/gutenberg/pull/66754)) + +#### Zoom Out +- Zoom-out: Move default background to the iframe component. ([66284](https://github.com/WordPress/gutenberg/pull/66284)) + +#### Design Tools +- Typography: Stabilize typography block supports within block processing. ([63401](https://github.com/WordPress/gutenberg/pull/63401)) + + +### Tools + +#### Testing +- Media: Check for `wav` mime type using isset. ([66947](https://github.com/WordPress/gutenberg/pull/66947)) + +#### Build Tooling +- Enforce the same order of fields in `package.json` files. ([66239](https://github.com/WordPress/gutenberg/pull/66239)) +- Introduce React Scanner for component usage stats. ([65463](https://github.com/WordPress/gutenberg/pull/65463)) + + +### Various + +- Style engine: Wrap array_merge in conditionals to prevent unnecessary merging. ([66661](https://github.com/WordPress/gutenberg/pull/66661)) + +#### Block Library +- Update placeholder text for blocks that support drag and drop. ([66842](https://github.com/WordPress/gutenberg/pull/66842)) +- update: Add Media to Add media in cover block. ([66835](https://github.com/WordPress/gutenberg/pull/66835)) + + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @benharri: Fix unset array key warning in block-bindings.php. ([66337](https://github.com/WordPress/gutenberg/pull/66337)) +- @benniledl: Add 6.6.2 to Version in WordPress. ([66870](https://github.com/WordPress/gutenberg/pull/66870)) +- @Infinite-Null: Media & Text: Set `.wp-block-media-text__media a` display to block. ([66915](https://github.com/WordPress/gutenberg/pull/66915)) +- @karthick-murugan: Site Icon Focus fix. ([66952](https://github.com/WordPress/gutenberg/pull/66952)) +- @rinkalpagdar: Post Content: Add border and spacing support. ([66366](https://github.com/WordPress/gutenberg/pull/66366)) +- @yogeshbhutkar: Site Hub: Fixed navigation redirect on mobile devices for classic themes. ([66867](https://github.com/WordPress/gutenberg/pull/66867)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @adamsilverstein @afercia @Aljullu @amitraj2203 @andrewserong @benharri @benniledl @carolinan @cbravobernal @DAreRodz @dcalhoun @ellatrix @fabiankaegy @gigitux @gziolo @hbhalodia @Infinite-Null @jasmussen @jorgefilipecosta @jsnajdr @juanfra @karthick-murugan @kevin940726 @louwie17 @Mamaduka @manzoorwanijk @matiasbenedetto @mikachan @mirka @n2erjo00 @ntsekouras @oandregal @ramonjd @renatho @rinkalpagdar @Soean @stokesman @swissspidy @t-hamano @tellthemachines @tyxla @up1512001 @Vrishabhsk @yogeshbhutkar @youknowriad + + += 19.6.1 = + + +## Changelog + +### Bug Fixes + +#### List View +- Block Editor: Fix stale dependencies of selectors depending on editorTool preference. ([66833](https://github.com/WordPress/gutenberg/pull/66833)) + + + + +## Contributors + +The following contributors merged PRs in this release: + +@mcsf + + += 19.6.0 = + + +## Changelog + +### Enhancements + +#### Components +- Add elevation tokens to storybook. ([66122](https://github.com/WordPress/gutenberg/pull/66122)) +- Add foundations:Elevation to storybook. ([66124](https://github.com/WordPress/gutenberg/pull/66124)) +- Add radius foundation and tokens to storybook. ([66219](https://github.com/WordPress/gutenberg/pull/66219)) +- Combobox, FormTokenField: Show message when no matches found. ([66142](https://github.com/WordPress/gutenberg/pull/66142)) +- Storybook: Organizes components under 'Utilities'. ([66210](https://github.com/WordPress/gutenberg/pull/66210)) +- Tabs: Expose active tab item props, use ariakit prop types. ([66223](https://github.com/WordPress/gutenberg/pull/66223)) +- Tabs: Remove custom logic. ([66097](https://github.com/WordPress/gutenberg/pull/66097)) +- `DropdownMenuV2`: Rename to `Menu`. ([66289](https://github.com/WordPress/gutenberg/pull/66289)) + +#### Block Library +- Add Transformation from Separator to Spacer. ([66230](https://github.com/WordPress/gutenberg/pull/66230)) +- Add lightbox option in gallery block link control. ([64014](https://github.com/WordPress/gutenberg/pull/64014)) +- Archives: Add border block support. ([63400](https://github.com/WordPress/gutenberg/pull/63400)) +- Border support added to comments. ([66354](https://github.com/WordPress/gutenberg/pull/66354)) +- Cover Block: Add Image Resolution options. ([62926](https://github.com/WordPress/gutenberg/pull/62926)) +- HTML Block: Force HTML preview in view mode. ([66440](https://github.com/WordPress/gutenberg/pull/66440)) + +#### Zoom Out +- Add keyboard shortcut in editor. ([66400](https://github.com/WordPress/gutenberg/pull/66400)) +- Iterate zoom out shuffle into a more visual control. ([66194](https://github.com/WordPress/gutenberg/pull/66194)) +- Use the zoom-level value to scale the iframe. ([66280](https://github.com/WordPress/gutenberg/pull/66280)) + +#### Site Editor +- Remove synchronization of canvas mode into store. ([66213](https://github.com/WordPress/gutenberg/pull/66213)) +- Style Book: Clean up layout. ([66255](https://github.com/WordPress/gutenberg/pull/66255)) +- Update site icon and title position. ([66171](https://github.com/WordPress/gutenberg/pull/66171)) +- Editor Interface: Remove small header from global styles/plugin sidebar. ([64474](https://github.com/WordPress/gutenberg/pull/64474)) +- Remove purple coloring from DocumentBar and PostCard. ([66451](https://github.com/WordPress/gutenberg/pull/66451)) +- Core Data: Add the 'getEntitiesConfig' resolver. ([65871](https://github.com/WordPress/gutenberg/pull/65871)) +- BlockGroupToolbar: Better i18n context for toolbar labels. ([66211](https://github.com/WordPress/gutenberg/pull/66211)) +- Set `ResizableEditor` height based on border-box. ([66342](https://github.com/WordPress/gutenberg/pull/66342)) +- Add align-item related icons. ([66242](https://github.com/WordPress/gutenberg/pull/66242)) +- Stabilize isPreviewMode flag. ([66149](https://github.com/WordPress/gutenberg/pull/66149)) + +#### Data Views +- Fix alignment of action items in list layout. ([66273](https://github.com/WordPress/gutenberg/pull/66273)) +- Templates: Hide media field in list view. ([66573](https://github.com/WordPress/gutenberg/pull/66573)) + +#### Global Styles +- Backport: Caching of global styles for blocks from core. ([66349](https://github.com/WordPress/gutenberg/pull/66349)) +- Style Book: Add color tab. ([65692](https://github.com/WordPress/gutenberg/pull/65692)) + +#### Real-time Collaboration +- Inline Commenting: Disable comments on published posts for now. ([66583](https://github.com/WordPress/gutenberg/pull/66583)) + + +#### REST API +- Backport from WordPress core: Improvements for the post format query loop filter. ([66037](https://github.com/WordPress/gutenberg/pull/66037)) + +#### Build Tooling +- Create Block: Adds `--target-dir` flag to allow the tool to target where to scaffold. ([53781](https://github.com/WordPress/gutenberg/pull/53781)) +- Scripts: Add build-blocks-manifest command. ([65866](https://github.com/WordPress/gutenberg/pull/65866)) +- Scripts: Add BlueOak-1.0.0 license to GPL2 compatible. ([66139](https://github.com/WordPress/gutenberg/pull/66139)) +- WP Scripts: Add a `--root-folder` argument to the `plugin-zip` command. ([61375](https://github.com/WordPress/gutenberg/pull/61375)) + +### Bug Fixes + +#### Zoom Out +- Disable zoom out toggle button when Style Book is open. ([66228](https://github.com/WordPress/gutenberg/pull/66228)) +- Don't switch editor mode when changing entities. ([66452](https://github.com/WordPress/gutenberg/pull/66452)) +- Fix scaling animation for device previews. ([66132](https://github.com/WordPress/gutenberg/pull/66132)) +- Fix zoom out not persisting while switching between editor and code editor. ([65932](https://github.com/WordPress/gutenberg/pull/65932)) +- Fix zoom out shortcut on Windows. ([66506](https://github.com/WordPress/gutenberg/pull/66506)) +- Fix: Activate zoom out on large viewport. ([66308](https://github.com/WordPress/gutenberg/pull/66308)) +- Hide slots and grouping buttons. ([66243](https://github.com/WordPress/gutenberg/pull/66243)) +- Remove zoom-out toolbar. ([66039](https://github.com/WordPress/gutenberg/pull/66039)) +- Resets the Zoom on viewed/edited entity change. ([66232](https://github.com/WordPress/gutenberg/pull/66232)) +- Revise zoom layout shift fix. ([66390](https://github.com/WordPress/gutenberg/pull/66390)) +- Zoom Out: Rely on zoom-level instead of zoom-out mode. ([66141](https://github.com/WordPress/gutenberg/pull/66141)) +- Zoom Out: Fix bouncy drop zones. ([66399](https://github.com/WordPress/gutenberg/pull/66399)) + +#### Block Editor +- Block inserter: Prevent editor from crashing if `blockType.parent` is a string. ([66234](https://github.com/WordPress/gutenberg/pull/66234)) +- Block toolbar: Account for scrollable blocks that affect the position of the block toolbar. ([66188](https://github.com/WordPress/gutenberg/pull/66188)) +- Fix extra scrollbar appearing when searching in the inserter. ([66229](https://github.com/WordPress/gutenberg/pull/66229)) +- Fix: Show paragraph block variations in rich text inserter. ([66318](https://github.com/WordPress/gutenberg/pull/66318)) +- Group: Fix padding select. ([65857](https://github.com/WordPress/gutenberg/pull/65857)) +- Link Shortcut: Only trigger the link shortcut if there's a text selection. ([66056](https://github.com/WordPress/gutenberg/pull/66056)) +- Remove relative position from sidebar tabpanel. ([66267](https://github.com/WordPress/gutenberg/pull/66267)) +- Rich text: Remove empty file. ([66553](https://github.com/WordPress/gutenberg/pull/66553)) + +- Block editor: Self nesting and circular nesting block fix. ([66121](https://github.com/WordPress/gutenberg/pull/66121)) +- Post Editor: Set the default value of the editorTool to edit. ([66636](https://github.com/WordPress/gutenberg/pull/66636)) + +#### Components +- ColorPalette: Prevent overflow of custom color button background. ([66152](https://github.com/WordPress/gutenberg/pull/66152)) +- Fix: Text overflow in Patterns filter. ([66504](https://github.com/WordPress/gutenberg/pull/66504)) +- RadioGroup: Fix arrow key navigation in RTL. ([66202](https://github.com/WordPress/gutenberg/pull/66202)) +- Tabs and TabPanel: Fix arrow key navigation in RTL. ([66201](https://github.com/WordPress/gutenberg/pull/66201)) +- Tabs and ToggleGroupControl: Round indicator size. ([66426](https://github.com/WordPress/gutenberg/pull/66426)) +- Tabs: Fix animation timings. ([66198](https://github.com/WordPress/gutenberg/pull/66198)) +- Tabs: Override tablist's tabindex only when necessary. ([66209](https://github.com/WordPress/gutenberg/pull/66209)) +- Tabs: Restore vertical alignment for tabs content. ([66215](https://github.com/WordPress/gutenberg/pull/66215)) +- Tabs: Update indicator more reactively. ([66207](https://github.com/WordPress/gutenberg/pull/66207)) +- SpacingSizesControl: Use generic label for linked button. ([66304](https://github.com/WordPress/gutenberg/pull/66304)) + +#### i18n +- Miscellaneous i18n fixes. ([66510](https://github.com/WordPress/gutenberg/pull/66510)) +- Remove most of the occurrences of the verb toggle. ([66371](https://github.com/WordPress/gutenberg/pull/66371)) + +#### Post Editor +- Always force iframe in pattern editor. ([65887](https://github.com/WordPress/gutenberg/pull/65887)) +- Editor: Multi-entity saving: Show correct count of entities to be saved. ([66482](https://github.com/WordPress/gutenberg/pull/66482)) +- Fix : "Set featured image" button border flashes on focus. ([66092](https://github.com/WordPress/gutenberg/pull/66092)) +- Fix Parent Check Condition in `buildTermsTree`. ([66006](https://github.com/WordPress/gutenberg/pull/66006)) +- Fix: Improve the DocumentBar post type label for the Homepage and Posts Page cases. ([66355](https://github.com/WordPress/gutenberg/pull/66355)) +- PostTaxonomiesFlatTermSelector: Restore space between tag list and most used tags. ([66566](https://github.com/WordPress/gutenberg/pull/66566)) +- Typo metabox pane is a meta box panel. ([66502](https://github.com/WordPress/gutenberg/pull/66502)) + +#### Block Library +- Block registration: Normalize blockType.parent to `array`. ([66250](https://github.com/WordPress/gutenberg/pull/66250)) +- Button Block: Apply Stretch Styles Correctly. ([64770](https://github.com/WordPress/gutenberg/pull/64770)) +- Buttons: Fix the initial white space in nofollow rel. ([66303](https://github.com/WordPress/gutenberg/pull/66303)) +- Fix - Image block: Aspect ratio not responding when dimensions are not set. ([66217](https://github.com/WordPress/gutenberg/pull/66217)) +- Navigation block: Fix block appender size. ([66153](https://github.com/WordPress/gutenberg/pull/66153)) +- Fix the navigation issue inside cover blocks. ([66093](https://github.com/WordPress/gutenberg/pull/66093)) + +#### Site Editor +- Edit Site: Fix canvasMode var. ([66316](https://github.com/WordPress/gutenberg/pull/66316)) +- Fix button hover style in sidebar navigation screen. ([66505](https://github.com/WordPress/gutenberg/pull/66505)) +- Remove toggle verb from post list data views 'Toggle details panel'. ([66334](https://github.com/WordPress/gutenberg/pull/66334)) +- Revert 66431 (Site editor: Remove "default" admin CSS). ([66540](https://github.com/WordPress/gutenberg/pull/66540)) +- Restore block-library editor.css outside canvas. ([66556](https://github.com/WordPress/gutenberg/pull/66556)) +- Fix extraneous scrollbar in device previews. ([66494](https://github.com/WordPress/gutenberg/pull/66494)) +- Global styles: Move preload paths filter to 6.7 (previously 6.8). ([66543](https://github.com/WordPress/gutenberg/pull/66543)) +- Fix comment output in styles. ([66439](https://github.com/WordPress/gutenberg/pull/66439)) +- Site editor: Fix save shortcut. ([66423](https://github.com/WordPress/gutenberg/pull/66423)) +- Preload: Fix multiple regressions around global styles. ([66468](https://github.com/WordPress/gutenberg/pull/66468)) + +#### Build tooling +- Create block: Ensure $slug is replaced with passed slug. ([66528](https://github.com/WordPress/gutenberg/pull/66528)) + +### Accessibility + +#### Post Editor +- Add featured image alt text. ([66189](https://github.com/WordPress/gutenberg/pull/66189)) +- Fix : Badge Color contrast. ([66360](https://github.com/WordPress/gutenberg/pull/66360)) + +#### Block Editor +- ImageSizeControls: Replace ButtonGroup with ToggleGroupControl. ([65386](https://github.com/WordPress/gutenberg/pull/65386)) +- Improve the link preview accessibility and labels. ([60908](https://github.com/WordPress/gutenberg/pull/60908)) + +#### Block Library +- Search: Replace ButtonGroup usage with ToggleGroupControl. ([65340](https://github.com/WordPress/gutenberg/pull/65340)) +- Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. ([66147](https://github.com/WordPress/gutenberg/pull/66147)) + +#### Global Styles +- Global styles menu: Avoid visible labels and accessible names mismatch. ([65124](https://github.com/WordPress/gutenberg/pull/65124)) + +#### Site Editor +- Fix Global styles panel header buttons text overlap for 'Show button text labels'. ([63243](https://github.com/WordPress/gutenberg/pull/63243)) +- Update the speak messages when switching editor modes. ([66278](https://github.com/WordPress/gutenberg/pull/66278)) + +### Performance + +#### Site Editor +- Remove "default" admin CSS. ([66431](https://github.com/WordPress/gutenberg/pull/66431)) +- Remove content styles outside canvas. ([66432](https://github.com/WordPress/gutenberg/pull/66432)) +- Block Style Variations: Reuse block metadata in WP_Theme_JSON::Get_valid_block_style_variations() for better performance. ([66539](https://github.com/WordPress/gutenberg/pull/66539)) +- Block Bindings: Use `getEntityConfig` instead of `getPostTypes` to get available slugs. ([66101](https://github.com/WordPress/gutenberg/pull/66101)) + +#### Build Tooling +- Fix/compare performance with correct branch. ([66196](https://github.com/WordPress/gutenberg/pull/66196)) + +### Experiments + +- Add Inline comment experimental flag. ([60622](https://github.com/WordPress/gutenberg/pull/60622)) +- QuickEdit: Add slug field control. ([65196](https://github.com/WordPress/gutenberg/pull/65196)) + +#### Data Views +- Quick Edit: Fix JS error when bulk editing pages. ([66358](https://github.com/WordPress/gutenberg/pull/66358)) +- QuickEdit: Add Featured Image Control. ([64496](https://github.com/WordPress/gutenberg/pull/64496)) +- QuickEdit: Add Parent field. ([66527](https://github.com/WordPress/gutenberg/pull/66527)) + +### Documentation + +- BaseControl: Auto-generate readme. ([66500](https://github.com/WordPress/gutenberg/pull/66500)) +- Components: Prevent generated readmes duplicating h1 elements when published. ([66180](https://github.com/WordPress/gutenberg/pull/66180)) +- Correct documentation on display type in flow layouts. ([66224](https://github.com/WordPress/gutenberg/pull/66224)) +- Docs: Interactivity API - Add documentation for `getServerState()` and `getServerContext()`. ([66104](https://github.com/WordPress/gutenberg/pull/66104)) +- Fix undo/redo Button size in Storybook playground. ([66538](https://github.com/WordPress/gutenberg/pull/66538)) +- Fix: JSON Schema Docgen doesn't work on Windows OS. ([66414](https://github.com/WordPress/gutenberg/pull/66414)) +- ItemGroup: Improve stories to default to bordered and separated. ([66191](https://github.com/WordPress/gutenberg/pull/66191)) +- README: Add Storybook badge. ([66529](https://github.com/WordPress/gutenberg/pull/66529)) +- Remove meetings that no longer occur from Contributor Guide. ([66421](https://github.com/WordPress/gutenberg/pull/66421)) +- Site editor routes: Add documentation for areas and prevent `edit` area from rendering when canvas is `edit`. ([66309](https://github.com/WordPress/gutenberg/pull/66309)) +- Update documentation about build process changes. ([66428](https://github.com/WordPress/gutenberg/pull/66428)) +- Docs: Example for getSelectedBlock. ([66108](https://github.com/WordPress/gutenberg/pull/66108)) + +### Code Quality + +#### Block Editor +- ESLint: Remove explicit `react-hooks/exhaustive-deps` disabling. ([66461](https://github.com/WordPress/gutenberg/pull/66461)) +- ESLint: Remove various React Compiler mutation violations. ([66327](https://github.com/WordPress/gutenberg/pull/66327)) +- Fix 'useInstanceId' hook reference. ([66406](https://github.com/WordPress/gutenberg/pull/66406)) +- Fix React Compiler error for Duotone. ([66492](https://github.com/WordPress/gutenberg/pull/66492)) +- Fix React Complier error for 'useEventListeners'. ([66495](https://github.com/WordPress/gutenberg/pull/66495)) +- Import only the actually used PostCSS exports. ([66379](https://github.com/WordPress/gutenberg/pull/66379)) +- No need to unlock public actions. ([66260](https://github.com/WordPress/gutenberg/pull/66260)) +- Remove patterns UI stylesheet from iframe. ([66306](https://github.com/WordPress/gutenberg/pull/66306)) +- Remove unnecessary Tooltip component from radius control linked button. ([66274](https://github.com/WordPress/gutenberg/pull/66274)) +- Rich Text: Fix React Complier error for 'useEventListeners'. ([66460](https://github.com/WordPress/gutenberg/pull/66460)) +- Storybook: Add BlockPatternsList story. ([66227](https://github.com/WordPress/gutenberg/pull/66227)) +- Block editor: Remove reusable blocks stylesheet from iframe. ([66285](https://github.com/WordPress/gutenberg/pull/66285)) + + +#### Components +- BorderBoxControl: Deprecate 36px default size. ([65752](https://github.com/WordPress/gutenberg/pull/65752)) +- BorderControl: Deprecate 36px default size. ([65755](https://github.com/WordPress/gutenberg/pull/65755)) +- DrodownMenuV2: Rename folder to `menu`. ([66473](https://github.com/WordPress/gutenberg/pull/66473)) +- ESLint: Stop disabling `react-hooks/exhaustive-deps` rule. ([66324](https://github.com/WordPress/gutenberg/pull/66324)) +- Fix React Compiler error for 'useAutocomplete'. ([66496](https://github.com/WordPress/gutenberg/pull/66496)) +- PaletteEdit: Use `ItemGroup` and `Item`, and avoid custom styles. ([66164](https://github.com/WordPress/gutenberg/pull/66164)) +- TabPanel: Add 40px size prop to tab Button. ([66557](https://github.com/WordPress/gutenberg/pull/66557)) +- Tabs: Align to standard compound components structure. ([66225](https://github.com/WordPress/gutenberg/pull/66225)) +- Tabs: Simplify styled components code. ([66208](https://github.com/WordPress/gutenberg/pull/66208)) + +#### Compose +- Compose: Fix React Complier error for 'useCopyToClipboard'. ([66444](https://github.com/WordPress/gutenberg/pull/66444)) +- Composer: Fix React Compiler errors for 'useDropZone'. ([66469](https://github.com/WordPress/gutenberg/pull/66469)) + +#### Dataviews +- Fields: Fix React Compiler mutation errors. ([66464](https://github.com/WordPress/gutenberg/pull/66464)) +- Fields: Update a few function definitions. ([66315](https://github.com/WordPress/gutenberg/pull/66315)) +#### Interface +- Interface: Remove duplicate 'withComplementaryAreaContext' file. ([66348](https://github.com/WordPress/gutenberg/pull/66348)) +- Interface: Remove unused private API support. ([66565](https://github.com/WordPress/gutenberg/pull/66565)) +- Interface: Use plugin context hook instead of HoC. ([66362](https://github.com/WordPress/gutenberg/pull/66362)) + +#### Zoom Out +- Bundle behavior in block-editor and add story. ([66240](https://github.com/WordPress/gutenberg/pull/66240)) +- Editor: Handle zoom out state via the 'switchEditorMode' action. ([66262](https://github.com/WordPress/gutenberg/pull/66262)) +- Fix/html scale code quality. ([66181](https://github.com/WordPress/gutenberg/pull/66181)) +- Make useZoomOut hook private. ([66374](https://github.com/WordPress/gutenberg/pull/66374)) +- Remove double click to exit hook from the block-editor package. ([66335](https://github.com/WordPress/gutenberg/pull/66335)) +- Remove viewport check from useZoomOut hook. ([66341](https://github.com/WordPress/gutenberg/pull/66341)) + +#### Post Editor +- Editor: No need to reset mode when changing device preview types. ([66261](https://github.com/WordPress/gutenberg/pull/66261)) +- Editor: Use plugin context hook in 'PluginMoreMenuItem'. ([66351](https://github.com/WordPress/gutenberg/pull/66351)) +- Editor: Use plugin context hook in 'PluginPreviewMenuItem'. ([66350](https://github.com/WordPress/gutenberg/pull/66350)) +- Fix typo after #63669. ([66396](https://github.com/WordPress/gutenberg/pull/66396)) +- Remove leftover JS code from 66451. ([66472](https://github.com/WordPress/gutenberg/pull/66472)) + +#### Block Library +- Cleanup unnecessary notice removal. ([66409](https://github.com/WordPress/gutenberg/pull/66409)) +- ESLint: Fix a couple of React Compiler reassignment errors. ([66331](https://github.com/WordPress/gutenberg/pull/66331)) +- Footnotes: Remove extra callback when parsing content. ([66370](https://github.com/WordPress/gutenberg/pull/66370)) +- Gallery: Fix React Compiler reassignment error. ([66408](https://github.com/WordPress/gutenberg/pull/66408)) +- Table Block: Remove hasArrowIndicator prop. ([66204](https://github.com/WordPress/gutenberg/pull/66204)) + +#### Style Book +- Avoid state/effect combo when generating values. ([66446](https://github.com/WordPress/gutenberg/pull/66446)) +- Fix React Compiler error. ([66445](https://github.com/WordPress/gutenberg/pull/66445)) + +#### Global Styles +- Clean up: Adjust reusable-blocks dependencies. ([66302](https://github.com/WordPress/gutenberg/pull/66302)) +- Fix React Compiler variable mutation error. ([66410](https://github.com/WordPress/gutenberg/pull/66410)) +- Theme JSON: Get_block_nodes - relocate $selectors assignment. ([66265](https://github.com/WordPress/gutenberg/pull/66265)) + +#### Interactivity API +- Interactivity API: Add comments to the `deepMerge()` function. ([66220](https://github.com/WordPress/gutenberg/pull/66220)) +- Interactivity API: Add tests for handling arrays in `deepMerge()`. ([66218](https://github.com/WordPress/gutenberg/pull/66218)) +- Interactivity API: Delay block hydration to allow interactive block stores to initialize. ([66772])(https://github.com/WordPress/gutenberg/pull/66772) + +#### Site Editor +- Prepare route registration by refactoring the site editor router. ([66030](https://github.com/WordPress/gutenberg/pull/66030)) +- Navigation: Improve trigger for fallback navigation. ([66478](https://github.com/WordPress/gutenberg/pull/66478)) +#### Build Tooling +- Scripts: Refactor to extract license logic. ([66179](https://github.com/WordPress/gutenberg/pull/66179)) +- Plugins: Deprecate 'withPluginContext' HOC. ([66363](https://github.com/WordPress/gutenberg/pull/66363)) + +### Tools + +#### Testing +- Fix [Flaky Test] Entering zoomed out mode zooms the canvas. ([66212](https://github.com/WordPress/gutenberg/pull/66212)) +- Fix end-to-end test for padding appender. ([66080](https://github.com/WordPress/gutenberg/pull/66080)) +- Upgrade Playwright to v1.48. ([66296](https://github.com/WordPress/gutenberg/pull/66296)) + +#### Build Tooling +- Add new private `vips` package. ([64845](https://github.com/WordPress/gutenberg/pull/64845)) +- Revert "Use npm workspaces for packages". ([66270](https://github.com/WordPress/gutenberg/pull/66270)) +- Add theme type to the bug report issue template. ([63851](https://github.com/WordPress/gutenberg/pull/63851)) +- Pull request automation: Use full npm install. ([66314](https://github.com/WordPress/gutenberg/pull/66314)) +- Use npm workspaces for packages (second attempt). ([66272](https://github.com/WordPress/gutenberg/pull/66272)) + + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @AhmarZaidi: Remove toggle verb from post list data views 'Toggle details panel'. ([66334](https://github.com/WordPress/gutenberg/pull/66334)) +- @mediaformat: Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. ([66147](https://github.com/WordPress/gutenberg/pull/66147)) +- @nicolasgalvez: WP Scripts: Add a `--root-folder` argument to the `plugin-zip` command. ([61375](https://github.com/WordPress/gutenberg/pull/61375)) +- @poojabhimani12: Add Inline comment experimental flag. ([60622](https://github.com/WordPress/gutenberg/pull/60622)) +- @rinkalpagdar: Border support added to comments. ([66354](https://github.com/WordPress/gutenberg/pull/66354)) +- @rudrakshi-gupta: Add Transformation from Separator to Spacer. ([66230](https://github.com/WordPress/gutenberg/pull/66230)) +- @SH4LIN: GH-66090: Self nesting and circular nesting block fix. ([66121](https://github.com/WordPress/gutenberg/pull/66121)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @AhmarZaidi @akasunil @andrewserong @arthur791004 @carolinan @cbravobernal @ciampo @dhruvang21 @ellatrix @getdave @gigitux @hbhalodia @jameskoster @jeryj @jsnajdr @juanfra @madhusudhand @MaggieCabrera @Mamaduka @mattrwalker @mcsf @mediaformat @michalczaplinski @mirka @mreishus @ndiego @nicolasgalvez @ntsekouras @oandregal @PARTHVATALIYA @peterwilsoncc @poojabhimani12 @prajapatisagar @ramonjd @renatho @rinkalpagdar @rudrakshi-gupta @ryanwelcher @SantosGuillamot @SH4LIN @sirreal @stokesman @swissspidy @t-hamano @talldan @tellthemachines @torounit @troychaplin @tyxla @vipul0425 @Vrishabhsk @vykes-mac @westonruter @youknowriad @zaguiini + + += 19.5.1 = + + +Error: There are no unreleased pull requests associated with the milestone. + at fetchAllPullRequests (/home/runner/work/gutenberg/gutenberg/bin/plugin/commands/changelog.js:721:10) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async createChangelog (/home/runner/work/gutenberg/gutenberg/bin/plugin/commands/changelog.js:1031:24) + at async getReleaseChangelog (/home/runner/work/gutenberg/gutenberg/bin/plugin/commands/changelog.js:1057:2) + at async Command. (/home/runner/work/gutenberg/gutenberg/bin/plugin/cli.js:11:4) + + += 19.6.0-rc.2 = + +## Changelog + +### Enhancements + +- BlockGroupToolbar: Better i18n context for toolbar labels. ([66211](https://github.com/WordPress/gutenberg/pull/66211)) +- Core Data: Add the 'getEntitiesConfig' resolver. ([65871](https://github.com/WordPress/gutenberg/pull/65871)) +- Create Block: Adds `--target-dir` flag to allow the tool to target where to scaffold. ([53781](https://github.com/WordPress/gutenberg/pull/53781)) +- Editor Interface: Remove small header from global styles/plugin sidebar. ([64474](https://github.com/WordPress/gutenberg/pull/64474)) +- Remove purple coloring from DocumentBar and PostCard. ([66451](https://github.com/WordPress/gutenberg/pull/66451)) +- Scripts: Add BlueOak-1.0.0 license to GPL2 compatible. ([66139](https://github.com/WordPress/gutenberg/pull/66139)) +- WP Scripts: Add a `--root-folder` argument to the `plugin-zip` command. ([61375](https://github.com/WordPress/gutenberg/pull/61375)) + +#### Components +- Add elevation tokens to storybook. ([66122](https://github.com/WordPress/gutenberg/pull/66122)) +- Add foundations:Elevation to storybook. ([66124](https://github.com/WordPress/gutenberg/pull/66124)) +- Add radius foundation and tokens to storybook. ([66219](https://github.com/WordPress/gutenberg/pull/66219)) +- Combobox, FormTokenField: Show message when no matches found. ([66142](https://github.com/WordPress/gutenberg/pull/66142)) +- Storybook: Organizes components under 'Utilities'. ([66210](https://github.com/WordPress/gutenberg/pull/66210)) +- Tabs: Expose active tab item props, use ariakit prop types. ([66223](https://github.com/WordPress/gutenberg/pull/66223)) +- Tabs: Remove custom logic. ([66097](https://github.com/WordPress/gutenberg/pull/66097)) +- `DropdownMenuV2`: Rename to `Menu`. ([66289](https://github.com/WordPress/gutenberg/pull/66289)) + +#### Block Library +- Add Transformation from Separator to Spacer. ([66230](https://github.com/WordPress/gutenberg/pull/66230)) +- Add lightbox option in gallery block link control. ([64014](https://github.com/WordPress/gutenberg/pull/64014)) +- Archives: Add border block support. ([63400](https://github.com/WordPress/gutenberg/pull/63400)) +- Border support added to comments. ([66354](https://github.com/WordPress/gutenberg/pull/66354)) +- Cover Block: Add Image Resolution options. ([62926](https://github.com/WordPress/gutenberg/pull/62926)) +- HTML Block: Force HTML preview in view mode. ([66440](https://github.com/WordPress/gutenberg/pull/66440)) + +#### Zoom Out +- Add keyboard shortcut in editor. ([66400](https://github.com/WordPress/gutenberg/pull/66400)) +- Iterate zoom out shuffle into a more visual control. ([66194](https://github.com/WordPress/gutenberg/pull/66194)) +- Use the zoom-level value to scale the iframe. ([66280](https://github.com/WordPress/gutenberg/pull/66280)) + +#### Site Editor +- Remove synchronization of canvas mode into store. ([66213](https://github.com/WordPress/gutenberg/pull/66213)) +- Style Book: Clean up layout. ([66255](https://github.com/WordPress/gutenberg/pull/66255)) +- Update site icon and title position. ([66171](https://github.com/WordPress/gutenberg/pull/66171)) + +#### Data Views +- Fix alignment of action items in list layout. ([66273](https://github.com/WordPress/gutenberg/pull/66273)) +- Templates: Hide media field in list view. ([66573](https://github.com/WordPress/gutenberg/pull/66573)) + +#### Global Styles +- Backport: Caching of global styles for blocks from core. ([66349](https://github.com/WordPress/gutenberg/pull/66349)) +- Style Book: Add color tab. ([65692](https://github.com/WordPress/gutenberg/pull/65692)) + +#### Real-time Collaboration +- Inline Commenting: Disable comments on published posts for now. ([66583](https://github.com/WordPress/gutenberg/pull/66583)) + +#### Post Editor +- Set `ResizableEditor` height based on border-box. ([66342](https://github.com/WordPress/gutenberg/pull/66342)) + +#### Icons +- Add align-item related icons. ([66242](https://github.com/WordPress/gutenberg/pull/66242)) + +#### REST API +- Backport from WordPress core: Improvements for the post format query loop filter. ([66037](https://github.com/WordPress/gutenberg/pull/66037)) + + +### New APIs + +- Stabilize isPreviewMode flag. ([66149](https://github.com/WordPress/gutenberg/pull/66149)) +- scripts: Add build-blocks-manifest command. ([65866](https://github.com/WordPress/gutenberg/pull/65866)) + + +### Bug Fixes + +- Create block: Ensure $slug is replaced with passed slug. ([66528](https://github.com/WordPress/gutenberg/pull/66528)) +- Fix extraneous scrollbar in device previews. ([66494](https://github.com/WordPress/gutenberg/pull/66494)) +- GH-66090: Self nesting and circular nesting block fix. ([66121](https://github.com/WordPress/gutenberg/pull/66121)) +- Global styles: Move preload paths filter to 6.7 (previously 6.8). ([66543](https://github.com/WordPress/gutenberg/pull/66543)) +- Miscellaneous i18n fixes. ([66510](https://github.com/WordPress/gutenberg/pull/66510)) +- Remove most of the occurrences of the verb toggle. ([66371](https://github.com/WordPress/gutenberg/pull/66371)) +- SpacingSizesControl: Use generic label for linked button. ([66304](https://github.com/WordPress/gutenberg/pull/66304)) + +#### Zoom Out +- Disable zoom out toggle button when Style Book is open. ([66228](https://github.com/WordPress/gutenberg/pull/66228)) +- Don't switch editor mode when changing entities. ([66452](https://github.com/WordPress/gutenberg/pull/66452)) +- Fix scaling animation for device previews. ([66132](https://github.com/WordPress/gutenberg/pull/66132)) +- Fix zoom out not persisting while switching between editor and code editor. ([65932](https://github.com/WordPress/gutenberg/pull/65932)) +- Fix zoom out shortcut on Windows. ([66506](https://github.com/WordPress/gutenberg/pull/66506)) +- Fix: Activate zoom out on large viewport. ([66308](https://github.com/WordPress/gutenberg/pull/66308)) +- Hide slots and grouping buttons. ([66243](https://github.com/WordPress/gutenberg/pull/66243)) +- Remove zoom-out toolbar. ([66039](https://github.com/WordPress/gutenberg/pull/66039)) +- Resets the Zoom on viewed/edited entity change. ([66232](https://github.com/WordPress/gutenberg/pull/66232)) +- Revise zoom layout shift fix. ([66390](https://github.com/WordPress/gutenberg/pull/66390)) +- Zoom-out: Rely on zoom-level instead of zoom-out mode. ([66141](https://github.com/WordPress/gutenberg/pull/66141)) + +#### Block Editor +- Block inserter: Prevent editor from crashing if `blockType.parent` is a string. ([66234](https://github.com/WordPress/gutenberg/pull/66234)) +- Block toolbar: Account for scrollable blocks that affect the position of the block toolbar. ([66188](https://github.com/WordPress/gutenberg/pull/66188)) +- Fix extra scrollbar appearing when searching in the inserter. ([66229](https://github.com/WordPress/gutenberg/pull/66229)) +- Fix: Show paragraph block variations in rich text inserter. ([66318](https://github.com/WordPress/gutenberg/pull/66318)) +- Group: Fix padding select. ([65857](https://github.com/WordPress/gutenberg/pull/65857)) +- Link Shortcut: Only trigger the link shortcut if there's a text selection. ([66056](https://github.com/WordPress/gutenberg/pull/66056)) +- Remove relative position from sidebar tabpanel. ([66267](https://github.com/WordPress/gutenberg/pull/66267)) +- Rich text: Remove empty file. ([66553](https://github.com/WordPress/gutenberg/pull/66553)) +- Zoom Out: Fix bouncy drop zones. ([66399](https://github.com/WordPress/gutenberg/pull/66399)) + +#### Components +- ColorPalette: Prevent overflow of custom color button background. ([66152](https://github.com/WordPress/gutenberg/pull/66152)) +- Fix: Text overflow in Patterns filter. ([66504](https://github.com/WordPress/gutenberg/pull/66504)) +- RadioGroup: Fix arrow key navigation in RTL. ([66202](https://github.com/WordPress/gutenberg/pull/66202)) +- Tabs and TabPanel: Fix arrow key navigation in RTL. ([66201](https://github.com/WordPress/gutenberg/pull/66201)) +- Tabs and ToggleGroupControl: Round indicator size. ([66426](https://github.com/WordPress/gutenberg/pull/66426)) +- Tabs: Fix animation timings. ([66198](https://github.com/WordPress/gutenberg/pull/66198)) +- Tabs: Override tablist's tabindex only when necessary. ([66209](https://github.com/WordPress/gutenberg/pull/66209)) +- Tabs: Restore vertical alignment for tabs content. ([66215](https://github.com/WordPress/gutenberg/pull/66215)) +- Tabs: Update indicator more reactively. ([66207](https://github.com/WordPress/gutenberg/pull/66207)) + +#### Post Editor +- Always force iframe in pattern editor. ([65887](https://github.com/WordPress/gutenberg/pull/65887)) +- Editor: Multi-entity saving: Show correct count of entities to be saved. ([66482](https://github.com/WordPress/gutenberg/pull/66482)) +- Fix : "Set featured image" button border flashes on focus. ([66092](https://github.com/WordPress/gutenberg/pull/66092)) +- Fix Parent Check Condition in `buildTermsTree`. ([66006](https://github.com/WordPress/gutenberg/pull/66006)) +- Fix: Improve the DocumentBar post type label for the Homepage and Posts Page cases. ([66355](https://github.com/WordPress/gutenberg/pull/66355)) +- PostTaxonomiesFlatTermSelector: Restore space between tag list and most used tags. ([66566](https://github.com/WordPress/gutenberg/pull/66566)) + +#### Block Library +- Block registration: Normalize blockType.parent to `array`. ([66250](https://github.com/WordPress/gutenberg/pull/66250)) +- Button Block: Apply Stretch Styles Correctly. ([64770](https://github.com/WordPress/gutenberg/pull/64770)) +- Buttons: Fix the initial white space in nofollow rel. ([66303](https://github.com/WordPress/gutenberg/pull/66303)) +- Fix - Image block: Aspect ratio not responding when dimensions are not set. ([66217](https://github.com/WordPress/gutenberg/pull/66217)) +- Navigation block: Fix block appender size. ([66153](https://github.com/WordPress/gutenberg/pull/66153)) + +#### Site Editor +- Edit Site: Fix canvasMode var. ([66316](https://github.com/WordPress/gutenberg/pull/66316)) +- Fix button hover style in sidebar navigation screen. ([66505](https://github.com/WordPress/gutenberg/pull/66505)) +- Remove toggle verb from post list data views 'Toggle details panel'. ([66334](https://github.com/WordPress/gutenberg/pull/66334)) +- Revert 66431 (Site editor: Remove "default" admin CSS). ([66540](https://github.com/WordPress/gutenberg/pull/66540)) +- Restore block-library editor.css outside canvas. ([66556](https://github.com/WordPress/gutenberg/pull/66556)) + +#### Meta Boxes +- Typo metabox pane is a meta box panel. ([66502](https://github.com/WordPress/gutenberg/pull/66502)) + +#### REST API +- Preload: Fix multiple regressions around global styles. ([66468](https://github.com/WordPress/gutenberg/pull/66468)) + +#### Style Book +- Fix comment output in styles. ([66439](https://github.com/WordPress/gutenberg/pull/66439)) + +#### Saving +- Site editor: Fix save shortcut. ([66423](https://github.com/WordPress/gutenberg/pull/66423)) + +#### CSS & Styling +- Fix the navigation issue inside cover blocks. ([66093](https://github.com/WordPress/gutenberg/pull/66093)) + + +### Accessibility + +- Update the speak messages when switching editor modes. ([66278](https://github.com/WordPress/gutenberg/pull/66278)) + +#### Post Editor +- Add featured image alt text. ([66189](https://github.com/WordPress/gutenberg/pull/66189)) +- Fix : Badge Color contrast. ([66360](https://github.com/WordPress/gutenberg/pull/66360)) + +#### Block Editor +- ImageSizeControls: Replace ButtonGroup with ToggleGroupControl. ([65386](https://github.com/WordPress/gutenberg/pull/65386)) +- Improve the link preview accessibility and labels. ([60908](https://github.com/WordPress/gutenberg/pull/60908)) + +#### Block Library +- Search: Replace ButtonGroup usage with ToggleGroupControl. ([65340](https://github.com/WordPress/gutenberg/pull/65340)) + +#### Global Styles +- Global styles menu: Avoid visible labels and accessible names mismatch. ([65124](https://github.com/WordPress/gutenberg/pull/65124)) + +#### Site Editor +- Fix Global styles panel header buttons text overlap for 'Show button text labels'. ([63243](https://github.com/WordPress/gutenberg/pull/63243)) + + +### Performance + +- Backport from Core: Reuse block metadata in WP_Theme_JSON::Get_valid_block_style_variations() for better performance. ([66539](https://github.com/WordPress/gutenberg/pull/66539)) +- tests : - Fix/compare performance with correct branch. ([66196](https://github.com/WordPress/gutenberg/pull/66196)) + +#### Site Editor +- Remove "default" admin CSS. ([66431](https://github.com/WordPress/gutenberg/pull/66431)) +- Remove content styles outside canvas. ([66432](https://github.com/WordPress/gutenberg/pull/66432)) + +#### Block bindings +- Use `getEntityConfig` instead of `getPostTypes` to get available slugs. ([66101](https://github.com/WordPress/gutenberg/pull/66101)) + + +### Experiments + +- Add Inline comment experimental flag. ([60622](https://github.com/WordPress/gutenberg/pull/60622)) +- QuickEdit: Add slug field control. ([65196](https://github.com/WordPress/gutenberg/pull/65196)) + +#### Data Views +- Quick Edit: Fix JS error when bulk editing pages. ([66358](https://github.com/WordPress/gutenberg/pull/66358)) +- QuickEdit: Add Featured Image Control. ([64496](https://github.com/WordPress/gutenberg/pull/64496)) +- QuickEdit: Add Parent field. ([66527](https://github.com/WordPress/gutenberg/pull/66527)) + + +### Documentation + +- BaseControl: Auto-generate readme. ([66500](https://github.com/WordPress/gutenberg/pull/66500)) +- Components: Prevent generated readmes duplicating h1 elements when published. ([66180](https://github.com/WordPress/gutenberg/pull/66180)) +- Correct documentation on display type in flow layouts. ([66224](https://github.com/WordPress/gutenberg/pull/66224)) +- Docs: Interactivity API - Add documentation for `getServerState()` and `getServerContext()`. ([66104](https://github.com/WordPress/gutenberg/pull/66104)) +- Fix undo/redo Button size in Storybook playground. ([66538](https://github.com/WordPress/gutenberg/pull/66538)) +- Fix: JSON Schema Docgen doesn't work on Windows OS. ([66414](https://github.com/WordPress/gutenberg/pull/66414)) +- ItemGroup: Improve stories to default to bordered and separated. ([66191](https://github.com/WordPress/gutenberg/pull/66191)) +- README: Add Storybook badge. ([66529](https://github.com/WordPress/gutenberg/pull/66529)) +- Remove meetings that no longer occur from Contributor Guide. ([66421](https://github.com/WordPress/gutenberg/pull/66421)) +- Site editor routes: Add documentation for areas and prevent `edit` area from rendering when canvas is `edit`. ([66309](https://github.com/WordPress/gutenberg/pull/66309)) +- Update documentation about build process changes. ([66428](https://github.com/WordPress/gutenberg/pull/66428)) +- docs: Example for getSelectedBlock. ([66108](https://github.com/WordPress/gutenberg/pull/66108)) + + +### Code Quality + +- Block editor: Remove reusable blocks stylesheet from iframe. ([66285](https://github.com/WordPress/gutenberg/pull/66285)) +- Compose: Fix React Complier error for 'useCopyToClipboard'. ([66444](https://github.com/WordPress/gutenberg/pull/66444)) +- Composer: Fix React Compiler errors for 'useDropZone'. ([66469](https://github.com/WordPress/gutenberg/pull/66469)) +- Fields: Fix React Compiler mutation errors. ([66464](https://github.com/WordPress/gutenberg/pull/66464)) +- Interface: Remove duplicate 'withComplementaryAreaContext' file. ([66348](https://github.com/WordPress/gutenberg/pull/66348)) +- Interface: Remove unused private API support. ([66565](https://github.com/WordPress/gutenberg/pull/66565)) +- Interface: Use plugin context hook instead of HoC. ([66362](https://github.com/WordPress/gutenberg/pull/66362)) +- Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. ([66147](https://github.com/WordPress/gutenberg/pull/66147)) +- Scripts: Refactor to extract license logic. ([66179](https://github.com/WordPress/gutenberg/pull/66179)) +- Theme JSON: Get_block_nodes - relocate $selectors assignment. ([66265](https://github.com/WordPress/gutenberg/pull/66265)) +- Update a few function definitions. ([66315](https://github.com/WordPress/gutenberg/pull/66315)) + +#### Block Editor +- ESLint: Remove explicit `react-hooks/exhaustive-deps` disabling. ([66461](https://github.com/WordPress/gutenberg/pull/66461)) +- ESLint: Remove various React Compiler mutation violations. ([66327](https://github.com/WordPress/gutenberg/pull/66327)) +- Fix 'useInstanceId' hook reference. ([66406](https://github.com/WordPress/gutenberg/pull/66406)) +- Fix React Compiler error for Duotone. ([66492](https://github.com/WordPress/gutenberg/pull/66492)) +- Fix React Complier error for 'useEventListeners'. ([66495](https://github.com/WordPress/gutenberg/pull/66495)) +- Import only the actually used PostCSS exports. ([66379](https://github.com/WordPress/gutenberg/pull/66379)) +- No need to unlock public actions. ([66260](https://github.com/WordPress/gutenberg/pull/66260)) +- Remove patterns UI stylesheet from iframe. ([66306](https://github.com/WordPress/gutenberg/pull/66306)) +- Remove unnecessary Tooltip component from radius control linked button. ([66274](https://github.com/WordPress/gutenberg/pull/66274)) +- Rich Text: Fix React Complier error for 'useEventListeners'. ([66460](https://github.com/WordPress/gutenberg/pull/66460)) +- Storybook: Add BlockPatternsList story. ([66227](https://github.com/WordPress/gutenberg/pull/66227)) + +#### Components +- BorderBoxControl: Deprecate 36px default size. ([65752](https://github.com/WordPress/gutenberg/pull/65752)) +- BorderControl: Deprecate 36px default size. ([65755](https://github.com/WordPress/gutenberg/pull/65755)) +- DrodownMenuV2: Rename folder to `menu`. ([66473](https://github.com/WordPress/gutenberg/pull/66473)) +- ESLint: Stop disabling `react-hooks/exhaustive-deps` rule. ([66324](https://github.com/WordPress/gutenberg/pull/66324)) +- Fix React Compiler error for 'useAutocomplete'. ([66496](https://github.com/WordPress/gutenberg/pull/66496)) +- PaletteEdit: Use `ItemGroup` and `Item`, and avoid custom styles. ([66164](https://github.com/WordPress/gutenberg/pull/66164)) +- TabPanel: Add 40px size prop to tab Button. ([66557](https://github.com/WordPress/gutenberg/pull/66557)) +- Tabs: Align to standard compound components structure. ([66225](https://github.com/WordPress/gutenberg/pull/66225)) +- Tabs: Simplify styled components code. ([66208](https://github.com/WordPress/gutenberg/pull/66208)) + +#### Zoom Out +- Bundle behavior in block-editor and add story. ([66240](https://github.com/WordPress/gutenberg/pull/66240)) +- Editor: Handle zoom out state via the 'switchEditorMode' action. ([66262](https://github.com/WordPress/gutenberg/pull/66262)) +- Fix/html scale code quality. ([66181](https://github.com/WordPress/gutenberg/pull/66181)) +- Make useZoomOut hook private. ([66374](https://github.com/WordPress/gutenberg/pull/66374)) +- Remove double click to exit hook from the block-editor package. ([66335](https://github.com/WordPress/gutenberg/pull/66335)) +- Remove viewport check from useZoomOut hook. ([66341](https://github.com/WordPress/gutenberg/pull/66341)) + +#### Post Editor +- Editor: No need to reset mode when changing device preview types. ([66261](https://github.com/WordPress/gutenberg/pull/66261)) +- Editor: Use plugin context hook in 'PluginMoreMenuItem'. ([66351](https://github.com/WordPress/gutenberg/pull/66351)) +- Editor: Use plugin context hook in 'PluginPreviewMenuItem'. ([66350](https://github.com/WordPress/gutenberg/pull/66350)) +- Fix typo after #63669. ([66396](https://github.com/WordPress/gutenberg/pull/66396)) +- Remove leftover JS code from 66451. ([66472](https://github.com/WordPress/gutenberg/pull/66472)) + +#### Block Library +- Cleanup unnecessary notice removal. ([66409](https://github.com/WordPress/gutenberg/pull/66409)) +- ESLint: Fix a couple of React Compiler reassignment errors. ([66331](https://github.com/WordPress/gutenberg/pull/66331)) +- Footnotes: Remove extra callback when parsing content. ([66370](https://github.com/WordPress/gutenberg/pull/66370)) +- Gallery: Fix React Compiler reassignment error. ([66408](https://github.com/WordPress/gutenberg/pull/66408)) +- Table Block: Remove hasArrowIndicator prop. ([66204](https://github.com/WordPress/gutenberg/pull/66204)) + +#### Style Book +- Avoid state/effect combo when generating values. ([66446](https://github.com/WordPress/gutenberg/pull/66446)) +- Fix React Compiler error. ([66445](https://github.com/WordPress/gutenberg/pull/66445)) + +#### Global Styles +- Clean up: Adjust reusable-blocks dependencies. ([66302](https://github.com/WordPress/gutenberg/pull/66302)) +- Fix React Compiler variable mutation error. ([66410](https://github.com/WordPress/gutenberg/pull/66410)) + +#### Interactivity API +- iAPI: Add comments to the `deepMerge()` function. ([66220](https://github.com/WordPress/gutenberg/pull/66220)) +- iAPI: Add tests for handling arrays in `deepMerge()`. ([66218](https://github.com/WordPress/gutenberg/pull/66218)) + +#### Navigation in Site View +- Navigation: Improve trigger for fallback navigation. ([66478](https://github.com/WordPress/gutenberg/pull/66478)) + +#### Plugins API +- Plugins: Deprecate 'withPluginContext' HOC. ([66363](https://github.com/WordPress/gutenberg/pull/66363)) + +#### Site Editor +- Prepare route registration by refactoring the site editor router. ([66030](https://github.com/WordPress/gutenberg/pull/66030)) + + +### Tools + +- Add theme type to the bug report issue template. ([63851](https://github.com/WordPress/gutenberg/pull/63851)) +- Pull request automation: Use full npm install. ([66314](https://github.com/WordPress/gutenberg/pull/66314)) +- Use npm workspaces for packages (second attempt). ([66272](https://github.com/WordPress/gutenberg/pull/66272)) + +#### Testing +- Fix [Flaky Test] Entering zoomed out mode zooms the canvas. ([66212](https://github.com/WordPress/gutenberg/pull/66212)) +- Fix end-to-end test for padding appender. ([66080](https://github.com/WordPress/gutenberg/pull/66080)) +- Upgrade Playwright to v1.48. ([66296](https://github.com/WordPress/gutenberg/pull/66296)) + +#### Build Tooling +- Add new private `vips` package. ([64845](https://github.com/WordPress/gutenberg/pull/64845)) +- Revert "Use npm workspaces for packages". ([66270](https://github.com/WordPress/gutenberg/pull/66270)) + + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @AhmarZaidi: Remove toggle verb from post list data views 'Toggle details panel'. ([66334](https://github.com/WordPress/gutenberg/pull/66334)) +- @mediaformat: Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. ([66147](https://github.com/WordPress/gutenberg/pull/66147)) +- @nicolasgalvez: WP Scripts: Add a `--root-folder` argument to the `plugin-zip` command. ([61375](https://github.com/WordPress/gutenberg/pull/61375)) +- @poojabhimani12: Add Inline comment experimental flag. ([60622](https://github.com/WordPress/gutenberg/pull/60622)) +- @rinkalpagdar: Border support added to comments. ([66354](https://github.com/WordPress/gutenberg/pull/66354)) +- @rudrakshi-gupta: Add Transformation from Separator to Spacer. ([66230](https://github.com/WordPress/gutenberg/pull/66230)) +- @SH4LIN: GH-66090: Self nesting and circular nesting block fix. ([66121](https://github.com/WordPress/gutenberg/pull/66121)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @AhmarZaidi @akasunil @andrewserong @carolinan @cbravobernal @ciampo @dhruvang21 @ellatrix @getdave @gigitux @hbhalodia @jameskoster @jeryj @jsnajdr @juanfra @madhusudhand @MaggieCabrera @Mamaduka @mattrwalker @mcsf @mediaformat @michalczaplinski @mirka @mreishus @ndiego @nicolasgalvez @ntsekouras @oandregal @PARTHVATALIYA @peterwilsoncc @poojabhimani12 @prajapatisagar @ramonjd @renatho @rinkalpagdar @rudrakshi-gupta @ryanwelcher @SantosGuillamot @SH4LIN @sirreal @stokesman @swissspidy @t-hamano @talldan @tellthemachines @torounit @troychaplin @tyxla @vipul0425 @Vrishabhsk @vykes-mac @youknowriad @zaguiini + + += 19.6.0-rc.1 = + +## Changelog + +### Enhancements + +- BlockGroupToolbar: Better i18n context for toolbar labels. ([66211](https://github.com/WordPress/gutenberg/pull/66211)) +- Core Data: Add the 'getEntitiesConfig' resolver. ([65871](https://github.com/WordPress/gutenberg/pull/65871)) +- Create Block: Adds `--target-dir` flag to allow the tool to target where to scaffold. ([53781](https://github.com/WordPress/gutenberg/pull/53781)) +- Editor Interface: Remove small header from global styles/plugin sidebar. ([64474](https://github.com/WordPress/gutenberg/pull/64474)) +- Remove purple coloring from DocumentBar and PostCard. ([66451](https://github.com/WordPress/gutenberg/pull/66451)) +- Scripts: Add BlueOak-1.0.0 license to GPL2 compatible. ([66139](https://github.com/WordPress/gutenberg/pull/66139)) +- WP Scripts: Add a `--root-folder` argument to the `plugin-zip` command. ([61375](https://github.com/WordPress/gutenberg/pull/61375)) + +#### Components +- Add elevation tokens to storybook. ([66122](https://github.com/WordPress/gutenberg/pull/66122)) +- Add foundations:Elevation to storybook. ([66124](https://github.com/WordPress/gutenberg/pull/66124)) +- Add radius foundation and tokens to storybook. ([66219](https://github.com/WordPress/gutenberg/pull/66219)) +- Combobox, FormTokenField: Show message when no matches found. ([66142](https://github.com/WordPress/gutenberg/pull/66142)) +- Storybook: Organizes components under 'Utilities'. ([66210](https://github.com/WordPress/gutenberg/pull/66210)) +- Tabs: Expose active tab item props, use ariakit prop types. ([66223](https://github.com/WordPress/gutenberg/pull/66223)) +- Tabs: Remove custom logic. ([66097](https://github.com/WordPress/gutenberg/pull/66097)) +- `DropdownMenuV2`: Rename to `Menu`. ([66289](https://github.com/WordPress/gutenberg/pull/66289)) + +#### Block Library +- Add Transformation from Separator to Spacer. ([66230](https://github.com/WordPress/gutenberg/pull/66230)) +- Add lightbox option in gallery block link control. ([64014](https://github.com/WordPress/gutenberg/pull/64014)) +- Archives: Add border block support. ([63400](https://github.com/WordPress/gutenberg/pull/63400)) +- Border support added to comments. ([66354](https://github.com/WordPress/gutenberg/pull/66354)) +- Cover Block: Add Image Resolution options. ([62926](https://github.com/WordPress/gutenberg/pull/62926)) +- HTML Block: Force HTML preview in view mode. ([66440](https://github.com/WordPress/gutenberg/pull/66440)) + +#### Zoom Out +- Add keyboard shortcut in editor. ([66400](https://github.com/WordPress/gutenberg/pull/66400)) +- Iterate zoom out shuffle into a more visual control. ([66194](https://github.com/WordPress/gutenberg/pull/66194)) +- Use the zoom-level value to scale the iframe. ([66280](https://github.com/WordPress/gutenberg/pull/66280)) + +#### Site Editor +- Remove synchronization of canvas mode into store. ([66213](https://github.com/WordPress/gutenberg/pull/66213)) +- Style Book: Clean up layout. ([66255](https://github.com/WordPress/gutenberg/pull/66255)) +- Update site icon and title position. ([66171](https://github.com/WordPress/gutenberg/pull/66171)) + +#### Data Views +- Fix alignment of action items in list layout. ([66273](https://github.com/WordPress/gutenberg/pull/66273)) +- Templates: Hide media field in list view. ([66573](https://github.com/WordPress/gutenberg/pull/66573)) + +#### Global Styles +- Backport: Caching of global styles for blocks from core. ([66349](https://github.com/WordPress/gutenberg/pull/66349)) +- Style Book: Add color tab. ([65692](https://github.com/WordPress/gutenberg/pull/65692)) + +#### Real-time Collaboration +- Inline Commenting: Disable comments on published posts for now. ([66583](https://github.com/WordPress/gutenberg/pull/66583)) + +#### Post Editor +- Set `ResizableEditor` height based on border-box. ([66342](https://github.com/WordPress/gutenberg/pull/66342)) + +#### Icons +- Add align-item related icons. ([66242](https://github.com/WordPress/gutenberg/pull/66242)) + +#### REST API +- Backport from WordPress core: Improvements for the post format query loop filter. ([66037](https://github.com/WordPress/gutenberg/pull/66037)) + + +### New APIs + +- Stabilize isPreviewMode flag. ([66149](https://github.com/WordPress/gutenberg/pull/66149)) +- scripts: Add build-blocks-manifest command. ([65866](https://github.com/WordPress/gutenberg/pull/65866)) + + +### Bug Fixes + +- Create block: Ensure $slug is replaced with passed slug. ([66528](https://github.com/WordPress/gutenberg/pull/66528)) +- Fix extraneous scrollbar in device previews. ([66494](https://github.com/WordPress/gutenberg/pull/66494)) +- GH-66090: Self nesting and circular nesting block fix. ([66121](https://github.com/WordPress/gutenberg/pull/66121)) +- Global styles: Move preload paths filter to 6.7 (previously 6.8). ([66543](https://github.com/WordPress/gutenberg/pull/66543)) +- Miscellaneous i18n fixes. ([66510](https://github.com/WordPress/gutenberg/pull/66510)) +- Remove most of the occurrences of the verb toggle. ([66371](https://github.com/WordPress/gutenberg/pull/66371)) +- SpacingSizesControl: Use generic label for linked button. ([66304](https://github.com/WordPress/gutenberg/pull/66304)) + +#### Zoom Out +- Disable zoom out toggle button when Style Book is open. ([66228](https://github.com/WordPress/gutenberg/pull/66228)) +- Don't switch editor mode when changing entities. ([66452](https://github.com/WordPress/gutenberg/pull/66452)) +- Fix scaling animation for device previews. ([66132](https://github.com/WordPress/gutenberg/pull/66132)) +- Fix zoom out not persisting while switching between editor and code editor. ([65932](https://github.com/WordPress/gutenberg/pull/65932)) +- Fix zoom out shortcut on Windows. ([66506](https://github.com/WordPress/gutenberg/pull/66506)) +- Fix: Activate zoom out on large viewport. ([66308](https://github.com/WordPress/gutenberg/pull/66308)) +- Hide slots and grouping buttons. ([66243](https://github.com/WordPress/gutenberg/pull/66243)) +- Remove zoom-out toolbar. ([66039](https://github.com/WordPress/gutenberg/pull/66039)) +- Resets the Zoom on viewed/edited entity change. ([66232](https://github.com/WordPress/gutenberg/pull/66232)) +- Revise zoom layout shift fix. ([66390](https://github.com/WordPress/gutenberg/pull/66390)) +- Zoom-out: Rely on zoom-level instead of zoom-out mode. ([66141](https://github.com/WordPress/gutenberg/pull/66141)) + +#### Block Editor +- Block inserter: Prevent editor from crashing if `blockType.parent` is a string. ([66234](https://github.com/WordPress/gutenberg/pull/66234)) +- Block toolbar: Account for scrollable blocks that affect the position of the block toolbar. ([66188](https://github.com/WordPress/gutenberg/pull/66188)) +- Fix extra scrollbar appearing when searching in the inserter. ([66229](https://github.com/WordPress/gutenberg/pull/66229)) +- Fix: Show paragraph block variations in rich text inserter. ([66318](https://github.com/WordPress/gutenberg/pull/66318)) +- Group: Fix padding select. ([65857](https://github.com/WordPress/gutenberg/pull/65857)) +- Link Shortcut: Only trigger the link shortcut if there's a text selection. ([66056](https://github.com/WordPress/gutenberg/pull/66056)) +- Remove relative position from sidebar tabpanel. ([66267](https://github.com/WordPress/gutenberg/pull/66267)) +- Rich text: Remove empty file. ([66553](https://github.com/WordPress/gutenberg/pull/66553)) +- Zoom Out: Fix bouncy drop zones. ([66399](https://github.com/WordPress/gutenberg/pull/66399)) + +#### Components +- ColorPalette: Prevent overflow of custom color button background. ([66152](https://github.com/WordPress/gutenberg/pull/66152)) +- Fix: Text overflow in Patterns filter. ([66504](https://github.com/WordPress/gutenberg/pull/66504)) +- RadioGroup: Fix arrow key navigation in RTL. ([66202](https://github.com/WordPress/gutenberg/pull/66202)) +- Tabs and TabPanel: Fix arrow key navigation in RTL. ([66201](https://github.com/WordPress/gutenberg/pull/66201)) +- Tabs and ToggleGroupControl: Round indicator size. ([66426](https://github.com/WordPress/gutenberg/pull/66426)) +- Tabs: Fix animation timings. ([66198](https://github.com/WordPress/gutenberg/pull/66198)) +- Tabs: Override tablist's tabindex only when necessary. ([66209](https://github.com/WordPress/gutenberg/pull/66209)) +- Tabs: Restore vertical alignment for tabs content. ([66215](https://github.com/WordPress/gutenberg/pull/66215)) +- Tabs: Update indicator more reactively. ([66207](https://github.com/WordPress/gutenberg/pull/66207)) + +#### Post Editor +- Always force iframe in pattern editor. ([65887](https://github.com/WordPress/gutenberg/pull/65887)) +- Editor: Multi-entity saving: Show correct count of entities to be saved. ([66482](https://github.com/WordPress/gutenberg/pull/66482)) +- Fix : "Set featured image" button border flashes on focus. ([66092](https://github.com/WordPress/gutenberg/pull/66092)) +- Fix Parent Check Condition in `buildTermsTree`. ([66006](https://github.com/WordPress/gutenberg/pull/66006)) +- Fix: Improve the DocumentBar post type label for the Homepage and Posts Page cases. ([66355](https://github.com/WordPress/gutenberg/pull/66355)) +- PostTaxonomiesFlatTermSelector: Restore space between tag list and most used tags. ([66566](https://github.com/WordPress/gutenberg/pull/66566)) + +#### Block Library +- Block registration: Normalize blockType.parent to `array`. ([66250](https://github.com/WordPress/gutenberg/pull/66250)) +- Button Block: Apply Stretch Styles Correctly. ([64770](https://github.com/WordPress/gutenberg/pull/64770)) +- Buttons: Fix the initial white space in nofollow rel. ([66303](https://github.com/WordPress/gutenberg/pull/66303)) +- Fix - Image block: Aspect ratio not responding when dimensions are not set. ([66217](https://github.com/WordPress/gutenberg/pull/66217)) +- Navigation block: Fix block appender size. ([66153](https://github.com/WordPress/gutenberg/pull/66153)) + +#### Site Editor +- Edit Site: Fix canvasMode var. ([66316](https://github.com/WordPress/gutenberg/pull/66316)) +- Fix button hover style in sidebar navigation screen. ([66505](https://github.com/WordPress/gutenberg/pull/66505)) +- Remove toggle verb from post list data views 'Toggle details panel'. ([66334](https://github.com/WordPress/gutenberg/pull/66334)) +- Revert 66431 (Site editor: Remove "default" admin CSS). ([66540](https://github.com/WordPress/gutenberg/pull/66540)) + +#### Meta Boxes +- Typo metabox pane is a meta box panel. ([66502](https://github.com/WordPress/gutenberg/pull/66502)) + +#### REST API +- Preload: Fix multiple regressions around global styles. ([66468](https://github.com/WordPress/gutenberg/pull/66468)) + +#### Style Book +- Fix comment output in styles. ([66439](https://github.com/WordPress/gutenberg/pull/66439)) + +#### Saving +- Site editor: Fix save shortcut. ([66423](https://github.com/WordPress/gutenberg/pull/66423)) + +#### CSS & Styling +- Fix the navigation issue inside cover blocks. ([66093](https://github.com/WordPress/gutenberg/pull/66093)) + + +### Accessibility + +- Update the speak messages when switching editor modes. ([66278](https://github.com/WordPress/gutenberg/pull/66278)) + +#### Post Editor +- Add featured image alt text. ([66189](https://github.com/WordPress/gutenberg/pull/66189)) +- Fix : Badge Color contrast. ([66360](https://github.com/WordPress/gutenberg/pull/66360)) + +#### Block Editor +- ImageSizeControls: Replace ButtonGroup with ToggleGroupControl. ([65386](https://github.com/WordPress/gutenberg/pull/65386)) +- Improve the link preview accessibility and labels. ([60908](https://github.com/WordPress/gutenberg/pull/60908)) + +#### Block Library +- Search: Replace ButtonGroup usage with ToggleGroupControl. ([65340](https://github.com/WordPress/gutenberg/pull/65340)) + +#### Global Styles +- Global styles menu: Avoid visible labels and accessible names mismatch. ([65124](https://github.com/WordPress/gutenberg/pull/65124)) + +#### Site Editor +- Fix Global styles panel header buttons text overlap for 'Show button text labels'. ([63243](https://github.com/WordPress/gutenberg/pull/63243)) + + +### Performance + +- Backport from Core: Reuse block metadata in WP_Theme_JSON::Get_valid_block_style_variations() for better performance. ([66539](https://github.com/WordPress/gutenberg/pull/66539)) +- tests : - Fix/compare performance with correct branch. ([66196](https://github.com/WordPress/gutenberg/pull/66196)) + +#### Site Editor +- Remove "default" admin CSS. ([66431](https://github.com/WordPress/gutenberg/pull/66431)) +- Remove content styles outside canvas. ([66432](https://github.com/WordPress/gutenberg/pull/66432)) + +#### Block bindings +- Use `getEntityConfig` instead of `getPostTypes` to get available slugs. ([66101](https://github.com/WordPress/gutenberg/pull/66101)) + + +### Experiments + +- Add Inline comment experimental flag. ([60622](https://github.com/WordPress/gutenberg/pull/60622)) +- QuickEdit: Add slug field control. ([65196](https://github.com/WordPress/gutenberg/pull/65196)) + +#### Data Views +- Quick Edit: Fix JS error when bulk editing pages. ([66358](https://github.com/WordPress/gutenberg/pull/66358)) +- QuickEdit: Add Featured Image Control. ([64496](https://github.com/WordPress/gutenberg/pull/64496)) +- QuickEdit: Add Parent field. ([66527](https://github.com/WordPress/gutenberg/pull/66527)) + + +### Documentation + +- BaseControl: Auto-generate readme. ([66500](https://github.com/WordPress/gutenberg/pull/66500)) +- Components: Prevent generated readmes duplicating h1 elements when published. ([66180](https://github.com/WordPress/gutenberg/pull/66180)) +- Correct documentation on display type in flow layouts. ([66224](https://github.com/WordPress/gutenberg/pull/66224)) +- Docs: Interactivity API - Add documentation for `getServerState()` and `getServerContext()`. ([66104](https://github.com/WordPress/gutenberg/pull/66104)) +- Fix undo/redo Button size in Storybook playground. ([66538](https://github.com/WordPress/gutenberg/pull/66538)) +- Fix: JSON Schema Docgen doesn't work on Windows OS. ([66414](https://github.com/WordPress/gutenberg/pull/66414)) +- ItemGroup: Improve stories to default to bordered and separated. ([66191](https://github.com/WordPress/gutenberg/pull/66191)) +- README: Add Storybook badge. ([66529](https://github.com/WordPress/gutenberg/pull/66529)) +- Remove meetings that no longer occur from Contributor Guide. ([66421](https://github.com/WordPress/gutenberg/pull/66421)) +- Site editor routes: Add documentation for areas and prevent `edit` area from rendering when canvas is `edit`. ([66309](https://github.com/WordPress/gutenberg/pull/66309)) +- Update documentation about build process changes. ([66428](https://github.com/WordPress/gutenberg/pull/66428)) +- docs: Example for getSelectedBlock. ([66108](https://github.com/WordPress/gutenberg/pull/66108)) + + +### Code Quality + +- Block editor: Remove reusable blocks stylesheet from iframe. ([66285](https://github.com/WordPress/gutenberg/pull/66285)) +- Compose: Fix React Complier error for 'useCopyToClipboard'. ([66444](https://github.com/WordPress/gutenberg/pull/66444)) +- Composer: Fix React Compiler errors for 'useDropZone'. ([66469](https://github.com/WordPress/gutenberg/pull/66469)) +- Fields: Fix React Compiler mutation errors. ([66464](https://github.com/WordPress/gutenberg/pull/66464)) +- Interface: Remove duplicate 'withComplementaryAreaContext' file. ([66348](https://github.com/WordPress/gutenberg/pull/66348)) +- Interface: Remove unused private API support. ([66565](https://github.com/WordPress/gutenberg/pull/66565)) +- Interface: Use plugin context hook instead of HoC. ([66362](https://github.com/WordPress/gutenberg/pull/66362)) +- Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. ([66147](https://github.com/WordPress/gutenberg/pull/66147)) +- Scripts: Refactor to extract license logic. ([66179](https://github.com/WordPress/gutenberg/pull/66179)) +- Theme JSON: Get_block_nodes - relocate $selectors assignment. ([66265](https://github.com/WordPress/gutenberg/pull/66265)) +- Update a few function definitions. ([66315](https://github.com/WordPress/gutenberg/pull/66315)) + +#### Block Editor +- ESLint: Remove explicit `react-hooks/exhaustive-deps` disabling. ([66461](https://github.com/WordPress/gutenberg/pull/66461)) +- ESLint: Remove various React Compiler mutation violations. ([66327](https://github.com/WordPress/gutenberg/pull/66327)) +- Fix 'useInstanceId' hook reference. ([66406](https://github.com/WordPress/gutenberg/pull/66406)) +- Fix React Compiler error for Duotone. ([66492](https://github.com/WordPress/gutenberg/pull/66492)) +- Fix React Complier error for 'useEventListeners'. ([66495](https://github.com/WordPress/gutenberg/pull/66495)) +- Import only the actually used PostCSS exports. ([66379](https://github.com/WordPress/gutenberg/pull/66379)) +- No need to unlock public actions. ([66260](https://github.com/WordPress/gutenberg/pull/66260)) +- Remove patterns UI stylesheet from iframe. ([66306](https://github.com/WordPress/gutenberg/pull/66306)) +- Remove unnecessary Tooltip component from radius control linked button. ([66274](https://github.com/WordPress/gutenberg/pull/66274)) +- Rich Text: Fix React Complier error for 'useEventListeners'. ([66460](https://github.com/WordPress/gutenberg/pull/66460)) +- Storybook: Add BlockPatternsList story. ([66227](https://github.com/WordPress/gutenberg/pull/66227)) + +#### Components +- BorderBoxControl: Deprecate 36px default size. ([65752](https://github.com/WordPress/gutenberg/pull/65752)) +- BorderControl: Deprecate 36px default size. ([65755](https://github.com/WordPress/gutenberg/pull/65755)) +- DrodownMenuV2: Rename folder to `menu`. ([66473](https://github.com/WordPress/gutenberg/pull/66473)) +- ESLint: Stop disabling `react-hooks/exhaustive-deps` rule. ([66324](https://github.com/WordPress/gutenberg/pull/66324)) +- Fix React Compiler error for 'useAutocomplete'. ([66496](https://github.com/WordPress/gutenberg/pull/66496)) +- PaletteEdit: Use `ItemGroup` and `Item`, and avoid custom styles. ([66164](https://github.com/WordPress/gutenberg/pull/66164)) +- TabPanel: Add 40px size prop to tab Button. ([66557](https://github.com/WordPress/gutenberg/pull/66557)) +- Tabs: Align to standard compound components structure. ([66225](https://github.com/WordPress/gutenberg/pull/66225)) +- Tabs: Simplify styled components code. ([66208](https://github.com/WordPress/gutenberg/pull/66208)) + +#### Zoom Out +- Bundle behavior in block-editor and add story. ([66240](https://github.com/WordPress/gutenberg/pull/66240)) +- Editor: Handle zoom out state via the 'switchEditorMode' action. ([66262](https://github.com/WordPress/gutenberg/pull/66262)) +- Fix/html scale code quality. ([66181](https://github.com/WordPress/gutenberg/pull/66181)) +- Make useZoomOut hook private. ([66374](https://github.com/WordPress/gutenberg/pull/66374)) +- Remove double click to exit hook from the block-editor package. ([66335](https://github.com/WordPress/gutenberg/pull/66335)) +- Remove viewport check from useZoomOut hook. ([66341](https://github.com/WordPress/gutenberg/pull/66341)) + +#### Post Editor +- Editor: No need to reset mode when changing device preview types. ([66261](https://github.com/WordPress/gutenberg/pull/66261)) +- Editor: Use plugin context hook in 'PluginMoreMenuItem'. ([66351](https://github.com/WordPress/gutenberg/pull/66351)) +- Editor: Use plugin context hook in 'PluginPreviewMenuItem'. ([66350](https://github.com/WordPress/gutenberg/pull/66350)) +- Fix typo after #63669. ([66396](https://github.com/WordPress/gutenberg/pull/66396)) +- Remove leftover JS code from 66451. ([66472](https://github.com/WordPress/gutenberg/pull/66472)) + +#### Block Library +- Cleanup unnecessary notice removal. ([66409](https://github.com/WordPress/gutenberg/pull/66409)) +- ESLint: Fix a couple of React Compiler reassignment errors. ([66331](https://github.com/WordPress/gutenberg/pull/66331)) +- Footnotes: Remove extra callback when parsing content. ([66370](https://github.com/WordPress/gutenberg/pull/66370)) +- Gallery: Fix React Compiler reassignment error. ([66408](https://github.com/WordPress/gutenberg/pull/66408)) +- Table Block: Remove hasArrowIndicator prop. ([66204](https://github.com/WordPress/gutenberg/pull/66204)) + +#### Style Book +- Avoid state/effect combo when generating values. ([66446](https://github.com/WordPress/gutenberg/pull/66446)) +- Fix React Compiler error. ([66445](https://github.com/WordPress/gutenberg/pull/66445)) + +#### Global Styles +- Clean up: Adjust reusable-blocks dependencies. ([66302](https://github.com/WordPress/gutenberg/pull/66302)) +- Fix React Compiler variable mutation error. ([66410](https://github.com/WordPress/gutenberg/pull/66410)) + +#### Interactivity API +- iAPI: Add comments to the `deepMerge()` function. ([66220](https://github.com/WordPress/gutenberg/pull/66220)) +- iAPI: Add tests for handling arrays in `deepMerge()`. ([66218](https://github.com/WordPress/gutenberg/pull/66218)) + +#### Navigation in Site View +- Navigation: Improve trigger for fallback navigation. ([66478](https://github.com/WordPress/gutenberg/pull/66478)) + +#### Plugins API +- Plugins: Deprecate 'withPluginContext' HOC. ([66363](https://github.com/WordPress/gutenberg/pull/66363)) + +#### Site Editor +- Prepare route registration by refactoring the site editor router. ([66030](https://github.com/WordPress/gutenberg/pull/66030)) + + +### Tools + +- Add theme type to the bug report issue template. ([63851](https://github.com/WordPress/gutenberg/pull/63851)) +- Pull request automation: Use full npm install. ([66314](https://github.com/WordPress/gutenberg/pull/66314)) +- Use npm workspaces for packages (second attempt). ([66272](https://github.com/WordPress/gutenberg/pull/66272)) + +#### Testing +- Fix [Flaky Test] Entering zoomed out mode zooms the canvas. ([66212](https://github.com/WordPress/gutenberg/pull/66212)) +- Fix end-to-end test for padding appender. ([66080](https://github.com/WordPress/gutenberg/pull/66080)) +- Upgrade Playwright to v1.48. ([66296](https://github.com/WordPress/gutenberg/pull/66296)) + +#### Build Tooling +- Add new private `vips` package. ([64845](https://github.com/WordPress/gutenberg/pull/64845)) +- Revert "Use npm workspaces for packages". ([66270](https://github.com/WordPress/gutenberg/pull/66270)) + + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @AhmarZaidi: Remove toggle verb from post list data views 'Toggle details panel'. ([66334](https://github.com/WordPress/gutenberg/pull/66334)) +- @mediaformat: Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. ([66147](https://github.com/WordPress/gutenberg/pull/66147)) +- @nicolasgalvez: WP Scripts: Add a `--root-folder` argument to the `plugin-zip` command. ([61375](https://github.com/WordPress/gutenberg/pull/61375)) +- @poojabhimani12: Add Inline comment experimental flag. ([60622](https://github.com/WordPress/gutenberg/pull/60622)) +- @rinkalpagdar: Border support added to comments. ([66354](https://github.com/WordPress/gutenberg/pull/66354)) +- @rudrakshi-gupta: Add Transformation from Separator to Spacer. ([66230](https://github.com/WordPress/gutenberg/pull/66230)) +- @SH4LIN: GH-66090: Self nesting and circular nesting block fix. ([66121](https://github.com/WordPress/gutenberg/pull/66121)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @AhmarZaidi @akasunil @andrewserong @carolinan @cbravobernal @ciampo @dhruvang21 @ellatrix @getdave @gigitux @hbhalodia @jameskoster @jeryj @jsnajdr @juanfra @madhusudhand @MaggieCabrera @Mamaduka @mattrwalker @mcsf @mediaformat @michalczaplinski @mirka @mreishus @ndiego @nicolasgalvez @ntsekouras @oandregal @PARTHVATALIYA @peterwilsoncc @poojabhimani12 @prajapatisagar @ramonjd @renatho @rinkalpagdar @rudrakshi-gupta @ryanwelcher @SantosGuillamot @SH4LIN @sirreal @stokesman @swissspidy @t-hamano @talldan @tellthemachines @torounit @troychaplin @tyxla @vipul0425 @Vrishabhsk @vykes-mac @youknowriad @zaguiini + + += 19.5.0 = + +## Changelog + +### Enhancements + +- Remove the verb Toggle from the Block Inserter button. ([65983](https://github.com/WordPress/gutenberg/pull/65983)) +- Update jsdom to 25.0.1. ([65879](https://github.com/WordPress/gutenberg/pull/65879)) +- Write/Design tool: Persist as a user preference. ([65945](https://github.com/WordPress/gutenberg/pull/65945)) + +#### Zoom Out +- Make zoom transition smoother. ([66017](https://github.com/WordPress/gutenberg/pull/66017)) +- Try zooming out when selecting the patterns tab in the inserter. ([65785](https://github.com/WordPress/gutenberg/pull/65785)) +- Update/replace edit button with enter on selection. ([65760](https://github.com/WordPress/gutenberg/pull/65760)) + +#### Block Editor +- Cleanup `AutoBlockPreview` render memoization of `BlockList`. ([66060](https://github.com/WordPress/gutenberg/pull/66060)) +- Use shallow memo for prioritized inserter blocks. ([65737](https://github.com/WordPress/gutenberg/pull/65737)) + +#### Components +- Add type tokens to storybook. ([65993](https://github.com/WordPress/gutenberg/pull/65993)) +- Storybook: Add stub doc on existing colors. ([65982](https://github.com/WordPress/gutenberg/pull/65982)) + +#### Icons +- Update "hidden" icon to be clearer, and invert logic as used in Data Views. ([65914](https://github.com/WordPress/gutenberg/pull/65914)) +- Update cloud upload and add cloud download icon. ([65906](https://github.com/WordPress/gutenberg/pull/65906)) + +#### Global Styles +- Improve navigation logic for revisions screen. ([65946](https://github.com/WordPress/gutenberg/pull/65946)) + +#### Block bindings +- Register bindings sources in widgets screens. ([65937](https://github.com/WordPress/gutenberg/pull/65937)) + +#### Block Library +- Cover Block: Refactor setting panel. ([65432](https://github.com/WordPress/gutenberg/pull/65432)) + + +### Bug Fixes + +- Add argument with post ID to the editor.savePost hook. ([66165](https://github.com/WordPress/gutenberg/pull/66165)) +- Backport from WordPress Core: improve performance of WP_Theme_JSON::Merge when merging background styles. ([66002](https://github.com/WordPress/gutenberg/pull/66002)) +- BlockCanvas: Fix the height prop and width of the block editor. ([65977](https://github.com/WordPress/gutenberg/pull/65977)) +- Correct capability for the Experiments page. ([66118](https://github.com/WordPress/gutenberg/pull/66118)) +- Fix rich text toolbar corners. ([66163](https://github.com/WordPress/gutenberg/pull/66163)) +- Fix: Add missing `post.slug` dependency to `useMemo`. ([66125](https://github.com/WordPress/gutenberg/pull/66125)) +- Fix: Return result from wp_register_block_template function. ([66102](https://github.com/WordPress/gutenberg/pull/66102)) +- List all active fonts in the typography section. ([65806](https://github.com/WordPress/gutenberg/pull/65806)) + +#### Zoom Out +- Exit zoom out when mode is changed. ([65975](https://github.com/WordPress/gutenberg/pull/65975)) +- Fix scaling issues. ([65998](https://github.com/WordPress/gutenberg/pull/65998)) +- Fix zoom reflow by replacing border with padding. ([66012](https://github.com/WordPress/gutenberg/pull/66012)) +- Focus first section root block if no selected block and tabbing to zoom out canvas. ([65843](https://github.com/WordPress/gutenberg/pull/65843)) +- Make zoom out vertical toolbar consistent. ([65627](https://github.com/WordPress/gutenberg/pull/65627)) +- Polish zoom out inserter. ([66110](https://github.com/WordPress/gutenberg/pull/66110)) +- Position scaled html within available container space. ([66034](https://github.com/WordPress/gutenberg/pull/66034)) +- Restores setting zoom out mode to useZoomOut hook. ([65999](https://github.com/WordPress/gutenberg/pull/65999)) +- Use consistent canvas frame spacing on device preview and zoom out. ([66018](https://github.com/WordPress/gutenberg/pull/66018)) +- Zoom layout shift: Second alternate fix. ([66041](https://github.com/WordPress/gutenberg/pull/66041)) + +#### Block Library +- Code block: Set LTR direction for RTL languages. ([65891](https://github.com/WordPress/gutenberg/pull/65891)) +- Fix duotone on parallax/repeated featured image cover blocks. ([65929](https://github.com/WordPress/gutenberg/pull/65929)) +- Fix: Embed Block: Match HTML in the editor and frontend. ([65478](https://github.com/WordPress/gutenberg/pull/65478)) +- Hide grid visualizer when grid is template locked or block editing mode is not default. ([66065](https://github.com/WordPress/gutenberg/pull/66065)) +- Post Content Block: Fix conflict between clearFix and focus ring in the editor. ([65364](https://github.com/WordPress/gutenberg/pull/65364)) +- Post Content: Fix display of block support styles. ([66003](https://github.com/WordPress/gutenberg/pull/66003)) +- Post Terms: Fix fatal error when 'get_the_term_list' returns 'WP_Error'. ([65848](https://github.com/WordPress/gutenberg/pull/65848)) +- Query Loop: Fix isControlAllowed and isTemplate combined logic. ([65984](https://github.com/WordPress/gutenberg/pull/65984)) +- Query Loop: Fix query type indicator. ([65877](https://github.com/WordPress/gutenberg/pull/65877)) +- Revert "Update z-index hierarchy". ([66074](https://github.com/WordPress/gutenberg/pull/66074)) + +#### Block bindings +- Accept client ID as parameter for `useBlockBindingsUtils`. ([65818](https://github.com/WordPress/gutenberg/pull/65818)) +- Allow label override when it is defined in client registration. ([66160](https://github.com/WordPress/gutenberg/pull/66160)) +- Bootstrap server sources earlier. ([66058](https://github.com/WordPress/gutenberg/pull/66058)) +- Fix: Don't render image when `src` attribute is empty. ([66004](https://github.com/WordPress/gutenberg/pull/66004)) +- Allow the field types matching attribute types in bindings. ([66174](https://github.com/WordPress/gutenberg/pull/66174)) + +#### Global Styles +- Always preview style variations using desktop device type. ([66023](https://github.com/WordPress/gutenberg/pull/66023)) +- Improve Navigator usage in typography panel. ([65942](https://github.com/WordPress/gutenberg/pull/65942)) +- Leave screen if current shadow entry gets deleted. ([65935](https://github.com/WordPress/gutenberg/pull/65935)) +- `PaletteEdit`: Dedupe palette element slugs. ([65772](https://github.com/WordPress/gutenberg/pull/65772)) + +#### Block Editor +- Fix DropZone class names on drop. ([65798](https://github.com/WordPress/gutenberg/pull/65798)) +- Fix padding appender hook. ([66143](https://github.com/WordPress/gutenberg/pull/66143)) +- Memoize pattern objects returned from getAllowedPatterns. ([66159](https://github.com/WordPress/gutenberg/pull/66159)) + +#### Components +- Fix : Secondary Button Transition. ([66045](https://github.com/WordPress/gutenberg/pull/66045)) +- Global Styles: Fix overflow caused by RangeControl tooltip. ([65875](https://github.com/WordPress/gutenberg/pull/65875)) +- ToggleGroupControl: Don't set value on focus after a reset. ([66151](https://github.com/WordPress/gutenberg/pull/66151)) + +#### Interactivity API +- Allow "default" suffix values. ([65815](https://github.com/WordPress/gutenberg/pull/65815)) +- Correctly handle lazily added, deeply nested properties with `deepMerge()`. ([65465](https://github.com/WordPress/gutenberg/pull/65465)) +- Improvements to the experimental full-page navigation. ([64067](https://github.com/WordPress/gutenberg/pull/64067)) + +#### Site Editor +- Fix site editor back button visual regressions. ([66166](https://github.com/WordPress/gutenberg/pull/66166)) +- Zoom Out: When double clicking a template while zoomed out , reset zoom level instead of showing dialog. ([65963](https://github.com/WordPress/gutenberg/pull/65963)) + +#### CSS & Styling +- Editor: Prevent wrapping text when showing icon labels in header. ([66038](https://github.com/WordPress/gutenberg/pull/66038)) +- Update z-index hierarchy. ([65626](https://github.com/WordPress/gutenberg/pull/65626)) + +#### Data Views +- Data Views list layout: Revise for improved text truncation. ([65376](https://github.com/WordPress/gutenberg/pull/65376)) +- Fix: Pattern rendering issue. ([66022](https://github.com/WordPress/gutenberg/pull/66022)) + +#### Extensibility +- Rename wp_register_block_template() to register_block_template(). ([65958](https://github.com/WordPress/gutenberg/pull/65958)) + +#### Post Editor +- Fix "typewriter" spacing style application. ([65885](https://github.com/WordPress/gutenberg/pull/65885)) + +#### Synced Patterns +- Pattern block: Ensure consistent editing of overrides in Write Mode. ([65408](https://github.com/WordPress/gutenberg/pull/65408)) + + +### Accessibility + +#### Post Editor +- Fix meta boxes accessibility. ([65466](https://github.com/WordPress/gutenberg/pull/65466)) +- Fix navigate regions shortcuts on the back button WP logo slot. ([63611](https://github.com/WordPress/gutenberg/pull/63611)) +- Improve PostURL terminology and accessibility. ([63669](https://github.com/WordPress/gutenberg/pull/63669)) +- Match visible label of search inputs with their actual label. ([65458](https://github.com/WordPress/gutenberg/pull/65458)) + +#### Components +- Fixed : Modal dialog: Small improvement for elementShouldBeHidden. ([65941](https://github.com/WordPress/gutenberg/pull/65941)) +- ToggleGroupControl: Don't autoselect option on first group focus. ([65892](https://github.com/WordPress/gutenberg/pull/65892)) +- Tooltip: Add aria-describedby to anchor only if not redundant. ([65989](https://github.com/WordPress/gutenberg/pull/65989)) + +#### Typography +- Revert the "Manage fonts" button in Global Styles. ([66107](https://github.com/WordPress/gutenberg/pull/66107)) + + +### Performance + +#### Interactivity API +- Leverage scheduler.yield in splitTask when available. ([66001](https://github.com/WordPress/gutenberg/pull/66001)) + + +### Documentation + +- Add heading level curation documentation. ([66076](https://github.com/WordPress/gutenberg/pull/66076)) +- Components: Set up README auto-generator. ([66035](https://github.com/WordPress/gutenberg/pull/66035)) +- Contrast notes: Update 4.6:1 note with further context. ([66168](https://github.com/WordPress/gutenberg/pull/66168)) +- Data-basics/4-building-a-create-page-form is ready now. ([66100](https://github.com/WordPress/gutenberg/pull/66100)) +- Docs: env: Expand examples of path syntax. ([65972](https://github.com/WordPress/gutenberg/pull/65972)) +- Updated several typos in client-assets.php file. ([66084](https://github.com/WordPress/gutenberg/pull/66084)) +- Use correct label in PHP Backport documentation. ([65908](https://github.com/WordPress/gutenberg/pull/65908)) +- add: Usage examples in core editor documentation. ([63768](https://github.com/WordPress/gutenberg/pull/63768)) + + +### Code Quality + +- .screen-reader-text CSS update for responsive-block-control style.scss. ([66145](https://github.com/WordPress/gutenberg/pull/66145)) +- Add missing CHANGELOG entries for #64067. ([66120](https://github.com/WordPress/gutenberg/pull/66120)) +- Button: Move to stricter lint rule for 40px size adherence. ([65840](https://github.com/WordPress/gutenberg/pull/65840)) +- Private APIs: Remove obsolete try/catch block. ([65898](https://github.com/WordPress/gutenberg/pull/65898)) +- Remove clip and -webkit-clip for block-library common.scss. ([66144](https://github.com/WordPress/gutenberg/pull/66144)) +- Remove unused select toolbar code. ([65834](https://github.com/WordPress/gutenberg/pull/65834)) +- Simplify logical expression in `InitPatternModal`. ([65922](https://github.com/WordPress/gutenberg/pull/65922)) +- Theme JSON: Remove redundant check and relocate $selectors assignment. ([66154](https://github.com/WordPress/gutenberg/pull/66154)) +- Type the router package. ([65854](https://github.com/WordPress/gutenberg/pull/65854)) + +#### Global Styles +- Edit Site: Avoid recomputing variations when no theme variations. ([66137](https://github.com/WordPress/gutenberg/pull/66137)) +- Edit Site: Remove redundant state in `StyleVariationsContainer`. ([66130](https://github.com/WordPress/gutenberg/pull/66130)) + +#### Block Library +- Post Terms: Remove unnecessary 'get_the_terms' call. ([65867](https://github.com/WordPress/gutenberg/pull/65867)) +- Query Loop Block: Remove redundant sticky state. ([66126](https://github.com/WordPress/gutenberg/pull/66126)) + +#### Components +- Clean up Tabs animation logic. ([65878](https://github.com/WordPress/gutenberg/pull/65878)) +- SearchControl: Deprecate onClose prop. ([65988](https://github.com/WordPress/gutenberg/pull/65988)) + +#### Post Editor +- Block Visibility: Add end-to-end test. ([65880](https://github.com/WordPress/gutenberg/pull/65880)) + +#### Zoom Out +- Fix components coding standards in Zoom Out Toolbar. ([65858](https://github.com/WordPress/gutenberg/pull/65858)) + + +### Tools + +#### Testing +- Add an end-to-end test to check the interactions in write mode. ([65819](https://github.com/WordPress/gutenberg/pull/65819)) +- Composite: Add legacy unit tests to stable version. ([65952](https://github.com/WordPress/gutenberg/pull/65952)) +- Fix end-to-end Storybook configuration. ([66089](https://github.com/WordPress/gutenberg/pull/66089)) +- Tests: Add unit tests for image rendering. ([66010](https://github.com/WordPress/gutenberg/pull/66010)) +- Zoom out: End-to-end test - zoomed out mode zooms the canvas. ([65943](https://github.com/WordPress/gutenberg/pull/65943)) +- e2e: Fix Block Visibility test. ([65939](https://github.com/WordPress/gutenberg/pull/65939)) + +#### Build Tooling +- Dedupe npm packages. ([65913](https://github.com/WordPress/gutenberg/pull/65913)) +- Update and align babel dependencies version. ([65949](https://github.com/WordPress/gutenberg/pull/65949)) +- Update node-fetch to 2.7.0. ([65957](https://github.com/WordPress/gutenberg/pull/65957)) +- Update npm lockfile to version 3. ([65923](https://github.com/WordPress/gutenberg/pull/65923)) +- Upgrade browserslist and webcompat data packages. ([65926](https://github.com/WordPress/gutenberg/pull/65926)) + + +### Various + +- Consistent with block-development-examples data-basics-59c8f8. ([65995](https://github.com/WordPress/gutenberg/pull/65995)) +- Interactivity: Update preact packages. ([66008](https://github.com/WordPress/gutenberg/pull/66008)) + +#### Patterns +- Revert "Pattern block: Ensure consistent editing of overrides in Write Mode (#65408)". ([65953](https://github.com/WordPress/gutenberg/pull/65953)) + + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @AnmolVerma404: Fix: Return result from wp_register_block_template function. ([66102](https://github.com/WordPress/gutenberg/pull/66102)) +- @leemyongpakva: Consistent with block-development-examples data-basics-59c8f8. ([65995](https://github.com/WordPress/gutenberg/pull/65995)) +- @matt-west: Icons: Update cloud upload and add cloud download icon. ([65906](https://github.com/WordPress/gutenberg/pull/65906)) +- @mediaformat: .screen-reader-text CSS update for responsive-block-control style.scss. ([66145](https://github.com/WordPress/gutenberg/pull/66145)) +- @vk17-starlord: Fixed : Modal dialog: Small improvement for elementShouldBeHidden. ([65941](https://github.com/WordPress/gutenberg/pull/65941)) +- @Vrishabhsk: SearchControl: Deprecate onClose prop. ([65988](https://github.com/WordPress/gutenberg/pull/65988)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @ajlende @akasunil @Aljullu @andrewserong @AnmolVerma404 @ciampo @DaniGuardiola @dhruvang21 @draganescu @getdave @hbhalodia @jameskoster @jasmussen @jeryj @jsnajdr @leemyongpakva @MaggieCabrera @Mamaduka @matiasbenedetto @matt-west @mcsf @mediaformat @michalczaplinski @mikachan @mirka @ndiego @ntsekouras @ramonjd @renatho @richtabor @rmccue @sabernhardt @SantosGuillamot @shail-mehta @sirreal @stokesman @t-hamano @talldan @troychaplin @tyxla @up1512001 @vk17-starlord @Vrishabhsk @westonruter @youknowriad + + + + += 19.4.0 = + +## Changelog + +### Enhancements + +#### Block Library +- Added keywords to query loop block. ([65515](https://github.com/WordPress/gutenberg/pull/65515)) +- Added: DropZone when sitelogo is present. ([65596](https://github.com/WordPress/gutenberg/pull/65596)) +- Avatar: Add block example. ([65509](https://github.com/WordPress/gutenberg/pull/65509)) +- Buttons: add box-sizing:Border-box rule. ([65716](https://github.com/WordPress/gutenberg/pull/65716)) +- Comment Author Name: Add block example. ([65558](https://github.com/WordPress/gutenberg/pull/65558)) +- Comment Content: Add block example. ([65559](https://github.com/WordPress/gutenberg/pull/65559)) +- Comment Date: Add block example. ([65632](https://github.com/WordPress/gutenberg/pull/65632)) +- Comment Edit/Reply Links: Add block examples. ([65601](https://github.com/WordPress/gutenberg/pull/65601)) +- Comment Pagination: Add previous and next link block examples. ([65633](https://github.com/WordPress/gutenberg/pull/65633)) +- Comments Pagination Numbers: Add block example. ([65635](https://github.com/WordPress/gutenberg/pull/65635)) +- Comments Title: Add block example. ([65557](https://github.com/WordPress/gutenberg/pull/65557)) +- File block: Allow content only editing. ([65787](https://github.com/WordPress/gutenberg/pull/65787)) +- Navigation block: Use `apply_block_hooks_to_content()`. ([65703](https://github.com/WordPress/gutenberg/pull/65703)) +- Post Navigation Link: Add block examples. ([65552](https://github.com/WordPress/gutenberg/pull/65552)) +- Query No Results: Add block example. ([65555](https://github.com/WordPress/gutenberg/pull/65555)) +- Query Pagination Numbers: Add block example. ([65636](https://github.com/WordPress/gutenberg/pull/65636)) +- Query Pagination: Add block example. ([65556](https://github.com/WordPress/gutenberg/pull/65556)) +- Query Title: Add block example. ([65554](https://github.com/WordPress/gutenberg/pull/65554)) +- Revert: Time To Read: Add block example. ([65510](https://github.com/WordPress/gutenberg/pull/65510)) +- Table of Contents: Try maintaining block example attributes. ([65549](https://github.com/WordPress/gutenberg/pull/65549)) +- Term Description: Add block example. ([65553](https://github.com/WordPress/gutenberg/pull/65553)) +- Time To Read: Add block example. ([65512](https://github.com/WordPress/gutenberg/pull/65512)) + +#### Components +- Light branding for the reference site. ([65764](https://github.com/WordPress/gutenberg/pull/65764)) +- BorderControl: Use `__next40pxDefaultSize` prop for Reset button. ([65682](https://github.com/WordPress/gutenberg/pull/65682)) +- Composite: Always await initial render setup in unit tests. ([65823](https://github.com/WordPress/gutenberg/pull/65823)) +- DatePicker: Use compact button size. ([65653](https://github.com/WordPress/gutenberg/pull/65653)) +- Guide: Update finish button to use the new default size. ([65680](https://github.com/WordPress/gutenberg/pull/65680)) +- Navigator: Add support for exit animation. ([64777](https://github.com/WordPress/gutenberg/pull/64777)) +- Remove `useEvent` from components package. ([65388](https://github.com/WordPress/gutenberg/pull/65388)) +- Simplify MenuGroup component styles. ([65561](https://github.com/WordPress/gutenberg/pull/65561)) +- Storybook: Allow for case-agnostic filtering of icons. ([65780](https://github.com/WordPress/gutenberg/pull/65780)) +- ToggleGroupControl: Improve animation. ([65175](https://github.com/WordPress/gutenberg/pull/65175)) +- Tabs: Tweak sizing and overflow behavior of TabList. ([64371](https://github.com/WordPress/gutenberg/pull/64371)) +- Tabs: Unify vertical tabs styles. ([65387](https://github.com/WordPress/gutenberg/pull/65387)) + +#### Zoom Out +- Add prompt to zoom out separator. ([65392](https://github.com/WordPress/gutenberg/pull/65392)) +- Make sections `contentOnly` in Zoom Out. ([65396](https://github.com/WordPress/gutenberg/pull/65396)) +- Move the toggle button to before the device preview dropdown. ([65446](https://github.com/WordPress/gutenberg/pull/65446)) +- Only show zoom out inserters on block selection. ([65759](https://github.com/WordPress/gutenberg/pull/65759)) + +#### Block Editor +- Hide block transforms in contentOnly mode for non-content blocks. ([65394](https://github.com/WordPress/gutenberg/pull/65394)) +- Inserter: Always show the list of all patterns in the inserter. ([65611](https://github.com/WordPress/gutenberg/pull/65611)) +- MediaPlaceholder: Use InputControl in URL popover. ([65656](https://github.com/WordPress/gutenberg/pull/65656)) +- Use proper named `File` when uploading external images. ([65693](https://github.com/WordPress/gutenberg/pull/65693)) + +#### Data Views +- DataForm - Add combined fields support. ([65399](https://github.com/WordPress/gutenberg/pull/65399)) +- Filter UI: Remove popover max height. ([65835](https://github.com/WordPress/gutenberg/pull/65835)) +- Dataviews configuration dropdown: Remove style overrides. ([65373](https://github.com/WordPress/gutenberg/pull/65373)) + +#### Post Editor +- Edit Post: Remove unnecessary effect in `InitPatternModal`. ([65734](https://github.com/WordPress/gutenberg/pull/65734)) +- Editor: Consistent external media pre-publish image/button sizes. ([65668](https://github.com/WordPress/gutenberg/pull/65668)) + +#### Global Styles +- Editor Canvas: Tweak close button. ([65694](https://github.com/WordPress/gutenberg/pull/65694)) +- Style book: Create static categories. ([65430](https://github.com/WordPress/gutenberg/pull/65430)) + +#### Edit Mode +- Update tools menus with Write / Design order. ([65721](https://github.com/WordPress/gutenberg/pull/65721)) + +#### Select Mode +- Select Mode: Updates to the block toolbar. ([65485](https://github.com/WordPress/gutenberg/pull/65485)) +- Select Mode: Use the content-only behavior in select mode. ([65204](https://github.com/WordPress/gutenberg/pull/65204)) + +#### Icons +- Adds envelope icon. ([65638](https://github.com/WordPress/gutenberg/pull/65638)) + +#### Site Editor +- Global Styles: Remove navigator screen overrides. ([65522](https://github.com/WordPress/gutenberg/pull/65522)) +- Command Palette: "Add new page" within the site editor creates new page in site editor. ([65476](https://github.com/WordPress/gutenberg/pull/65476)) +- Update elevation in the site editor. ([65410](https://github.com/WordPress/gutenberg/pull/65410)) + +#### Block bindings +- Connected blocks, add backdrop-color. ([65233](https://github.com/WordPress/gutenberg/pull/65233)) + +#### Extensibility +- Stabilize the PreSavePost and SavePost filters. ([64198](https://github.com/WordPress/gutenberg/pull/64198)) + +#### Base Styles +- Base styles: Add type tokens. ([65418](https://github.com/WordPress/gutenberg/pull/65418)) + +#### Tools +- Composer: Allow composer/installers 2.x. ([65356](https://github.com/WordPress/gutenberg/pull/65356)) + +#### Block hooks +- Hooks: Add support for async filters and actions. ([64204](https://github.com/WordPress/gutenberg/pull/64204)) + +### New APIs + +- Revert "Make `wordpress/fields` a private package". ([65477](https://github.com/WordPress/gutenberg/pull/65477)) +- Stabilise role attribute property. ([65484](https://github.com/WordPress/gutenberg/pull/65484)) + +#### Block bindings +- Open the stable editor APIs. ([65713](https://github.com/WordPress/gutenberg/pull/65713)) + +#### Components +- Navigator: Stabilize and export APIs. ([64613](https://github.com/WordPress/gutenberg/pull/64613)) + +### Bug Fixes + +#### Components +- Block Editor: Validate options for the 'HeadingLevelDropdown' component. ([65425](https://github.com/WordPress/gutenberg/pull/65425)) +- Composite: Fix legacy implementation passing store prop. ([65821](https://github.com/WordPress/gutenberg/pull/65821)) +- Composite: Make items tabbable if active element gets removed. ([65720](https://github.com/WordPress/gutenberg/pull/65720)) +- Navigator: Fix isInitial logic. ([65527](https://github.com/WordPress/gutenberg/pull/65527)) +- Restore accidentally removed entries in changelog (components package). ([65804](https://github.com/WordPress/gutenberg/pull/65804)) +- useToolsPanel: Calculate derived state in reducer to prevent too many renders. ([65564](https://github.com/WordPress/gutenberg/pull/65564)) +- useToolsPanel: Calculate menuItems in layout effect to avoid painting intermediate state. ([65494](https://github.com/WordPress/gutenberg/pull/65494)) + +#### Zoom Out +- Fix focus loss when deleting selected block in zoom out mode. ([65761](https://github.com/WordPress/gutenberg/pull/65761)) +- Handle zoom out when changing device preview. ([65444](https://github.com/WordPress/gutenberg/pull/65444)) +- Hide Zoom Out Inserters when dragging into canvas. ([65789](https://github.com/WordPress/gutenberg/pull/65789)) +- Makes spacing consistent in zoom out vertical toolbar. ([63994](https://github.com/WordPress/gutenberg/pull/63994)) +- Remove one occurrence of the verb Toggle from Zoom out control. ([65609](https://github.com/WordPress/gutenberg/pull/65609)) +- Reset zoom out level when device type is changed. ([65652](https://github.com/WordPress/gutenberg/pull/65652)) +- Resize cover block only in normal mode. ([65731](https://github.com/WordPress/gutenberg/pull/65731)) + +#### Block Editor +- Fix unable to remove empty blocks on merge. ([65262](https://github.com/WordPress/gutenberg/pull/65262)) +- Inserter: Fix Block visibility manager. ([65700](https://github.com/WordPress/gutenberg/pull/65700)) +- Link autocompleter: Decode post title HTML entities. ([65589](https://github.com/WordPress/gutenberg/pull/65589)) +- Openverse: Prevent multiple insertions during upload. ([65719](https://github.com/WordPress/gutenberg/pull/65719)) +- Paste Handler: Try to fix pasting text with formatting. ([63779](https://github.com/WordPress/gutenberg/pull/63779)) +- Remove user-select:Text. ([65662](https://github.com/WordPress/gutenberg/pull/65662)) +- Editor: Remove edit template menu item from block settings menu in blocks outside template. ([65560](https://github.com/WordPress/gutenberg/pull/65560)) +- Top Toolbar: Show document bar when no block is selected even if block tools are expanded. ([65839](https://github.com/WordPress/gutenberg/pull/65839)) +- Revert "Allow multi-select on iOS Safari/touch devices". ([65414](https://github.com/WordPress/gutenberg/pull/65414)) + +#### Global Styles +- Avoid errors when a fontSize preset is not available. ([65791](https://github.com/WordPress/gutenberg/pull/65791)) +- Fix: Shadow/Font size preset panel crashes the editor. ([65765](https://github.com/WordPress/gutenberg/pull/65765)) +- Revert "Font Library: Group fonts by source (#63211)". ([65590](https://github.com/WordPress/gutenberg/pull/65590)) +- Tweak entity save panel button. ([65695](https://github.com/WordPress/gutenberg/pull/65695)) + +#### Block bindings +- Fix editing protected custom fields in block bindings. ([65658](https://github.com/WordPress/gutenberg/pull/65658)) +- Fix showing bindings field values in theme templates. ([65639](https://github.com/WordPress/gutenberg/pull/65639)) +- Only pass context included in `usesContext` from rich text component. ([65618](https://github.com/WordPress/gutenberg/pull/65618)) +- Use `registry` instead of `select` in `canUserEditValue`. ([65659](https://github.com/WordPress/gutenberg/pull/65659)) + +#### Block Library +- Categories block: Escape label. ([65540](https://github.com/WordPress/gutenberg/pull/65540)) +- Search block: Reset size correctly when clearing unit control. ([65468](https://github.com/WordPress/gutenberg/pull/65468)) +- Social Links: Fix block appender size. ([65769](https://github.com/WordPress/gutenberg/pull/65769)) + +#### Site Editor +- Fix: Makes edit mode selector persistent in top toolbar mode. ([65511](https://github.com/WordPress/gutenberg/pull/65511)) +- Global styles: Do not navigate twice to home screen when opening the sidebar. ([65523](https://github.com/WordPress/gutenberg/pull/65523)) +- Make resizable frame compatible with RTL languages. ([65545](https://github.com/WordPress/gutenberg/pull/65545)) +- Command Palette: Fix "Add new page" command for hybrid theme. ([65534](https://github.com/WordPress/gutenberg/pull/65534)) +- Export `useResizeObserver` React Native version directly. ([65588](https://github.com/WordPress/gutenberg/pull/65588)) +- Fix `useResizeObserver` bugs. ([65389](https://github.com/WordPress/gutenberg/pull/65389)) +- Fix aria-checked attribute not set for plugin settings buttons in Options dropdown. ([65667](https://github.com/WordPress/gutenberg/pull/65667)) +- Revert "useToolsPanel: Calculate menuItems in layout effect to avoid painting intermediate state". ([65533](https://github.com/WordPress/gutenberg/pull/65533)) + +#### Focus Mode +- Limit zoom out toggle to specific post types. ([65732](https://github.com/WordPress/gutenberg/pull/65732)) + +#### List View +- Fix miscolored icons. ([65707](https://github.com/WordPress/gutenberg/pull/65707)) + +#### Media +- Fix output buffering for cross-origin isolation. ([65701](https://github.com/WordPress/gutenberg/pull/65701)) + +#### Block Directory +- Fix downloadable block item alignment. ([65677](https://github.com/WordPress/gutenberg/pull/65677)) + +#### Typography +- Remove additional Typeset screen and surface typesets in the typography panel. ([65579](https://github.com/WordPress/gutenberg/pull/65579)) + +#### Widgets Editor +- Fixed the focus cutoff of the editor buttons in the widgets editor. ([65395](https://github.com/WordPress/gutenberg/pull/65395)) + +#### Post Editor +- Omit meta boxes on “design” type posts. ([64990](https://github.com/WordPress/gutenberg/pull/64990)) + +#### Data Views +- Fix grid layout padding on small screens. ([64878](https://github.com/WordPress/gutenberg/pull/64878)) + +#### Build Tools +- Babel preset: Add missing pkg files. ([65481](https://github.com/WordPress/gutenberg/pull/65481)) +- Temp disable test for Classic Block Media issue. ([65793](https://github.com/WordPress/gutenberg/pull/65793)) + +#### Select Mode +- Select Mode: Blocks outside the main sections root should be disabled. ([65518](https://github.com/WordPress/gutenberg/pull/65518)) +- Select Mode: Prevent the inbetween inserter from triggering within sections. ([65529](https://github.com/WordPress/gutenberg/pull/65529)) + +### Accessibility + +#### Post Editor +- Make the Settings panel toggle button show its keyboard shortcut in its tooltip. ([65322](https://github.com/WordPress/gutenberg/pull/65322)) +- Resizable Editor: Make the editor resizable with arrow keys. ([65546](https://github.com/WordPress/gutenberg/pull/65546)) + +#### Components +- ToggleGroupControl: Fix arrow key navigation in RTL. ([65735](https://github.com/WordPress/gutenberg/pull/65735)) + +#### Zoom Out +- Don't show tooltip in zoom out toggle button when showIconLabels is true. ([65573](https://github.com/WordPress/gutenberg/pull/65573)) + +#### Block Library +- Improve the Query Loop block display settings labels. ([65524](https://github.com/WordPress/gutenberg/pull/65524)) + +#### Block Editor +- Updates LayoutTypeSwitcher to use ToggleGroupControl. ([65498](https://github.com/WordPress/gutenberg/pull/65498)) + +#### Code Quality +- A11y: Move script module HTML printing to 6.7 compat. ([65620](https://github.com/WordPress/gutenberg/pull/65620)) +- Update to use a11y script module package in Core. ([65539](https://github.com/WordPress/gutenberg/pull/65539)) + +#### Site Editor +- Update icon in home button. ([65497](https://github.com/WordPress/gutenberg/pull/65497)) + +### Performance + +#### Block Library +- Script Modules: Centralize (re)registration. ([65460](https://github.com/WordPress/gutenberg/pull/65460)) + +#### Block Editor +- Remove editorMode from blockProps. ([65326](https://github.com/WordPress/gutenberg/pull/65326)) +- Move insertionPoint state to block-editor store/rename existing insertionPoint to insertionCue. ([65098](https://github.com/WordPress/gutenberg/pull/65098)) + + +### Documentation + +- Block Bindings: Add `@since` tag in bindings apis JSDocs. ([65796](https://github.com/WordPress/gutenberg/pull/65796)) +- Block Editor: Fix README for FontFamilyControl component. ([65660](https://github.com/WordPress/gutenberg/pull/65660)) +- Composite: Add "With Tooltip" storybook example. ([65817](https://github.com/WordPress/gutenberg/pull/65817)) +- DataViews documentation: Add high-level graph explaining DataViews and data sources interaction. ([65457](https://github.com/WordPress/gutenberg/pull/65457)) +- Docs/interactivity api router package readme. ([62062](https://github.com/WordPress/gutenberg/pull/62062)) +- Docs: Remove PHPDoc for non-existing parameter. ([65640](https://github.com/WordPress/gutenberg/pull/65640)) +- Navigator: Fix README heading hierarchy. ([65763](https://github.com/WordPress/gutenberg/pull/65763)) +- Packages documentation: Minor typo corrections. ([65664](https://github.com/WordPress/gutenberg/pull/65664)) +- Plugin: Fix small typo in readme.txt file. ([65634](https://github.com/WordPress/gutenberg/pull/65634)) +- RichText: Fix JSDoc block typos. ([65607](https://github.com/WordPress/gutenberg/pull/65607)) +- SelectControl: Add story for `prefix` slot. ([65730](https://github.com/WordPress/gutenberg/pull/65730)) +- Update JSDoc block for RichText package to-html-string. ([65688](https://github.com/WordPress/gutenberg/pull/65688)) +- Update block-filters.md. ([64959](https://github.com/WordPress/gutenberg/pull/64959)) +- iAPI: Refactor types and add a "Core Concepts - Using TypeScript" guide. ([64577](https://github.com/WordPress/gutenberg/pull/64577)) + +### Code Quality + +#### Components +- BorderBoxControl: Promote to stable. ([65586](https://github.com/WordPress/gutenberg/pull/65586)) +- BorderControl: Promote to stable. ([65475](https://github.com/WordPress/gutenberg/pull/65475)) +- BoxControl: Promote to stable. ([65469](https://github.com/WordPress/gutenberg/pull/65469)) +- Cleanup unused `ToggleGroupControl` configuration values. ([65456](https://github.com/WordPress/gutenberg/pull/65456)) +- Fix `useInstanceId` hook references. ([65733](https://github.com/WordPress/gutenberg/pull/65733)) +- Navigator: Internal refactor in preparation for stabilization. ([65671](https://github.com/WordPress/gutenberg/pull/65671)) +- Navigator: Mark experimental exports as deprecated. ([65802](https://github.com/WordPress/gutenberg/pull/65802)) +- SearchControl: Fix rest props mutation. ([65740](https://github.com/WordPress/gutenberg/pull/65740)) +- `ToggleGroupControl`: Clean up animation logic. ([65808](https://github.com/WordPress/gutenberg/pull/65808)) + +#### Block Editor +- Button: Add `__next40pxDefaultSize` in block-editor 6. ([65742](https://github.com/WordPress/gutenberg/pull/65742)) +- Decouple "zoom/scaling the canvas" from zoom out mode (without mode rename). ([65482](https://github.com/WordPress/gutenberg/pull/65482)) +- Don't memoize 'getContentLockingParent' and 'getParentSectionBlock' selectors. ([65649](https://github.com/WordPress/gutenberg/pull/65649)) +- Inserter: Update how we compute the actual insertion point for blocks. ([65490](https://github.com/WordPress/gutenberg/pull/65490)) +- LinkControl: Fix unneeded `props` prop. ([65650](https://github.com/WordPress/gutenberg/pull/65650)) +- Navigator: Use stable export instead of experimental export. ([65753](https://github.com/WordPress/gutenberg/pull/65753)) +- Button: Add `__next40pxDefaultSize` in dataviews, reusable-blocks, etc. ([65715](https://github.com/WordPress/gutenberg/pull/65715)) +- Fix: Button Replace remaining 40px default size violations [Block Directory]. ([65467](https://github.com/WordPress/gutenberg/pull/65467)) +- Fix: Button Replace remaining 40px default size violations [Block Editor 2]. ([65308](https://github.com/WordPress/gutenberg/pull/65308)) +- Fix: Button Replace remaining 40px default size violations [Block Editor 3]. ([65225](https://github.com/WordPress/gutenberg/pull/65225)) +- Fix: Button Replace remaining 40px default size violations [Block Editor 5]. ([65361](https://github.com/WordPress/gutenberg/pull/65361)) +- Fix: Button: Replace remaining 40px default size violation [Edit Site 1]. ([65226](https://github.com/WordPress/gutenberg/pull/65226)) +- Fix: Button: Replace remaining 40px default size violation [Edit Site 3]. ([65309](https://github.com/WordPress/gutenberg/pull/65309)) + +#### Block bindings +- Only pass `usesContext` properties to editor APIs. ([65661](https://github.com/WordPress/gutenberg/pull/65661)) +- Refactor passing select and dispatch instead of full Registry. ([65710](https://github.com/WordPress/gutenberg/pull/65710)) +- Unify logic in `getPostMetaFields` function. ([65462](https://github.com/WordPress/gutenberg/pull/65462)) + +#### Post Editor +- Customize widgets, edit post: Refactor Button to new sizes. ([65807](https://github.com/WordPress/gutenberg/pull/65807)) +- Header: Remove unused property `isZoomedOutView` in `useSelect()`. ([65628](https://github.com/WordPress/gutenberg/pull/65628)) + +#### Block Library +- Blocks: Don't memoize 'hasContentRoleAttribute' selector. ([65617](https://github.com/WordPress/gutenberg/pull/65617)) +- Blocks: Update '__experimentalHasContentRoleAttribute' deprecation. ([65616](https://github.com/WordPress/gutenberg/pull/65616)) + +#### Global Styles +- Global style revisions: Remove unnecessary `goTo` navigation call. ([65810](https://github.com/WordPress/gutenberg/pull/65810)) + +#### Site Editor +- Edit Site: Fix `useLink` prop mutation. ([65739](https://github.com/WordPress/gutenberg/pull/65739)) + +#### Data Views +- Migrate store/actions from editor package to fields package. ([65289](https://github.com/WordPress/gutenberg/pull/65289)) + + +### Tools + +#### Testing +- Block Bindings: Refactor end-to-end tests. ([65526](https://github.com/WordPress/gutenberg/pull/65526)) +- GH Actions: Run the tests against PHP 8.3. ([65357](https://github.com/WordPress/gutenberg/pull/65357)) +- Revert "Temp disable test for Classic Block Media issue.". ([65809](https://github.com/WordPress/gutenberg/pull/65809)) + +#### Build Tooling +- Composer: Prevent a lock file from being created. ([65359](https://github.com/WordPress/gutenberg/pull/65359)) +- Composer: Update minimum required PHPUnit Polyfills. ([65355](https://github.com/WordPress/gutenberg/pull/65355)) +- PHP unit tests: Remove WP_RUN_CORE_TESTS const. ([65631](https://github.com/WordPress/gutenberg/pull/65631)) +- DEWP: Check for magic comments before minification. ([65582](https://github.com/WordPress/gutenberg/pull/65582)) +- DEWP: Handle cyclical module dependencies. ([65291](https://github.com/WordPress/gutenberg/pull/65291)) +- Label enforcer: Add `Gutenberg plugin` to the list of single required labels. ([65253](https://github.com/WordPress/gutenberg/pull/65253)) + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @auareyou: Light branding for the reference site. ([65764](https://github.com/WordPress/gutenberg/pull/65764)) +- @crisbusquets: Adds envelope icon. ([65638](https://github.com/WordPress/gutenberg/pull/65638)) +- @davy440: Update block-filters.md. ([64959](https://github.com/WordPress/gutenberg/pull/64959)) +- @dhruvang21: Fix: Button Replace remaining 40px default size violations [Block Editor 2]. ([65308](https://github.com/WordPress/gutenberg/pull/65308)) +- @PARTHVATALIYA: Fix: Button Replace remaining 40px default size violations [Block Editor 5]. ([65361](https://github.com/WordPress/gutenberg/pull/65361)) +- @spadeshoe: Updates LayoutTypeSwitcher to use ToggleGroupControl. ([65498](https://github.com/WordPress/gutenberg/pull/65498)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @amitraj2203 @anomiex @auareyou @carolinan @cbravobernal @ciampo @crisbusquets @DaniGuardiola @davy440 @dhruvang21 @djcowan @draganescu @ellatrix @getdave @gigitux @hbhalodia @jameskoster @jasmussen @jeryj @jffng @jrfnl @jsnajdr @juanmaguitar @keoshi @kevin940726 @louwie17 @luisherranz @Mamaduka @manzoorwanijk @matiasbenedetto @michalczaplinski @mirka @mtias @noisysocks @oandregal @ockham @PARTHVATALIYA @peterwilsoncc @philwp @priethor @ramonjd @SantosGuillamot @shail-mehta @sirreal @Soean @spadeshoe @stokesman @swissspidy @t-hamano @talldan @tyxla @vcanales @vipul0425 @youknowriad + + += 19.3.0 = + +## Changelog + +### Features + +#### Zoom Out +- Remove experimental flag. ([65404](https://github.com/WordPress/gutenberg/pull/65404)) + +### Enhancements + +- Create Block: Update the minimum required PHP version to 7.2. ([65166](https://github.com/WordPress/gutenberg/pull/65166)) +- DataViews: remove unused `.dataviews-view-table__cell-content-wrapper:Empty` style rule. ([65084](https://github.com/WordPress/gutenberg/pull/65084)) +- Media Utils: Add TypeScript support and export more utils. ([64784](https://github.com/WordPress/gutenberg/pull/64784)) +- Media placeholders: Add "drag" to the text. ([65149](https://github.com/WordPress/gutenberg/pull/65149)) +- Restore: Move to trash button in Document settings. ([65087](https://github.com/WordPress/gutenberg/pull/65087)) +- Inspector Controls: Use custom block name in inspector controls when available. ([65398](https://github.com/WordPress/gutenberg/pull/65398)) +- Icons: Adds bell and bell-unread icons. ([65324](https://github.com/WordPress/gutenberg/pull/65324)) +- Editor topbar: Reorder the actions on the right. ([65163](https://github.com/WordPress/gutenberg/pull/65163)) +- Patterns: Add opt out preference to the 'Choose a Pattern' modal when adding a page. ([65026](https://github.com/WordPress/gutenberg/pull/65026)) +- Locked Templates: Blocks with contentOnly locking should not be transformable. ([64917](https://github.com/WordPress/gutenberg/pull/64917)) +- Block Locking: Add border to Replace item in content only image toolbar. ([64849](https://github.com/WordPress/gutenberg/pull/64849)) +- DataViews: Improve UX of bundled views for Pages. ([65295](https://github.com/WordPress/gutenberg/pull/65295)) + +#### Components +- Styling: Apply elevation scale in components package. ([65159](https://github.com/WordPress/gutenberg/pull/65159)) +- Tabs: Improve Tabs indicator animation and related utils. ([64926](https://github.com/WordPress/gutenberg/pull/64926)) +- Modal + - Add exit animation. ([65203](https://github.com/WordPress/gutenberg/pull/65203)) + - Decrease close button size. ([65131](https://github.com/WordPress/gutenberg/pull/65131)) +- Navigator Screen: Warn if path doesn't follow a URL-like scheme. ([65231](https://github.com/WordPress/gutenberg/pull/65231)) +- Card: Update Card radius. ([65053](https://github.com/WordPress/gutenberg/pull/65053)) +- Combobox Control: Add placeholder attribute. ([65254](https://github.com/WordPress/gutenberg/pull/65254)) + +#### Block Library +- Allow dropping multiple images to the image block. ([65030](https://github.com/WordPress/gutenberg/pull/65030)) +- Categories List block: Add dropdown for taxonomies. ([65272](https://github.com/WordPress/gutenberg/pull/65272)) +- Image: Adds the block controls for uploading image. ([64320](https://github.com/WordPress/gutenberg/pull/64320)) +- Remove colons from control labels. ([65205](https://github.com/WordPress/gutenberg/pull/65205)) +- Terms List block: Add Categories-specific variation. ([65434](https://github.com/WordPress/gutenberg/pull/65434)) + +#### Zoom Out +- Add Zoom Out toggle to editor header when experiment enabled. ([65183](https://github.com/WordPress/gutenberg/pull/65183)) +- Add prompt for drag and drop in Patterns tab in Zoom Out mode. ([65115](https://github.com/WordPress/gutenberg/pull/65115)) +- Close inserter on exiting Zoom Out to edit. ([65194](https://github.com/WordPress/gutenberg/pull/65194)) +- Show top level sections in List View. ([65202](https://github.com/WordPress/gutenberg/pull/65202)) +- Try vertical displacement when dragging a pattern between existing patterns/sections. ([63896](https://github.com/WordPress/gutenberg/pull/63896)) + +#### Block Editor +- Link Editing: Automatically add tel to phone number when linking URL. ([64865](https://github.com/WordPress/gutenberg/pull/64865)) +- Drag and Drop: When dragging a mix of video, audio, and image blocks, create individual blocks as appropriate. ([65144](https://github.com/WordPress/gutenberg/pull/65144)) +- URLInput: Replace input with InputControl. ([65158](https://github.com/WordPress/gutenberg/pull/65158)) +- Normalize block inspector controls spacing. ([64526](https://github.com/WordPress/gutenberg/pull/64526)) + +#### Post Editor +- Add new Media section to preferences modal. ([64846](https://github.com/WordPress/gutenberg/pull/64846)) +- DocumentBar: Replace icon with post type label. ([65170](https://github.com/WordPress/gutenberg/pull/65170)) +- Page editor: Double-click to edit template part. ([65024](https://github.com/WordPress/gutenberg/pull/65024)) +- Post publish upload media dialog: Handle more block types. ([65122](https://github.com/WordPress/gutenberg/pull/65122)) + +#### Block bindings +- Populate block context with inherited post type from template slug. ([65062](https://github.com/WordPress/gutenberg/pull/65062)) +- Try gap 0 on attribute items. ([65277](https://github.com/WordPress/gutenberg/pull/65277)) +- Use post meta label from `register_meta` in block bindings workflows. ([65099](https://github.com/WordPress/gutenberg/pull/65099)) + +#### Global Styles +- Refactor site background controls and move site global styles into Background group. ([65304](https://github.com/WordPress/gutenberg/pull/65304)) +- Spacing control: Replace sides dropdwon with link button. ([65193](https://github.com/WordPress/gutenberg/pull/65193)) + +#### Interactivity API +- Refactor context proxies. ([64713](https://github.com/WordPress/gutenberg/pull/64713)) +- Update: Rephrase "Force page reload" and move to Advanced. ([65081](https://github.com/WordPress/gutenberg/pull/65081)) + +#### REST API +- Global Styles: Allow read access to users with `edit_posts` capabilities. ([65071](https://github.com/WordPress/gutenberg/pull/65071)) +- Query loop / Post template: Enable post format filter. ([64167](https://github.com/WordPress/gutenberg/pull/64167)) + +### New APIs +- Add @wordpress/fields package. + - Introduce the package. ([65230](https://github.com/WordPress/gutenberg/pull/65230)) + - Make the package private. ([65269](https://github.com/WordPress/gutenberg/pull/65269)) +- Interactivity API: Add `getServerState()` and `getServerContext()`. ([65151](https://github.com/WordPress/gutenberg/pull/65151)) + +### Bug Fixes + +- Align popover alt variant styling with block toolbar. ([65263](https://github.com/WordPress/gutenberg/pull/65263)) +- Compose: Correctly call timer cleanup in 'useFocusOnMount'. ([65184](https://github.com/WordPress/gutenberg/pull/65184)) +- Fix some docblock types related to the Template Registration API. ([65187](https://github.com/WordPress/gutenberg/pull/65187)) +- Fix the issue where block spacing control not shown. ([65371](https://github.com/WordPress/gutenberg/pull/65371)) +- Fix unintentional block toolbar shadow. ([65182](https://github.com/WordPress/gutenberg/pull/65182)) +- Fix: Moving a page to the trash on the site editor does not goes back to the pages list. ([65119](https://github.com/WordPress/gutenberg/pull/65119)) +- Fix: Moving the last page item to the the trash causes a crash. ([65236](https://github.com/WordPress/gutenberg/pull/65236)) +- Preferences: Fix back button on mobile. ([65141](https://github.com/WordPress/gutenberg/pull/65141)) +- Post Summary Panel: Restore `height:Auto` for toggle buttons. ([65362](https://github.com/WordPress/gutenberg/pull/65362)) +- Fix Tabs styling in Font Library modal. ([65330](https://github.com/WordPress/gutenberg/pull/65330)) +- E2E: Change deprecated social icons for standard in end-to-end. ([65312](https://github.com/WordPress/gutenberg/pull/65312)) +- Typography: Make title blocks apply typographic styles consistently. ([65307](https://github.com/WordPress/gutenberg/pull/65307)) +- Target Hints REST API: Add missing param sanitization. ([65280](https://github.com/WordPress/gutenberg/pull/65280)) +- Interactivity API: Update iterable signals when `deepMerge()` adds new properties. ([65135](https://github.com/WordPress/gutenberg/pull/65135)) +- Navigation Menus: Typography styling support to the navigation submenu block. ([65060](https://github.com/WordPress/gutenberg/pull/65060)) +- Grid: In RTL languages, the resize handles point in the opposite direction. ([64995](https://github.com/WordPress/gutenberg/pull/64995)) +- Block Locking: Fix Content Only Toolbar icon focus style. ([64940](https://github.com/WordPress/gutenberg/pull/64940)) +- Image: Fix resizing to max width in classic themes. ([64819](https://github.com/WordPress/gutenberg/pull/64819)) +- Meta Boxes: Try split content view. ([64351](https://github.com/WordPress/gutenberg/pull/64351)) +- Distraction Free: Fix blurry edge along editor header. ([64277](https://github.com/WordPress/gutenberg/pull/64277)) + +#### Block Library +- Comments Pagination: Fix warning returned by comments pagination blocks. ([65435](https://github.com/WordPress/gutenberg/pull/65435)) +- Cover: Explicitly set isUserOverlayColor to false when media is updated. ([65105](https://github.com/WordPress/gutenberg/pull/65105)) +- Disallow setting grid block rows/columns to zero. ([65217](https://github.com/WordPress/gutenberg/pull/65217)) +- Fix image block crash. ([65222](https://github.com/WordPress/gutenberg/pull/65222)) +- Fix: Buttons block: Block spacing value does not apply to both vertical and horizontal alignment. ([64971](https://github.com/WordPress/gutenberg/pull/64971)) +- Fix: Embed blocks: Figcaption inserted via toolbar not nested within figure element - #64960. ([64970](https://github.com/WordPress/gutenberg/pull/64970)) +- Image cropping: Skip making an API request if there are no changes to apply. ([65384](https://github.com/WordPress/gutenberg/pull/65384)) +- Comments Pagination: Pass the comments query `paged` arg to functions `get_next_comments_link` and `get_previous_comments_link`. ([63698](https://github.com/WordPress/gutenberg/pull/63698)) +- Query Loop + - Default to querying posts when on singular content. ([65067](https://github.com/WordPress/gutenberg/pull/65067)) + - Remove is_singular() check and fix test. ([65483](https://github.com/WordPress/gutenberg/pull/65483)) + - Format controls: Fix JavaScript error. ([65551](https://github.com/WordPress/gutenberg/pull/65551)) + +#### Block Editor +- Inserter: Fix loading indicator for reusable blocks. ([64839](https://github.com/WordPress/gutenberg/pull/64839)) +- Normalize spacing in Layout hook controls. ([65132](https://github.com/WordPress/gutenberg/pull/65132)) +- Pattern Inserter: Fix pattern list overflow. ([65192](https://github.com/WordPress/gutenberg/pull/65192)) +- Remove reset styles RTL from the iframe. ([65150](https://github.com/WordPress/gutenberg/pull/65150)) +- Revert "Block Insertion: Clear the insertion point when selecting a different block or clearing block selection (https://github.com/WordPress/gutenberg/pull/64048)" ([65208](https://github.com/WordPress/gutenberg/pull/65208)) + +#### Components +- BoxControl: Unify input filed width whether linked or not. ([65348](https://github.com/WordPress/gutenberg/pull/65348)) +- ComboboxControl: Add more unit tests. ([65255](https://github.com/WordPress/gutenberg/pull/65255)) +- Fix: Button Replace remaining 40px default size violations [Edit widgets]. ([65367](https://github.com/WordPress/gutenberg/pull/65367)) +- Tabs: Fix vertical indicator. ([65385](https://github.com/WordPress/gutenberg/pull/65385)) + +#### Block bindings +- Fix empty strings placeholders in post meta bindings. ([65089](https://github.com/WordPress/gutenberg/pull/65089)) +- Remove key fallback in bindings get values and rely on source label. ([65517](https://github.com/WordPress/gutenberg/pull/65517)) +- Fix passing bindings context to `canUserEditValue`. ([65599](https://github.com/WordPress/gutenberg/pull/65599)) +- Prioritize existing placeholder over bindingsPlaceholder. ([65220](https://github.com/WordPress/gutenberg/pull/65220)) +- Only use `canUserEditValue` when `setValues` is defined. ([65565](https://github.com/WordPress/gutenberg/pull/65566)) + +#### Zoom Out +- Force device type to Desktop whenever zoom out is invoked. ([64476](https://github.com/WordPress/gutenberg/pull/64476)) +- Hide toolbar icon on smaller viewports. ([65437](https://github.com/WordPress/gutenberg/pull/65437)) +- Remove zoom out toggle when editor is not iframed. ([65452](https://github.com/WordPress/gutenberg/pull/65452)) + +### Accessibility + +- A11y: Add script-module. ([65101](https://github.com/WordPress/gutenberg/pull/65101)) +- Interactivity API: Use a11y Script Module in Gutenberg. ([65123](https://github.com/WordPress/gutenberg/pull/65123)) +- Script Modules API: Print script module live regions HTML in page HTML. ([65380](https://github.com/WordPress/gutenberg/pull/65380)) +- DatePicker: Better hover/focus styles. ([65117](https://github.com/WordPress/gutenberg/pull/65117)) +- Form Input: Don't use `flex-direction: Row-reverse` for checkbox field. ([64232](https://github.com/WordPress/gutenberg/pull/64232)) +- Navigation Menus: Remove Warning and add notice for Navigation. ([63921](https://github.com/WordPress/gutenberg/pull/63921)) +- Global Styles: Fix the shadows Range control accessibility and usability. ([63908](https://github.com/WordPress/gutenberg/pull/63908)) +- Block Editor: Fix accessibility of the hooked blocks toggles. ([63133](https://github.com/WordPress/gutenberg/pull/63133)) + + +#### Post Editor +- Support keyboard resizing of meta boxes pane. ([65325](https://github.com/WordPress/gutenberg/pull/65325)) +- Swap position of the Pre-publish checks buttons. ([65317](https://github.com/WordPress/gutenberg/pull/65317)) + + +### Performance + +- Core Data: Batch remaining actions in resolvers. ([65176](https://github.com/WordPress/gutenberg/pull/65176)) +- Block Editor: Use static access for selector in 'useZoomOutModeExit'. ([65337](https://github.com/WordPress/gutenberg/pull/65337)) +- Editor: Optimize global styles permission check. ([65177](https://github.com/WordPress/gutenberg/pull/65177)) + + +### Experiments + +- Block bindings REST API: Bring bindings UI in Site Editor. ([64072](https://github.com/WordPress/gutenberg/pull/64072)) + + +### Documentation + +- Add JSDoc block for getSectionRootClientId in block editor package. ([65219](https://github.com/WordPress/gutenberg/pull/65219)) +- ButtonGroup: Fix story to show what the component does. ([65336](https://github.com/WordPress/gutenberg/pull/65336)) +- DataViews storybook + - Better styles for combined fields story. ([65078](https://github.com/WordPress/gutenberg/pull/65078)) + - Enable all layouts for combined fields storybook. ([65082](https://github.com/WordPress/gutenberg/pull/65082)) +- Docs: Fix minor typos in Build your first block tutorial. ([64961](https://github.com/WordPress/gutenberg/pull/64961)) +- Docs: Update the content of the API version 3 section in the Block API Reference. ([65375](https://github.com/WordPress/gutenberg/pull/65375)) +- Fix typo in Slot Fills documentation. ([65275](https://github.com/WordPress/gutenberg/pull/65275)) + + +### Code Quality + +- Components: Transition to the new 40px default size. + - Button: + - Add __next40pxDefaultSize for files in editor 3. ([65139](https://github.com/WordPress/gutenberg/pull/65139)) + - Add __next40pxDefaultSize for files in editor 4. ([65140](https://github.com/WordPress/gutenberg/pull/65140)) + - Add props for buttons in editor 1. ([65068](https://github.com/WordPress/gutenberg/pull/65068)) + - Add props for buttons in editor 2. ([65083](https://github.com/WordPress/gutenberg/pull/65083)) + - Fix: Replace remaining 40px default size violations [Block Editor 4]. ([65257](https://github.com/WordPress/gutenberg/pull/65257)) + - Fix: Replace remaining 40px default size violation [Block library 3]. ([65110](https://github.com/WordPress/gutenberg/pull/65110)) + - Fix: Replace remaining 40px default size violation [Block library 4]. ([65143](https://github.com/WordPress/gutenberg/pull/65143)) + - Fix: Replace remaining 40px default size violation [Block library]. ([65075](https://github.com/WordPress/gutenberg/pull/65075)) + - Fix: Replace remaining 40px default size violation [Edit Site 2]. ([65258](https://github.com/WordPress/gutenberg/pull/65258)) + - Fix: Replace remaining 40px default size violations [Block library 1]. ([65033](https://github.com/WordPress/gutenberg/pull/65033)) + - Fix: Replace remaining 40px default size violations [Block Editor 1]. ([65034](https://github.com/WordPress/gutenberg/pull/65034)) + - BoxControl + - Add lint rule for 40px size prop usage. ([65341](https://github.com/WordPress/gutenberg/pull/65341)) + - DimensionsPanel: Apply 40px default size to UI when no spacing preset is available. ([65300](https://github.com/WordPress/gutenberg/pull/65300)) +- Add `useEvent` and revamped `useResizeObserver` to `@wordpress/compose`. ([64943](https://github.com/WordPress/gutenberg/pull/64943)) +- DataViews: Use Dropdown for views configuration dialog. ([65314](https://github.com/WordPress/gutenberg/pull/65314)) +- Platform docs: Upgrade dependencies. ([65445](https://github.com/WordPress/gutenberg/pull/65445)) +- Rename edit-post__fade-in-animation and unify keyframe definitions. ([65377](https://github.com/WordPress/gutenberg/pull/65377)) +- Update minimum required version in PHP. ([65301](https://github.com/WordPress/gutenberg/pull/65301)) +- Editor: Use hooks instead of HoC in `BlockManager`. ([65349](https://github.com/WordPress/gutenberg/pull/65349)) +- Data Views Fields: Migrate store and actions from editor package to fields package. ([65261](https://github.com/WordPress/gutenberg/pull/65261)) +- Plugin: Remove 'function_exists' checks for methods with 'gutenberg' prefix. ([65260](https://github.com/WordPress/gutenberg/pull/65260)) +- Global Styles: Update REST controller override method and backport changes from Core. ([65259](https://github.com/WordPress/gutenberg/pull/65259)) +- Patterns: Remove unused method returned from 'mapSelect'. ([65073](https://github.com/WordPress/gutenberg/pull/65073)) +- Embed: Convert EmbedPreview component to functional component. ([51325](https://github.com/WordPress/gutenberg/pull/51325)) + +#### Components +- BoxControl: Fix critical error when null value is passed. ([65287](https://github.com/WordPress/gutenberg/pull/65287)) +- Composite: + - Deprecate legacy, unstable version. ([63572](https://github.com/WordPress/gutenberg/pull/63572)) + - Remove store prop and useCompositeStore hook. ([64723](https://github.com/WordPress/gutenberg/pull/64723)) + - Stabilize APIs. ([63569](https://github.com/WordPress/gutenberg/pull/63569)) +- `@wordpress/components`: Add local copy of `use-lilius`. ([65097](https://github.com/WordPress/gutenberg/pull/65097)) + +#### Block bindings +- Always prioritize using context in post meta source logic. ([65449](https://github.com/WordPress/gutenberg/pull/65449)) +- Improve getRegisteredPostMeta resolver. ([65450](https://github.com/WordPress/gutenberg/pull/65450)) +- Remove extra filtering of empty sources. ([65447](https://github.com/WordPress/gutenberg/pull/65447)) + +#### Block Editor +- Remove the 'PrivateInserter' component. ([65111](https://github.com/WordPress/gutenberg/pull/65111)) +- Use the tooltip from a button in 'ButtonBlockAppender'. ([65113](https://github.com/WordPress/gutenberg/pull/65113)) +- Remove unused css selectors. ([65276](https://github.com/WordPress/gutenberg/pull/65276)) + +### Tools + +- Scripts: Update stylelint dependency and the default configuration. ([64828](https://github.com/WordPress/gutenberg/pull/64828)) +- Styleling config: Fix stylelint configuration missing files for npm. ([65313](https://github.com/WordPress/gutenberg/pull/65313)) + +#### Build Tooling +- Build Plugin: Simplify and improve zip contents. ([65232](https://github.com/WordPress/gutenberg/pull/65232)) +- Build zip artifact on release and wp production branches. ([65471](https://github.com/WordPress/gutenberg/pull/65471)) +- Build: Include Core blocks' `render` and `variations` files. ([63311](https://github.com/WordPress/gutenberg/pull/63311)) +- Script Modules + - Prepare build for more script modules. ([65064](https://github.com/WordPress/gutenberg/pull/65064)) + - Remove babel from script-modules build. ([65279](https://github.com/WordPress/gutenberg/pull/65279)) + - Remove es-module shims and importmap-polyfill. ([65210](https://github.com/WordPress/gutenberg/pull/65210)) +- Correctly generate PHP files for server-side rendering of blocks on Windows OS. ([65248](https://github.com/WordPress/gutenberg/pull/65248)) +- Packages: Only add polyfills where needed. ([65292](https://github.com/WordPress/gutenberg/pull/65292)) +- Switch from UglifyJS to Terser to build the polyfill script. ([65278](https://github.com/WordPress/gutenberg/pull/65278)) + +#### Testing +- Unit tests: Mock matchMedia to enforce prefers-reduce-motion. ([65438](https://github.com/WordPress/gutenberg/pull/65438)) +- Upgrade Playwright to v1.47. ([65156](https://github.com/WordPress/gutenberg/pull/65156)) + +## First-time contributors + +The following PRs were merged by first-time contributors: + +- @AKSHAT2802: Add __next40pxDefaultSize for files in editor 4. ([65140](https://github.com/WordPress/gutenberg/pull/65140)) +- @devansh016: Automatically add tel to phone number when linking URL. ([64865](https://github.com/WordPress/gutenberg/pull/64865)) +- @dhruvang21: Fix: Button Replace remaining 40px default size violations [Edit widgets]. ([65367](https://github.com/WordPress/gutenberg/pull/65367)) +- @farid-hadi: Docs: Fix minor typos in Build your first block tutorial. ([64961](https://github.com/WordPress/gutenberg/pull/64961)) +- @greenworld: Fix typo in Slot Fills documentation. ([65275](https://github.com/WordPress/gutenberg/pull/65275)) +- @louwie17: Convert EmbedPreview component to functional component. ([51325](https://github.com/WordPress/gutenberg/pull/51325)) +- @rahulharpal1603: URLInput: Replace input with InputControl. ([65158](https://github.com/WordPress/gutenberg/pull/65158)) + + +## Contributors + +The following contributors merged PRs in this release: + +@aaronrobertshaw @afercia @AKSHAT2802 @Aljullu @andrewserong @carolinan @cbravobernal @ciampo @colorful-tones @creativecoder @DaniGuardiola @DAreRodz @devansh016 @dhruvang21 @ellatrix @farid-hadi @getdave @gigitux @greenworld @gziolo @hbhalodia @jameskoster @jasmussen @javierarce @jeryj @jorgefilipecosta @jsnajdr @kevin940726 @louwie17 @madhusudhand @MaggieCabrera @Mamaduka @mikeybinns @mirka @ntsekouras @oandregal @ockham @peterwilsoncc @rahulharpal1603 @ramonjd @richtabor @rohitmathur-7 @SantosGuillamot @scruffian @sgomes @sirreal @stokesman @swissspidy @t-hamano @talldan @vipul0425 @zaguiini + + = 19.2.0 = ## Changelog diff --git a/composer.json b/composer.json index 3571377bd58bd7..982a71a975223d 100644 --- a/composer.json +++ b/composer.json @@ -23,14 +23,15 @@ "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "composer/installers": true - } + }, + "lock": false }, "require-dev": { "phpcompatibility/phpcompatibility-wp": "^2.1.3", "wp-coding-standards/wpcs": "^3.0", "sirbrillig/phpcs-variable-analysis": "^2.8", "spatie/phpunit-watcher": "^1.23", - "yoast/phpunit-polyfills": "^1.0", + "yoast/phpunit-polyfills": "^1.1.0", "gutenberg/gutenberg-coding-standards": "@dev" }, "repositories": [ @@ -43,7 +44,7 @@ } ], "require": { - "composer/installers": "~1.0" + "composer/installers": "^1.0 || ^2.0" }, "scripts": { "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", diff --git a/docs/contributors/code/README.md b/docs/contributors/code/README.md index 848aa8bc26bbd1..4c965e69dbcefa 100644 --- a/docs/contributors/code/README.md +++ b/docs/contributors/code/README.md @@ -4,13 +4,13 @@ A guide on how to get started contributing code to the Gutenberg project. ## Discussions -The [Make WordPress Core blog](https://make.wordpress.org/core/) is the primary spot for the latest information around WordPress development: including announcements, product goals, meeting notes, meeting agendas, and more. +The [Make WordPress Core blog](https://make.wordpress.org/core/) is the primary spot for the latest information around WordPress development, including announcements, product goals, meeting notes, meeting agendas, and more. -Real-time discussions for development take place in `#core-editor` and `#core-js` channels in [Make WordPress Slack](https://make.wordpress.org/chat) (registration required). Weekly meetings for the editor component are on Wednesdays at 14:00UTC, and for the JavaScript component on Tuesday at 15:00UTC, in their respective Slack channels. +Development discussions take place in real-time in the `#core-editor` and `#core-js` channels in [Make WordPress Slack](https://make.wordpress.org/chat) (registration required). ## Development Hub -The Gutenberg project uses GitHub for managing code and tracking issues. The main repository is at: [https://github.com/WordPress/gutenberg](https://github.com/WordPress/gutenberg). +The Gutenberg project uses GitHub to manage code and track issues. The main repository is at: [https://github.com/WordPress/gutenberg](https://github.com/WordPress/gutenberg). Browse [the issues list](https://github.com/wordpress/gutenberg/issues) to find issues to work on. The [good first issue](https://github.com/wordpress/gutenberg/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22) and [good first review](https://github.com/WordPress/gutenberg/pulls?q=is%3Aopen+is%3Apr+label%3A%22Good+First+Review%22) labels are good starting points. diff --git a/docs/contributors/code/back-merging-to-wp-core.md b/docs/contributors/code/back-merging-to-wp-core.md index d6c283629e1938..2ae1efb1727415 100644 --- a/docs/contributors/code/back-merging-to-wp-core.md +++ b/docs/contributors/code/back-merging-to-wp-core.md @@ -31,7 +31,7 @@ There are however certain exceptions to that rule. PRs with the following criter - Does not contain changes to PHP code. - Has label `Backport from WordPress Core` - this code is already in WP Core and is being synchronized back to Gutenberg. -- Has label `Backport to WordPress Core` - this code has already been synchronized to WP Core. +- Has label `Backported to WordPress Core` - this code has already been synchronized to WP Core. ## Further Reading diff --git a/docs/contributors/code/managing-packages.md b/docs/contributors/code/managing-packages.md index bfea8fed81242b..8ad0266b1482bf 100644 --- a/docs/contributors/code/managing-packages.md +++ b/docs/contributors/code/managing-packages.md @@ -1,11 +1,7 @@ # Managing Packages -This repository uses [monorepo] to manage WordPress modules and publish them with [lerna] as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](https://github.com/WordPress/gutenberg/blob/HEAD/packages/README.md) documentation. +This repository uses [npm workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces) to manage WordPress packages and [lerna](https://lerna.js.org/) to publish them to [npm](https://www.npmjs.com/). This enforces certain steps in the workflow which are described in details in [packages](https://github.com/WordPress/gutenberg/blob/HEAD/packages/README.md) documentation. Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor, you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](https://github.com/WordPress/gutenberg/blob/HEAD/packages/README.md#maintaining-changelogs) section. Publishing WordPress packages to npm is automated by synchronizing it with the bi-weekly Gutenberg plugin RC1 release. You can learn more about this process and other ways to publish new versions of npm packages in the [Gutenberg Release Process document](/docs/contributors/code/release.md#packages-releases-to-npm-and-wordpress-core-updates). - -[lerna]: https://lerna.js.org/ -[monorepo]: https://monorepo.tools -[npm]: https://www.npmjs.com/ diff --git a/docs/contributors/versions-in-wordpress.md b/docs/contributors/versions-in-wordpress.md index 8c4debb8b696f6..c2be7e3fa4e884 100644 --- a/docs/contributors/versions-in-wordpress.md +++ b/docs/contributors/versions-in-wordpress.md @@ -6,6 +6,9 @@ If anything looks incorrect here, please bring it up in #core-editor in [WordPre | Gutenberg Versions | WordPress Version | | ------------------ | ----------------- | +| 18.6-19.3 | 6.7.1 | +| 18.6-19.3 | 6.7 | +| 17.8-18.5 | 6.6.2 | | 17.8-18.5 | 6.6.1 | | 17.8-18.5 | 6.6 | | 16.8-17.7 | 6.5.5 | diff --git a/docs/explanations/architecture/performance.md b/docs/explanations/architecture/performance.md index 4c8b6386b9263b..8c1034ad9de331 100644 --- a/docs/explanations/architecture/performance.md +++ b/docs/explanations/architecture/performance.md @@ -84,6 +84,12 @@ The new reference commit hash that is chosen needs to meet the following require - Be compatible with the new WP version used in the "Tested up to" flag. - Is already tracked on "codevitals.run" for all existing metrics. +When releasing a plugin update with changes to the minimum WordPress version requirements, the end-to-end test GitHub Action workflow in Core SVN will need to be updated for any branch losing support. Otherwise the first run of that workflow on that branch following the release will fail. + +The version of the plugin used in the workflow can be pinned by adding the `gutenberg-version` input to the test matrix. [Core-59221](https://core.trac.wordpress.org/changeset/59221) is an example of this change for the 6.4 branch. + +**Note:** Always use the final release including bug fixes (ie. `x.y.2` or `x.y.3`). If the final release is not yet known, create a [Trac ticket](https://core.trac.wordpress.org/ticket/62488) so it's not forgotten. + **A simple way to choose commit is to pick a very recent commit on trunk with a passing performance job.** ## Going further diff --git a/docs/explanations/architecture/styles.md b/docs/explanations/architecture/styles.md index 952c6c49caad23..5f5e73d1372f7b 100644 --- a/docs/explanations/architecture/styles.md +++ b/docs/explanations/architecture/styles.md @@ -37,8 +37,10 @@ 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. @@ -123,7 +125,7 @@ The block supports API only serializes the font size value to the wrapper, resul This is an active area of work you can follow [in the tracking issue](https://github.com/WordPress/gutenberg/issues/38167). The linked proposal is exploring a different way to serialize the user changes: instead of each block support serializing its own data (for example, classes such as `has-small-font-size`, `has-green-color`) the idea is the block would get a single class instead (for example, `wp-style-UUID`) and the CSS styling for that class will be generated in the server by WordPress. -While work continues in that proposal, there's an escape hatch, an experimental option block authors can use. Any block support can skip the serialization to HTML markup by using `__experimentalSkipSerialization`. For example: +While work continues in that proposal, there's an escape hatch, an experimental option block authors can use. Any block support can skip the serialization to HTML markup by using `skipSerialization`. For example: ```json { @@ -132,7 +134,7 @@ While work continues in that proposal, there's an escape hatch, an experimental "supports": { "typography": { "fontSize": true, - "__experimentalSkipSerialization": true + "skipSerialization": true } } } @@ -140,7 +142,7 @@ While work continues in that proposal, there's an escape hatch, an experimental This means that the typography block support will do all of the things (create a UI control, bind the block attribute to the control, etc) except serializing the user values into the HTML markup. The classes and inline styles will not be automatically applied to the wrapper and it is the block author's responsibility to implement this in the `edit`, `save`, and `render_callback` functions. See [this issue](https://github.com/WordPress/gutenberg/issues/28913) for examples of how it was done for some blocks provided by WordPress. -Note that, if `__experimentalSkipSerialization` is enabled for a group (typography, color, spacing) it affects _all_ block supports within this group. In the example above _all_ the properties within the `typography` group will be affected (e.g. `fontSize`, `lineHeight`, `fontFamily` .etc). +Note that, if `skipSerialization` is enabled for a group (typography, color, spacing) it affects _all_ block supports within this group. In the example above _all_ the properties within the `typography` group will be affected (e.g. `fontSize`, `lineHeight`, `fontFamily` .etc). To enable for a _single_ property only, you may use an array to declare which properties are to be skipped. In the example below, only `fontSize` will skip serialization, leaving other items within the `typography` group (e.g. `lineHeight`, `fontFamily` .etc) unaffected. @@ -152,7 +154,7 @@ To enable for a _single_ property only, you may use an array to declare which pr "typography": { "fontSize": true, "lineHeight": true, - "__experimentalSkipSerialization": [ "fontSize" ] + "skipSerialization": [ "fontSize" ] } } } @@ -473,7 +475,7 @@ If blocks do this, they need to be registered in the server using the `block.jso Every chunk of styles can only use a single selector. -This is particularly relevant if the block is using `__experimentalSkipSerialization` to serialize the different style properties to different nodes other than the wrapper. See "Current limitations of blocks supports" for more. +This is particularly relevant if the block is using `skipSerialization` to serialize the different style properties to different nodes other than the wrapper. See "Current limitations of blocks supports" for more. #### 3. **Only a single property per block** @@ -510,7 +512,7 @@ When a block that opts in to layout support is rendered, two things are processe 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. +- Default/Flow: Items are stacked vertically. The parent container block's display value isn't specified, so that it may use the default value for that HTML element. For most elements that will usually be `block`. 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. diff --git a/docs/getting-started/fundamentals/block-in-the-editor.md b/docs/getting-started/fundamentals/block-in-the-editor.md index d1f2a25063e6c6..1d51239907d8b5 100644 --- a/docs/getting-started/fundamentals/block-in-the-editor.md +++ b/docs/getting-started/fundamentals/block-in-the-editor.md @@ -139,6 +139,8 @@ export default function Edit( { attributes, setAttributes } ) { setAttributes( { message: val } ) } style={ { diff --git a/docs/getting-started/tutorial.md b/docs/getting-started/tutorial.md index aac507d4c573f4..2a5dd979d3a569 100644 --- a/docs/getting-started/tutorial.md +++ b/docs/getting-started/tutorial.md @@ -25,7 +25,7 @@ To complete this tutorial, you will need: If you don't have one or more of these items, the [Block Development Environment](https://developer.wordpress.org/block-editor/getting-started/devenv/) documentation will help you get started. Come back here once you are all set up.
- This tutorial uses wp-env to create a local WordPress development environment. However, feel free to use alternate local development tools if you already have one that you prefer. + This tutorial uses wp-env to create a local WordPress development environment. However, feel free to use any development environment that meets the abovementioned prerequisites.
## Scaffolding the block @@ -250,7 +250,7 @@ At this point, the block's icon and description are correct, and block supports ### Updating edit.js -The [`edit.js`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/file-structure-of-a-block/#edit-js) file controls how the block functions and appears in the Editor. Right now, the user sees the message " Copyright Date Block – hello from the editor!". Let's change that. +The [`edit.js`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/file-structure-of-a-block/#edit-js) file controls how the block functions and appears in the Editor. Right now, the user sees the message "Copyright Date Block – hello from the editor!". Let's change that. Open the file and see that the `Edit()` function returns a paragraph tag with the default message. @@ -480,6 +480,8 @@ export default function Edit( { attributes, setAttributes } ) { { showStartingYear && ( -

Three variables are exposed in the render.php, which you can use to customize the block's output:

+

Three variables are exposed in render.php, which you can use to customize the block's output:

  • $attributes (array): The block attributes.
  • $content (string): The block default content.
  • diff --git a/docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md b/docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md index ce8478f0241319..a20d2cf9d8b8a7 100644 --- a/docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md +++ b/docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md @@ -6,6 +6,37 @@ This page is dedicated to the many ways you can disable specific functionality i There might be times when you don’t want access to a block at all to be available for users. To control what’s available in the inserter, you can take two approaches: [an allow list](/docs/reference-guides/filters/block-filters.md#using-an-allow-list) that disables all blocks except those on the list or a [deny list that unregisters specific blocks](/docs/reference-guides/filters/block-filters.md#using-a-deny-list). +## Curate heading levels + +Core WordPress blocks with a heading level dropdown include support for the `levelOptions` attribute. This applies to the Heading, Site Title, Site Tagline, Query Title, Post Title, and Comments Title blocks. The `levelOptions` attribute accepts an array of numbers corresponding to heading levels, where `1` represents H1, `2` represents H2, and so on. + +This attribute allows you to specify which heading levels should appear in the dropdown UI, providing a lightweight curation method that does not require block deprecations. Any existing heading levels are preserved in the markup, while `levelOptions` only affects the UI display. + +You can apply this attribute directly in the block markup, a technique that will be commonly used in block templates, template parts, and patterns. For example, the following markup disables H1, H2, and H6 in the Heading block by setting `"levelOptions":[3,4,5]`. + +```html + +

    Markup example

    + +``` + +You can also use [block filters](/docs/reference-guides/filters/block-filters.md) to set the default value of this attribute globally or for specific blocks. The example below disables H1, H2, and H6 for all Heading blocks. You can further customize this by restricting certain heading levels based on conditions like user capabilities. + +```php +function example_modify_heading_levels_globally( $args, $block_type ) { + + if ( 'core/heading' !== $block_type ) { + return $args; + } + + // Remove H1, H2, and H6. + $args['attributes']['levelOptions']['default'] = [ 3, 4, 5 ]; + + return $args; +} +add_filter( 'register_block_type_args', 'example_modify_heading_levels_globally', 10, 2 ); +``` + ## Disable the Pattern Directory To fully remove patterns bundled with WordPress core from being accessed in the Inserter, the following can be added to your `functions.php` file: diff --git a/docs/how-to-guides/data-basics/1-data-basics-setup.md b/docs/how-to-guides/data-basics/1-data-basics-setup.md index e61db83c4ecbd5..d3208ceb352b4b 100644 --- a/docs/how-to-guides/data-basics/1-data-basics-setup.md +++ b/docs/how-to-guides/data-basics/1-data-basics-setup.md @@ -10,7 +10,7 @@ We'll do all the development inside of a WordPress plugin. Let's start by creati - my-first-gutenberg-app.php – to create a new admin page - src/index.js – for our JavaScript application -- style.css – for the minimal stylesheet +- src/style.css – for the minimal stylesheet - package.json – for the build process Go ahead and create these files using the following snippets: @@ -36,7 +36,7 @@ window.addEventListener( ); ``` -**style.css:** +**src/style.css:** ```css .toplevel_page_my-first-gutenberg-app #wpcontent { @@ -149,7 +149,7 @@ function load_custom_wp_admin_scripts( $hook ) { // Load our style.css. wp_register_style( 'my-first-gutenberg-app', - plugins_url( 'style.css', __FILE__ ), + plugins_url( 'build/style-index.css', __FILE__ ), array(), $asset_file['version'] ); diff --git a/docs/how-to-guides/data-basics/3-building-an-edit-form.md b/docs/how-to-guides/data-basics/3-building-an-edit-form.md index 65c4d0a5486a0d..1e2b4453e59ee2 100644 --- a/docs/how-to-guides/data-basics/3-building-an-edit-form.md +++ b/docs/how-to-guides/data-basics/3-building-an-edit-form.md @@ -63,6 +63,8 @@ function EditPageForm( { pageId, onCancel, onSaveFinished } ) { return (
    @@ -139,6 +141,8 @@ function EditPageForm( { pageId, onCancel, onSaveFinished } ) { return (
    @@ -164,6 +168,8 @@ function VanillaReactForm({ initialTitle }) { const [title, setTitle] = useState( initialTitle ); return ( @@ -233,6 +239,8 @@ function EditPageForm( { pageId, onCancel, onSaveFinished } ) { return (
    = WordPress 6.3) -- The post editor will be iframed if all registered blocks have a Block API version 3 or higher and the editor has no classic meta boxes below the blocks. Adding version 3 support means that the block should work inside an iframe, though the block may still be rendered outside the iframe if not all blocks support version 3. +- The post editor will be iframed if all registered blocks have a Block API version 3 or higher. Adding version 3 support means that the block should work inside an iframe, though the block may still be rendered outside the iframe if not all blocks support version 3. ## Version 2 (>= WordPress 5.6) diff --git a/docs/reference-guides/block-api/block-bindings.md b/docs/reference-guides/block-api/block-bindings.md new file mode 100644 index 00000000000000..479396abc13c9c --- /dev/null +++ b/docs/reference-guides/block-api/block-bindings.md @@ -0,0 +1,330 @@ +# Bindings + +
    +Block Bindings API is only available for WordPress 6.5 and above. +
    + +The Block Bindings API lets you “bind” dynamic data to the block’s attributes, which are then reflected in the final HTML markup that is output to the browser on the front end. + +An example could be connecting an Image block `url` attribute to a function that returns random images from an external API. + +```html + +``` + + +## Compatible blocks and their attributes + +Right now, not all block attributes are compatible with block bindings. There is some ongoing effort to increase this compatibility, but for now, this is the list: + +| Supported Blocks | Supported Attributes | +| ---------------- | -------------------- | +| Paragraph | content | +| Heading | content | +| Image | id, url, title, alt | +| Button | text, url, linkTarget, rel | + +## Registering a custom source + +Registering a source requires defining at least `name`, a `label` and a `callback` function that gets a value from the source and passes it back to a block attribute. + +Once a source is registered, any supporting block's `metadata.bindings` attribute can be configured to read a value from that source. + +Registration can be done on the server via PHP or in the editor via JavaScript, and both can coexist. + +The label defined in server registration will be overridden by the label defined in the editor. + +### Server registration + +Server registration allows applying a callback that will be executed on the frontend for the bound attribute. + +The function to register a custom source is `register_block_bindings_source($name, $args)`: + +- `name`: `string` that sets the unique ID for the custom source. +- `args`: `array` that contains: + - `label`: `string` with the human-readable name of the custom source. + - `uses_context`: `array` with the block context that is passed to the callback (optional). + - `get_value_callback`: `function` that will run on the bound block's render function. It accepts three arguments: `source_args`, `block_instance` and `attribute_name`. This value can be overridden with the filter `block_bindings_source_value`. + +Note that `register_block_bindings_source()` should be called from a handler attached to the `init` hook. + +Here is an example: + +```php +add_action( + 'init', + function () { + register_block_bindings_source( + 'wpmovies/visualization-date', + array( + 'label' => __( 'Visualization Date', 'custom-bindings' ), + 'get_value_callback' => function ( array $source_args, $block_instance ) { + $post_id = $block_instance->context['postId']; + if ( isset( $source_args['key'] ) ) { + return get_post_meta( $post_id, $source_args['key'], true ); + } + }, + 'uses_context' => array( 'postId' ), + ) + ); + } +); +``` + +This example needs a `post_meta` registered, and, also, a filter can be used to return a default `$visualization_date` value, which will be shown in the next heading. + +```php +add_action( + 'init', + function () { + register_meta( + 'post', + 'wp_movies_visualization_date', + array( + 'show_in_rest' => true, + 'single' => true, + 'type' => 'string', + 'label' => __( 'Movie visualization date', 'custom-bindings' ), + ) + ); + } +); +``` + +#### Block bindings source value filter + +_**Note:** Since WordPress 6.7._ + +The value returned by `get_value_callback` can be modified with the `block_bindings_source_value` filter. +The filter has the following parameters: + +- `value`: The value to be filtered. +- `name`: The name of the source. +- `source_args`: `array` containing source arguments. +- `block_instance`: The block instance object. +- `attribute_name`: The name of the attribute. + +Example: + +```php +function wpmovies_format_visualization_date( $value, $name ) { + // Prevent the filter to be applied to other sources. + if ( $name !== 'wpmovies/visualization-date' ) { + return $value; + } + if ( ! $value ) { + return date( 'm/d/Y' ); + } + return date( 'm/d/Y', strtotime( $value ) ); +} + +add_filter( 'block_bindings_source_value', 'wpmovies_format_visualization_date', 10, 2 ); +``` + +#### Server registration Core examples + +There are a few examples in Core that can be used as reference. + +- Post Meta. [Source code](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-bindings/post-meta.php) +- Pattern overrides. [Source code](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-bindings/pattern-overrides.php) +- Twenty Twenty-Five theme. [Source code](https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-content/themes/twentytwentyfive/functions.php) + + +### Editor registration + +_**Note:** Since WordPress 6.7._ + +Editor registration on the client allows defining what the bound block will do when the value is retrieved or when the value is edited. + +The function to register a custom source is `registerBlockBindingsSource( args )`: + +- `args`: `object` with the following structure: + - `name`: `string` with the unique and machine-readable name. + - `label`: `string` with the human readable name of the custom source. In case it was defined already on the server, the server label will be overriden by this one, in that case, it is not recommended to be defined here. (optional) + - `usesContext`: `array` with the block context that the custom source may need. In case it was defined already on the server, it should not be defined here. (optional) + - `getValues`: `function` that retrieves the values from the source. (optional) + - `setValues`: `function` that allows updating the values connected to the source. (optional) + - `canUserEditValue`: `function` to determine if the user can edit the value. The user won't be able to edit by default. (optional) + + +This example will show a custom post meta date in the editor and, if it doesn't exist, it will show today's date. The user can edit the value of the date. (Caution: This example does not format the user input as a date—it's only for educational purposes.) + +```js +import { + registerBlockBindingsSource, +} from '@wordpress/blocks'; +import { __ } from '@wordpress/i18n'; +import { store as coreDataStore } from '@wordpress/core-data'; + +registerBlockBindingsSource( { + name: 'wpmovies/visualization-date', + label: __( 'Visualization Date', 'custom-bindings' ), // We can skip the label, as it was already defined in the server in the previous example. + usesContext: [ 'postType' ], // We can skip postId, as it was already defined in the server in the previous example. + getValues( { select, context } ) { + let wpMoviesVisualizationDate; + const { getEditedEntityRecord } = select( coreDataStore ); + if ( context?.postType && context?.postId ) { + wpMoviesVisualizationDate = getEditedEntityRecord( + 'postType', + context?.postType, + context?.postId + ).meta?.wp_movies_visualization_date; + } + if ( wpMoviesVisualizationDate ) { + return { + content: wpMoviesVisualizationDate, + }; + } + + return { + content: new Date().toLocaleDateString( 'en-US' ), + }; + }, + setValues( { select, dispatch, context, bindings } ) { + dispatch( coreDataStore ).editEntityRecord( + 'postType', + context?.postType, + context?.postId, + { + meta: { + wp_movies_visualization_date: bindings?.content?.newValue, + }, + } + ); + }, + canUserEditValue( { select, context } ) { + return true; + }, +} ); +``` + +#### getValues + +The `getValues` function retrieves the value from the source on block loading. It receives an `object` as an argument with the following properties: + +- `bindings` returns the bindings object of the specific source. It must have the attributes as a key, and the value can be a `string` or an `object` with arguments. +- `clientId` returns a `string` with the current block client ID. +- `context` returns an `object` of the current block context, defined in the `usesContext` property. [More about block context.](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/). +- `select` returns an `object` of a given store's selectors. [More info in their docs.](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-data/#select). + +The function must return an `object` with this structure: +`{ 'block attribute' : value }` + +#### setValues + +The `setValues` function updates all the values of the source of the block bound. It receives an `object` as an argument with the following properties: + +- `bindings` returns the bindings object of the specific source. It must have the attributes as a key, and the value can be a `string` or an `object` with arguments. This object contains a `newValue` property with the user's input. +- `clientId` returns a `string` with the current block client ID. +- `context` returns an `object` of the current block context, defined in the `usesContext` property. [More about block context.](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/). +- `dispatch` returns an `object` of the store's action creators. [More about dispatch](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-data/#dispatch). +- `select` returns an `object` of a given store's selectors. [More info in their docs.](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-data/#select). + + +#### Editor registration Core examples + +There are a few examples in Core that can be used as reference. + +- Post Meta. [Source code](https://github.com/WordPress/gutenberg/blob/5afd6c27bfba2be2e06b502257753fbfff1ae9f0/packages/editor/src/bindings/post-meta.js#L74-L146) +- Pattern overrides. [Source code](https://github.com/WordPress/gutenberg/blob/5afd6c27bfba2be2e06b502257753fbfff1ae9f0/packages/editor/src/bindings/pattern-overrides.js#L8-L100) + +## Unregistering a source + +_**Note:** Since WordPress 6.7._ + +`unregisterBlockBindingsSource` unregisters a block bindings source by providing its name. + +```js +import { unregisterBlockBindingsSource } from '@wordpress/blocks'; + +unregisterBlockBindingsSource( 'plugin/my-custom-source' ); +``` + +## Getting all sources + +_**Note:** Since WordPress 6.7._ + +`getBlockBindingsSources` returns all registered block bindings sources. + +```js +import { getBlockBindingsSources } from '@wordpress/blocks'; + +const registeredSources = getBlockBindingsSources(); +``` + +## Getting one specific source + +_**Note:** Since WordPress 6.7._ + +`getBlockBindingsSource` return a specific block bindings source by its name. + +```js +import { getBlockBindingsSource } from '@wordpress/blocks'; + +const blockBindingsSource = getBlockBindingsSource( 'plugin/my-custom-source' ); +``` + +## Block Bindings Utils + +_**Note:** Since WordPress 6.7._ + +UseBlockBindingUtils is a hook with two helpers that allows developers to edit the `metadata.bindings` attribute easily. + +It accepts a `clientId` string as a parameter, if it is not set, the function will use the current block client ID from the context. + +Example: + +```js +import { useBlockBindingsUtils } from '@wordpress/block-editor'; + +const { updateBlockBindings } = useBlockBindingsUtils('my-block-client-id-12345'); +... +``` + +### updateBlockBindings + +`updateBlockBindings` works similarly to `updateBlockAttributes`, and can be used to create, update, or remove specific connections. + +```js +import { useBlockBindingsUtils } from '@wordpress/block-editor'; + +const { updateBlockBindings } = useBlockBindingsUtils(); + +function updateBlockBindingsURLSource( url ) { + updateBlockBindings({ + url: { + source: 'myplugin/new-source', + } + }) +} + +// Remove binding from url attribute. +function removeBlockBindingsURLSource() { + updateBlockBindings( { url: undefined } ); +} +``` + +### removeAllBlockBindings + +`removeAllBlockBindings` will remove all existing connections in a block by removing the `metadata.bindings` attribute. + +```js +import { useBlockBindingsUtils } from '@wordpress/block-editor'; + +const { removeAllBlockBindings } = useBlockBindingsUtils(); + +function clearBlockBindings() { + removeAllBlockBindings(); +} +``` + + + diff --git a/docs/reference-guides/block-api/block-context.md b/docs/reference-guides/block-api/block-context.md index 09c33dfb71b7c3..c5fcfaedbae349 100644 --- a/docs/reference-guides/block-api/block-context.md +++ b/docs/reference-guides/block-api/block-context.md @@ -141,6 +141,8 @@ export default function Edit( props ) { return (
    diff --git a/docs/reference-guides/block-api/block-edit-save.md b/docs/reference-guides/block-api/block-edit-save.md index 9e4dd3d1a916bd..86721c77e463c6 100644 --- a/docs/reference-guides/block-api/block-edit-save.md +++ b/docs/reference-guides/block-api/block-edit-save.md @@ -210,6 +210,8 @@ edit: ( { attributes, setAttributes } ) => { return (
    { return (
    { diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index b9cae44550181c..34db859f71d1de 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -72,14 +72,14 @@ A calendar of your site’s posts. ([Source](https://github.com/WordPress/gutenb - **Supports:** align, color (background, link, text), interactivity (clientNavigation), typography (fontSize, lineHeight) - **Attributes:** month, year -## Categories List +## Terms List -Display a list of all categories. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/categories)) +Display a list of all terms of a given taxonomy. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/categories)) - **Name:** core/categories - **Category:** widgets - **Supports:** align, interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** displayAsDropdown, label, showEmpty, showHierarchy, showLabel, showOnlyTopLevel, showPostCounts +- **Attributes:** displayAsDropdown, label, showEmpty, showHierarchy, showLabel, showOnlyTopLevel, showPostCounts, taxonomy ## Code @@ -246,7 +246,7 @@ Add an image or video with a text overlay. ([Source](https://github.com/WordPres - **Name:** core/cover - **Category:** media - **Supports:** align, anchor, color (heading, text, ~~background~~, ~~enableContrastChecker~~), dimensions (aspectRatio), interactivity (clientNavigation), layout (~~allowJustification~~), shadow, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, isUserOverlayColor, minHeight, minHeightUnit, overlayColor, tagName, templateLock, url, useFeaturedImage +- **Attributes:** allowedBlocks, alt, backgroundType, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, gradient, hasParallax, id, isDark, isRepeated, isUserOverlayColor, minHeight, minHeightUnit, overlayColor, sizeSlug, tagName, templateLock, url, useFeaturedImage ## Details @@ -254,7 +254,7 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/details - **Category:** text -- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** showContent, summary ## Embed @@ -493,7 +493,7 @@ Add a submenu to your navigation. ([Source](https://github.com/WordPress/gutenbe - **Name:** core/navigation-submenu - **Category:** design - **Parent:** core/navigation -- **Supports:** interactivity (clientNavigation), ~~html~~, ~~reusable~~ +- **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** description, id, isTopLevelItem, kind, label, opensInNewTab, rel, title, type, url ## Page Break @@ -512,7 +512,7 @@ Display a list of all pages. ([Source](https://github.com/WordPress/gutenberg/tr - **Name:** core/page-list - **Category:** widgets - **Allowed Blocks:** core/page-list-item -- **Supports:** interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** isNested, parentPageID ## Page List Item @@ -616,7 +616,7 @@ Displays the contents of a post or page. ([Source](https://github.com/WordPress/ - **Name:** core/post-content - **Category:** theme -- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), layout, spacing (blockGap, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ ## Date diff --git a/docs/reference-guides/data/data-core-block-editor.md b/docs/reference-guides/data/data-core-block-editor.md index c6552ef431cef8..437f7be20f7705 100644 --- a/docs/reference-guides/data/data-core-block-editor.md +++ b/docs/reference-guides/data/data-core-block-editor.md @@ -262,7 +262,7 @@ _Returns_ ### getBlockInsertionPoint -Returns the insertion point, the index at which the new inserted block would be placed. Defaults to the last index. +Returns the location of the insertion cue. Defaults to the last index. _Parameters_ @@ -738,6 +738,39 @@ _Returns_ Returns the currently selected block, or null if there is no selected block. +_Usage_ + +```js +import { select } from '@wordpress/data'; +import { store as blockEditorStore } from '@wordpress/block-editor'; + +// Set initial active block client ID +let activeBlockClientId = null; + +const getActiveBlockData = () => { + const activeBlock = select( blockEditorStore ).getSelectedBlock(); + + if ( activeBlock && activeBlock.clientId !== activeBlockClientId ) { + activeBlockClientId = activeBlock.clientId; + + // Get active block name and attributes + const activeBlockName = activeBlock.name; + const activeBlockAttributes = activeBlock.attributes; + + // Log active block name and attributes + console.log( activeBlockName, activeBlockAttributes ); + } +}; + +// Subscribe to changes in the editor +// wp.data.subscribe(() => { +// getActiveBlockData() +// }) + +// Update active block data on click +// onclick="getActiveBlockData()" +``` + _Parameters_ - _state_ `Object`: Global application state. @@ -857,15 +890,9 @@ _Returns_ ### hasBlockMovingClientId -Returns whether block moving mode is enabled. - -_Parameters_ - -- _state_ `Object`: Editor state. - -_Returns_ +> **Deprecated** -- `string`: Client Id of moving block. +Returns whether block moving mode is enabled. ### hasDraggedInnerBlock @@ -988,7 +1015,7 @@ _Returns_ ### isBlockInsertionPointVisible -Returns true if we should show the block insertion point. +Returns true if the block insertion point is visible. _Parameters_ @@ -1661,11 +1688,13 @@ _Returns_ ### setBlockMovingClientId -Action that enables or disables the block moving mode. +> **Deprecated** -_Parameters_ +Set the block moving client ID. -- _hasBlockMovingClientId_ `string|null`: Enable/Disable block moving mode. +_Returns_ + +- `Object`: Action object. ### setBlockVisibility diff --git a/docs/reference-guides/data/data-core-edit-post.md b/docs/reference-guides/data/data-core-edit-post.md index e3fb22a1a7afe0..06fe5fc30420ae 100644 --- a/docs/reference-guides/data/data-core-edit-post.md +++ b/docs/reference-guides/data/data-core-edit-post.md @@ -528,6 +528,10 @@ _Parameters_ - _feature_ `string`: Feature name. +### toggleFullscreenMode + +Action that toggles the Fullscreen Mode view option. + ### togglePinnedPluginItem Triggers an action object used to toggle a plugin name flag. diff --git a/docs/reference-guides/data/data-core-edit-site.md b/docs/reference-guides/data/data-core-edit-site.md index 775dd66a821ef0..a16c53861daada 100644 --- a/docs/reference-guides/data/data-core-edit-site.md +++ b/docs/reference-guides/data/data-core-edit-site.md @@ -52,6 +52,8 @@ _Returns_ ### getEditedPostId +> **Deprecated** + Returns the ID of the currently edited template or template part. _Parameters_ @@ -64,6 +66,8 @@ _Returns_ ### getEditedPostType +> **Deprecated** + Returns the current edited post type (wp_template or wp_template_part). _Parameters_ @@ -189,6 +193,8 @@ _Returns_ ### isPage +> **Deprecated** + Whether or not the editor has a page loaded into it. _Related_ @@ -273,6 +279,8 @@ _Parameters_ ### setEditedEntity +> **Deprecated** + Action that sets an edited entity. _Parameters_ @@ -287,6 +295,8 @@ _Returns_ ### setEditedPostContext +> **Deprecated** + Set's the current block editor context. _Parameters_ @@ -345,6 +355,8 @@ _Parameters_ ### setNavigationMenu +> **Deprecated** + Action that sets a navigation menu. _Parameters_ @@ -385,6 +397,8 @@ _Returns_ ### setTemplatePart +> **Deprecated** + Action that sets a template part. _Parameters_ diff --git a/docs/reference-guides/data/data-core-editor.md b/docs/reference-guides/data/data-core-editor.md index 4fea2c51fa54f3..44078ab284e94f 100644 --- a/docs/reference-guides/data/data-core-editor.md +++ b/docs/reference-guides/data/data-core-editor.md @@ -248,6 +248,12 @@ _Returns_ Returns the post type of the post currently being edited. +_Usage_ + +```js +const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType(); +``` + _Parameters_ - _state_ `Object`: Global application state. @@ -284,6 +290,24 @@ _Returns_ Returns a single attribute of the post being edited, preferring the unsaved edit if one exists, but falling back to the attribute for the last known saved state of the post. +_Usage_ + +```js +// Get specific media size based on the featured media ID +// Note: change sizes?.large for any registered size +const getFeaturedMediaUrl = useSelect( ( select ) => { + const getFeaturedMediaId = + select( 'core/editor' ).getEditedPostAttribute( 'featured_media' ); + const getMedia = select( 'core' ).getMedia( getFeaturedMediaId ); + + return ( + getMedia?.media_details?.sizes?.large?.source_url || + getMedia?.source_url || + '' + ); +}, [] ); +``` + _Parameters_ - _state_ `Object`: Global application state. @@ -762,7 +786,7 @@ Return true if the current post has already been published. _Parameters_ - _state_ `Object`: Global application state. -- _currentPost_ `Object?`: Explicit current post for bypassing registry selector. +- _currentPost_ `[Object]`: Explicit current post for bypassing registry selector. _Returns_ @@ -1124,7 +1148,8 @@ Action that autosaves the current post. This includes server-side autosaving (de _Parameters_ -- _options_ `Object?`: Extra flags to identify the autosave. +- _options_ `[Object]`: Extra flags to identify the autosave. +- _options.local_ `[boolean]`: Whether to perform a local autosave. ### clearSelectedBlock @@ -1154,10 +1179,37 @@ Disables the publish sidebar. Returns an action object used in signalling that attributes of the post have been edited. +_Usage_ + +```js +// Update the post title +wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } ); +``` + +```js +// Get specific media size based on the featured media ID +// Note: change sizes?.large for any registered size +const getFeaturedMediaUrl = useSelect( ( select ) => { + const getFeaturedMediaId = + select( 'core/editor' ).getEditedPostAttribute( 'featured_media' ); + const getMedia = select( 'core' ).getMedia( getFeaturedMediaId ); + + return ( + getMedia?.media_details?.sizes?.large?.source_url || + getMedia?.source_url || + '' + ); +}, [] ); +``` + _Parameters_ - _edits_ `Object`: Post attributes to edit. -- _options_ `Object`: Options for the edit. +- _options_ `[Object]`: Options for the edit. + +_Returns_ + +- `Object`: Action object ### enablePublishSidebar @@ -1366,7 +1418,7 @@ Returns an action object used to signal that the blocks have been updated. _Parameters_ - _blocks_ `Array`: Block Array. -- _options_ `?Object`: Optional options. +- _options_ `[Object]`: Optional options. ### resetPost @@ -1380,7 +1432,7 @@ Action for saving the current post in the editor. _Parameters_ -- _options_ `Object`: +- _options_ `[Object]`: ### selectBlock @@ -1422,6 +1474,10 @@ _Parameters_ - _value_ `boolean|Object`: Whether the inserter should be opened (true) or closed (false). To specify an insertion point, use an object. - _value.rootClientId_ `string`: The root client ID to insert at. - _value.insertionIndex_ `number`: The index to insert at. +- _value.filterValue_ `string`: A query to filter the inserter results. +- _value.onSelect_ `Function`: A callback when an item is selected. +- _value.tab_ `string`: The tab to open in the inserter. +- _value.category_ `string`: The category to initialize in the inserter. _Returns_ @@ -1464,7 +1520,7 @@ _Parameters_ - _post_ `Object`: Post object. - _edits_ `Object`: Initial edited attributes object. -- _template_ `Array?`: Block Template. +- _template_ `[Array]`: Block Template. ### setupEditorState @@ -1530,6 +1586,11 @@ _Related_ Action that toggles Distraction free mode. Distraction free mode expects there are no sidebars, as due to the z-index values set, you can't close sidebars. +_Parameters_ + +- _options_ `[Object]`: Optional configuration object +- _options.createNotice_ `[boolean]`: Whether to create a notice + ### toggleEditorPanelEnabled Returns an action object used to enable or disable a panel in the editor. @@ -1564,6 +1625,14 @@ _Related_ - toggleSelection in core/block-editor store. +### toggleSpotlightMode + +Action that toggles the Spotlight Mode view option. + +### toggleTopToolbar + +Action that toggles the Top Toolbar view option. + ### trashPost Action for trashing the current post in the editor. diff --git a/docs/reference-guides/filters/block-filters.md b/docs/reference-guides/filters/block-filters.md index 637cecadf1402b..f1952ef9bf86f8 100644 --- a/docs/reference-guides/filters/block-filters.md +++ b/docs/reference-guides/filters/block-filters.md @@ -294,6 +294,31 @@ Used to filter an individual transform result from block transformation. All of Called immediately after the default parsing of a block's attributes and before validation to allow a plugin to manipulate attribute values in time for validation and/or the initial values rendering of the block in the editor. +The callback function for this filter accepts 4 parameters: +- `blockAttributes` (`Object`): All block attributes. +- `blockType` (`Object`): The block type. +- `innerHTML` (`string`): Raw block content. +- `attributes` (`object`): Known block attributes (from delimiters). + +In the example below, we use the `blocks.getBlockAttributes` filter to lock the position of all paragraph blocks on a page. + +```js +// Our filter function +function lockParagraphs( blockAttributes, blockType, innerHTML, attributes ) { + if('core/paragraph' === blockType.name) { + blockAttributes['lock'] = {move: true} + } + return blockAttributes; +} + +// Add the filter +wp.hooks.addFilter( + 'blocks.getBlockAttributes', + 'my-plugin/lock-paragraphs', + lockParagraphs +); +``` + ### `editor.BlockEdit` Used to modify the block's `edit` component. It receives the original block `BlockEdit` component and returns a new wrapped component. diff --git a/docs/reference-guides/interactivity-api/api-reference.md b/docs/reference-guides/interactivity-api/api-reference.md index 25498d10bde2ef..bbbb565684c578 100644 --- a/docs/reference-guides/interactivity-api/api-reference.md +++ b/docs/reference-guides/interactivity-api/api-reference.md @@ -6,8 +6,8 @@ Interactivity API is only available for WordPress 6.5 and above. To add interactions to blocks using the Interactivity API, developers can use: -- **Directives:** Added to the markup to add specific behavior to the DOM elements of the block -- **Store:** Contains the logic and data (state, actions, side effects, etc.) needed for the behavior +- **Directives:** Added to the markup to add specific behavior to the DOM elements of the block +- **Store:** Contains the logic and data (state, actions, side effects, etc.) needed for the behavior DOM elements are connected to data stored in the state and context through directives. If data in the state or context change directives will react to those changes, updating the DOM accordingly (see [diagram](https://excalidraw.com/#json=T4meh6lltJh6TCX51NTIu,DmIhxYSGFTL_ywZFbsmuSw)). @@ -21,21 +21,21 @@ Interactivity API directives use the `data-` prefix. Here's an example of direct ```html
    - - -

    - This element is now visible! -

    + + +

    + This element is now visible! +

    ``` @@ -52,24 +52,44 @@ The `wp-interactive` directive "activates" the interactivity for the DOM element ```html
    -

    I'm interactive now, and I can use directives!

    -
    -

    I'm also interactive, and I can also use directives!

    -
    +

    + I'm interactive now, + and I can use directives! +

    +
    +

    + I'm also interactive, + and I can also use directives! +

    +
    -

    I'm interactive now, and I can use directives!

    -
    -

    I'm also interactive, and I can also use directives!

    -
    +

    + I'm interactive now, + and I can use directives! +

    +
    +

    + I'm also interactive, + and I can also use directives! +

    +
    ``` @@ -96,31 +116,31 @@ The `wp-context` directive accepts a stringified JSON as a value. See store used with the directive above ```js -store( "myPlugin", { - actions: { - logId: () => { - const { post } = getContext(); - console.log( post.id ); - }, - }, +store( 'myPlugin', { + actions: { + logId: () => { + const { post } = getContext(); + console.log( post.id ); + }, + }, } ); ``` + Different contexts can be defined at different levels, and deeper levels will merge their own context with any parent one: ```html
    - + -
    - +
    + -
    - -
    - -
    +
    + +
    +
    ``` @@ -130,18 +150,18 @@ This directive allows setting HTML attributes on elements based on a boolean or ```html
  • - -
    - Title -
      - SUBMENU ITEMS -
    -
    + +
    + Title +
      + SUBMENU ITEMS +
    +
  • ``` @@ -149,33 +169,34 @@ This directive allows setting HTML attributes on elements based on a boolean or See store used with the directive above ```js -store( "myPlugin", { - actions: { - toggleMenu: () => { - const context = getContext(); - context.isMenuOpen = !context.isMenuOpen; - }, - }, +store( 'myPlugin', { + actions: { + toggleMenu: () => { + const context = getContext(); + context.isMenuOpen = ! context.isMenuOpen; + }, + }, } ); ``` + The `wp-bind` directive is executed: -- When the element is created -- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) +- When the element is created +- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) When `wp-bind` directive references a callback to get its final value: -- The `wp-bind` directive will be executed each time there's a change on any of the properties of the `state` or `context` used inside this callback. -- The returned value in the callback function is used to change the value of the associated attribute. +- The `wp-bind` directive will be executed each time there's a change on any of the properties of the `state` or `context` used inside this callback. +- The returned value in the callback function is used to change the value of the associated attribute. The `wp-bind` will do different things when the DOM element is applied, depending on its value: - - If the value is `true`, the attribute is added: `
    ` - - If the value is `false`, the attribute is removed: `
    ` - - If the value is a string, the attribute is added with its value assigned: `
    ` +- If the value is `true`, the attribute is added: `
    ` +- If the value is `false`, the attribute is removed: `
    ` +- If the value is a string, the attribute is added with its value assigned: `
    ` ### `wp-class` @@ -183,20 +204,20 @@ This directive adds or removes a class to an HTML element, depending on a boolea ```html
    -
  • - Option 1 -
  • -
  • - Option 2 -
  • +
  • + Option 1 +
  • +
  • + Option 2 +
  • ``` @@ -204,21 +225,22 @@ This directive adds or removes a class to an HTML element, depending on a boolea See store used with the directive above ```js -store( "myPlugin", { - actions: { - toggleSelection: () => { - const context = getContext(); - context.isSelected = !context.isSelected - } - } +store( 'myPlugin', { + actions: { + toggleSelection: () => { + const context = getContext(); + context.isSelected = ! context.isSelected; + }, + }, } ); ``` + The `wp-class` directive is executed: -- When the element is created -- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) +- When the element is created +- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) The boolean value received by the directive is used to toggle (add when `true` or remove when `false`) the associated class name from the `class` attribute. @@ -229,24 +251,24 @@ So, for example, use the class name `is-dark` instead of `isDark` and `data-wp-c ```html
    - +
    - +
    ``` ```css /* Recommended */ .is-dark { - /* ... */ + /* ... */ } /* Not recommended */ .isDark { - /* ... */ + /* ... */ } ``` @@ -255,9 +277,11 @@ So, for example, use the class name `is-dark` instead of `isDark` and `data-wp-c This directive adds or removes inline style to an HTML element, depending on its value. It follows the syntax `data-wp-style--css-property`. ```html -
    - -

    Hello World!

    +
    + +

    Hello World!

    > ``` @@ -266,26 +290,27 @@ This directive adds or removes inline style to an HTML element, depending on its See store used with the directive above ```js -store( "myPlugin", { - actions: { - toggleContextColor: () => { - const context = getContext(); - context.color = context.color === 'red' ? 'blue' : 'red'; - }, - }, +store( 'myPlugin', { + actions: { + toggleContextColor: () => { + const context = getContext(); + context.color = context.color === 'red' ? 'blue' : 'red'; + }, + }, } ); ``` + The `wp-style` directive is executed: -- When the element is created -- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) +- When the element is created +- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) The value received by the directive is used to add or remove the style attribute with the associated CSS property: -- If the value is `false`, the style attribute is removed: `
    ` -- If the value is a string, the attribute is added with its value assigned: `
    ` +- If the value is `false`, the style attribute is removed: `
    ` +- If the value is a string, the attribute is added with its value assigned: `
    ` ### `wp-text` @@ -293,10 +318,10 @@ It sets the inner text of an HTML element. ```html
    - - + +
    ``` @@ -304,21 +329,22 @@ It sets the inner text of an HTML element. See store used with the directive above ```js -store( "myPlugin", { - actions: { - toggleContextText: () => { - const context = getContext(); - context.text = context.text === 'Text 1' ? 'Text 2' : 'Text 1'; - }, - }, +store( 'myPlugin', { + actions: { + toggleContextText: () => { + const context = getContext(); + context.text = context.text === 'Text 1' ? 'Text 2' : 'Text 1'; + }, + }, } ); ``` + The `wp-text` directive is executed: -- When the element is created -- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) +- When the element is created +- Each time there's a change on any of the properties of the `state` or `context` involved in getting the final value of the directive (inside the callback or the expression passed as reference) The returned value is used to change the inner content of the element: `
    value
    `. @@ -340,14 +366,15 @@ This directive runs code on dispatched DOM events like `click` or `keyup`. The s See store used with the directive above ```js -store( "myPlugin", { - actions: { - logTime: ( event ) => { - console.log( new Date() ) - }, - }, +store( 'myPlugin', { + actions: { + logTime: ( event ) => { + console.log( new Date() ); + }, + }, } ); ``` + The `wp-on` directive is executed each time the associated event is triggered. @@ -378,7 +405,7 @@ The syntax of this directive is `data-wp-on-window--[window-event]` (like `data- See store used with the directive above ```js -store( "myPlugin", { +store( 'myPlugin', { callbacks: { logWidth() { console.log( 'Window width: ', window.innerWidth ); @@ -386,6 +413,7 @@ store( "myPlugin", { }, } ); ``` + The callback passed as the reference receives [the event](https://developer.mozilla.org/en-US/docs/Web/API/Event) (`event`), and the returned value by this callback is ignored. When the element is removed from the DOM, the event listener is also removed. @@ -414,14 +442,15 @@ The syntax of this directive is `data-wp-on-document--[document-event]` (like `d See store used with the directive above ```js -store( "myPlugin", { +store( 'myPlugin', { callbacks: { - logKeydown(event) { + logKeydown( event ) { console.log( 'Key pressed: ', event.key ); }, - }, + }, } ); ``` + The callback passed as the reference receives [the event](https://developer.mozilla.org/en-US/docs/Web/API/Event) (`event`), and the returned value by this callback is ignored. When the element is removed from the DOM, the event listener is also removed. @@ -439,13 +468,10 @@ You can attach several side effects to the same DOM element by using the syntax The `unique-id` doesn't need to be unique globally. It just needs to be different from the other unique IDs of the `wp-watch` directives of that DOM element. ```html -
    -

    Counter:

    - - +
    +

    Counter:

    + +
    ``` @@ -453,40 +479,41 @@ The `unique-id` doesn't need to be unique globally. It just needs to be differen See store used with the directive above ```js -store( "myPlugin", { - actions: { - increaseCounter: () => { - const context = getContext(); - context.counter++; - }, - decreaseCounter: () => { - const context = getContext(); - context.counter--; - }, - }, - callbacks: { - logCounter: () => { - const { counter } = getContext(); - console.log("Counter is " + counter + " at " + new Date() ); - }, - }, +store( 'myPlugin', { + actions: { + increaseCounter: () => { + const context = getContext(); + context.counter++; + }, + decreaseCounter: () => { + const context = getContext(); + context.counter--; + }, + }, + callbacks: { + logCounter: () => { + const { counter } = getContext(); + console.log( 'Counter is ' + counter + ' at ' + new Date() ); + }, + }, } ); ``` + The `wp-watch` directive is executed: -- When the element is created -- Each time that any of the properties of the `state` or `context` used inside the callback changes +- When the element is created +- Each time that any of the properties of the `state` or `context` used inside the callback changes The `wp-watch` directive can return a function. If it does, the returned function is used as cleanup logic, i.e., it will run just before the callback runs again, and it will run again when the element is removed from the DOM. As a reference, some use cases for this directive may be: -- Logging -- Changing the title of the page -- Setting the focus on an element with `.focus()`. -- Changing the state or context when certain conditions are met +- Logging +- Changing the title of the page +- Setting the focus on an element with `.focus()`. +- Changing the state or context when certain conditions are met ### `wp-init` @@ -498,7 +525,7 @@ The `unique-id` doesn't need to be unique globally. It just needs to be differen ```html
    -

    Hi!

    +

    Hi!

    ``` @@ -506,10 +533,10 @@ Here's another example with several `wp-init` directives on the same DOM element ```html
    - +
    ``` @@ -546,7 +573,7 @@ The `unique-id` doesn't need to be unique globally. It just needs to be differen ```html
    -

    Hi!

    +

    Hi!

    ``` @@ -554,38 +581,44 @@ The `unique-id` doesn't need to be unique globally. It just needs to be differen See store used with the directive above ```js -import { getElement, store, useState, useEffect } from '@wordpress/interactivity'; +import { + getElement, + store, + useState, + useEffect, +} from '@wordpress/interactivity'; // Unlike `data-wp-init` and `data-wp-watch`, you can use any hooks inside // `data-wp-run` callbacks. const useInView = () => { - const [ inView, setInView ] = useState( false ); - useEffect( () => { - const { ref } = getElement(); - const observer = new IntersectionObserver( ( [ entry ] ) => { - setInView( entry.isIntersecting ); - } ); - observer.observe( ref ); - return () => ref && observer.unobserve( ref ); - }, []); - return inView; + const [ inView, setInView ] = useState( false ); + useEffect( () => { + const { ref } = getElement(); + const observer = new IntersectionObserver( ( [ entry ] ) => { + setInView( entry.isIntersecting ); + } ); + observer.observe( ref ); + return () => ref && observer.unobserve( ref ); + }, [] ); + return inView; }; store( 'myPlugin', { - callbacks: { - logInView: () => { - const isInView = useInView(); - useEffect( () => { - if ( isInView ) { - console.log( 'Inside' ); - } else { - console.log( 'Outside' ); - } - }); - } - }, + callbacks: { + logInView: () => { + const isInView = useInView(); + useEffect( () => { + if ( isInView ) { + console.log( 'Inside' ); + } else { + console.log( 'Outside' ); + } + } ); + }, + }, } ); ``` + It's important to note that, similar to (P)React components, the `ref` from `getElement()` is `null` during the first render. To properly access the DOM element reference, you typically need to use an effect-like hook such as `useEffect`, `useInit`, or `useWatch`. This ensures that the `getElement()` runs after the component has been mounted and the `ref` is available. @@ -598,8 +631,8 @@ The key should be a string that uniquely identifies the element among its siblin ```html
      -
    • Item 1
    • -
    • Item 2
    • +
    • Item 1
    • +
    • Item 2
    ``` @@ -607,8 +640,8 @@ But it can also be used on other elements: ```html ``` @@ -624,9 +657,9 @@ For example, let's consider the following HTML. ```html
      - +
    ``` @@ -634,9 +667,9 @@ It would generate the following output: ```html
      -
    • hello
    • -
    • hola
    • -
    • olá
    • +
    • hello
    • +
    • hola
    • +
    • olá
    ``` @@ -644,9 +677,9 @@ The prop that holds the item in the context can be changed by passing a suffix t ```html
      - +
    ``` @@ -655,19 +688,21 @@ By default, it uses each element as the key for the rendered nodes, but you can For that, you must use `data-wp-each-key` in the `