From 4bc7458c51414174de4e9e9468e46365333b62b5 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Wed, 24 Aug 2022 13:22:48 +0000 Subject: [PATCH] Merge changes published in the Gutenberg plugin "release/14.0" branch --- .eslintrc.js | 13 + .github/workflows/create-block.yml | 3 - .github/workflows/performance.yml | 2 +- .github/workflows/stale-issue-mark-stale.yml | 1 + .github/workflows/unit-test.yml | 2 +- .gitignore | 1 + .stylelintignore | 3 + bin/plugin/commands/changelog.js | 41 +- changelog.txt | 847 ++++ composer.json | 1 - composer.lock | 3839 ----------------- .../getting-started-with-code-contribution.md | 2 +- docs/explanations/architecture/performance.md | 2 +- docs/explanations/architecture/styles.md | 2 +- .../writing-your-first-block-type.md | 1 + docs/how-to-guides/format-api.md | 2 +- docs/how-to-guides/platform/README.md | 2 +- .../platform/custom-block-editor/tutorial.md | 2 +- docs/how-to-guides/themes/theme-json.md | 57 +- docs/how-to-guides/themes/theme-support.md | 13 + .../block-api/block-metadata.md | 2 +- docs/reference-guides/core-blocks.md | 62 +- .../theme-json-reference/theme-json-living.md | 11 + docs/tool/manifest.js | 6 +- gutenberg.php | 2 +- lib/block-supports/duotone.php | 4 +- lib/block-supports/elements.php | 3 +- lib/block-supports/layout.php | 60 +- lib/block-supports/typography.php | 4 +- lib/blocks.php | 6 +- lib/client-assets.php | 2 +- .../wordpress-6.0/block-template-utils.php | 2 +- lib/compat/wordpress-6.0/edit-form-blocks.php | 2 +- .../wordpress-6.1/block-editor-settings.php | 2 +- lib/compat/wordpress-6.1/block-patterns.php | 45 + .../centered-footer-with-social-links.php | 41 + .../block-patterns/centered-footer.php | 25 + .../block-patterns/centered-header.php | 19 + .../centered-logo-in-navigation.php | 25 + ...ith-background-color-and-three-columns.php | 53 + ...footer-with-credit-line-and-navigation.php | 28 + .../footer-with-large-font-size.php | 25 + ...footer-with-navigation-and-credit-line.php | 27 + ...with-search-site-title-and-credit-line.php | 47 + ...footer-with-site-title-and-credit-line.php | 27 + .../header-with-large-font-size.php | 17 + .../block-patterns/left-aligned-footer.php | 23 + .../block-patterns/right-aligned-footer.php | 23 + .../simple-header-inside-image.php | 34 + .../simple-header-with-background-color.php | 23 + .../simple-header-with-image.php | 29 + .../simple-header-with-tagline-2.php | 27 + .../simple-header-with-tagline.php | 23 + .../block-patterns/simple-header.php | 23 + .../site-title-and-menu-button.php | 21 + .../site-title-and-vertical-navigation.php | 28 + lib/compat/wordpress-6.1/blocks.php | 2 +- .../wordpress-6.1/class-wp-theme-json-6-1.php | 114 +- .../get-global-styles-and-settings.php | 2 +- lib/compat/wordpress-6.1/theme.json | 64 +- ...-rest-block-editor-settings-controller.php | 5 + ...class-wp-theme-json-resolver-gutenberg.php | 5 + .../class-wp-webfonts-provider-local.php | 10 +- package-lock.json | 566 +-- package.json | 3 +- .../CHANGELOG.md | 4 + .../babel-plugin-import-jsx-pragma/README.md | 2 +- .../package.json | 2 +- packages/babel-plugin-makepot/CHANGELOG.md | 4 + packages/babel-plugin-makepot/README.md | 2 +- packages/babel-plugin-makepot/index.js | 37 +- packages/babel-plugin-makepot/package.json | 2 +- packages/babel-preset-default/CHANGELOG.md | 4 + packages/babel-preset-default/README.md | 2 +- packages/babel-preset-default/package.json | 2 +- packages/block-directory/package.json | 1 + .../src/components/block-ratings/stars.js | 11 +- .../downloadable-blocks-list/test/index.js | 6 +- .../block-directory/src/store/resolvers.js | 9 +- packages/block-editor/package.json | 2 + .../use-available-alignments.js | 2 +- .../block-edit-visually-button/index.js | 39 + .../src/components/block-popover/inbetween.js | 5 +- .../src/components/block-popover/index.js | 35 +- .../block-edit-visually-button.js | 52 - .../components/block-settings-menu/index.js | 26 +- .../src/components/block-switcher/index.js | 22 +- .../components/block-switcher/test/index.js | 1 + .../src/components/block-toolbar/index.js | 2 + .../block-tools/selected-block-popover.js | 7 + .../use-block-toolbar-popover-props.js | 123 + .../all-input-control.js | 45 +- .../components/border-radius-control/index.js | 30 +- .../border-radius-control/input-controls.js | 53 +- .../border-radius-control/test/utils.js | 82 +- .../components/border-radius-control/utils.js | 28 +- .../src/components/colors/with-colors.js | 12 +- .../src/components/copy-handler/index.js | 18 + .../components/date-format-picker/index.js | 26 +- .../components/date-format-picker/style.scss | 4 - .../src/components/duotone-control/style.scss | 4 - .../src/components/duotone/components.js | 10 +- .../font-appearance-control/style.scss | 2 - .../src/components/font-family/index.js | 2 +- .../components/font-sizes/with-font-sizes.js | 12 +- packages/block-editor/src/components/index.js | 1 + .../src/components/inserter/search-items.js | 22 +- .../components/link-control/link-preview.js | 1 - .../src/components/link-control/test/index.js | 1433 +++--- .../list-view/block-select-button.js | 9 +- .../src/components/list-view/style.scss | 15 +- .../list-view/use-block-selection.js | 10 +- .../components/media-replace-flow/style.scss | 1 + .../src/components/rich-text/use-enter.js | 3 - .../components/rich-text/use-format-types.js | 12 +- .../all-input-control.js | 40 + .../axial-input-controls.js | 62 + .../components/spacing-sizes-control/index.js | 91 + .../spacing-sizes-control/input-controls.js | 46 + .../spacing-sizes-control/linked-button.js | 25 + .../spacing-input-control.js | 280 ++ .../spacing-sizes-control/style.scss | 122 + .../spacing-sizes-control/test/utils.js | 156 + .../components/spacing-sizes-control/utils.js | 195 + .../src/components/url-input/index.js | 2 +- .../src/components/url-input/style.scss | 4 +- .../src/components/url-popover/style.scss | 3 - .../writing-flow/use-multi-selection.js | 5 +- .../writing-flow/use-selection-observer.js | 12 +- .../block-editor/src/hooks/border-radius.js | 8 +- packages/block-editor/src/hooks/border.js | 4 +- packages/block-editor/src/hooks/color.js | 16 +- packages/block-editor/src/hooks/dimensions.js | 15 + packages/block-editor/src/hooks/duotone.js | 8 +- packages/block-editor/src/hooks/gap.js | 9 +- .../src/hooks/generated-class-name.js | 15 +- packages/block-editor/src/hooks/layout.js | 59 +- packages/block-editor/src/hooks/margin.js | 66 +- packages/block-editor/src/hooks/padding.js | 55 +- packages/block-editor/src/hooks/style.js | 61 +- packages/block-editor/src/hooks/test/gap.js | 22 + .../block-editor/src/hooks/typography.scss | 1 - .../block-editor/src/layouts/constrained.js | 217 + packages/block-editor/src/layouts/flex.js | 2 +- packages/block-editor/src/layouts/flow.js | 170 +- packages/block-editor/src/layouts/index.js | 3 +- .../src/layouts/test/constrained.js | 21 + packages/block-editor/src/layouts/utils.js | 34 + packages/block-editor/src/store/actions.js | 36 +- packages/block-editor/src/store/selectors.js | 9 +- packages/block-editor/src/style.scss | 1 + packages/block-library/CHANGELOG.md | 6 +- packages/block-library/package.json | 3 +- .../block-library/src/archives/block.json | 6 +- packages/block-library/src/audio/block.json | 4 + packages/block-library/src/audio/style.scss | 2 + packages/block-library/src/button/block.json | 2 +- .../block-library/src/button/deprecated.js | 43 +- packages/block-library/src/button/style.scss | 12 +- packages/block-library/src/calendar/index.php | 4 +- .../block-library/src/categories/block.json | 15 +- packages/block-library/src/categories/edit.js | 4 +- packages/block-library/src/code/block.json | 6 +- packages/block-library/src/column/block.json | 13 + packages/block-library/src/columns/block.json | 13 + .../block-library/src/columns/deprecated.js | 14 +- packages/block-library/src/columns/edit.js | 10 +- .../block-library/src/columns/edit.native.js | 10 +- .../src/comment-author-name/block.json | 6 +- .../src/comment-content/block.json | 6 +- .../block-library/src/comment-date/block.json | 1 + .../src/comment-edit-link/block.json | 6 +- .../src/comment-reply-link/block.json | 6 +- .../src/comment-template/block.json | 15 +- .../src/comments-pagination-next/block.json | 6 +- .../comments-pagination-numbers/block.json | 15 +- .../src/comments-pagination-numbers/edit.js | 15 +- .../comments-pagination-previous/block.json | 6 +- .../src/comments-pagination/block.json | 13 + .../src/comments-title/block.json | 6 +- .../block-library/src/comments/block.json | 13 + packages/block-library/src/comments/index.php | 11 +- packages/block-library/src/cover/block.json | 13 + .../block-library/src/cover/deprecated.js | 15 +- packages/block-library/src/cover/shared.js | 3 +- packages/block-library/src/embed/icons.js | 2 +- packages/block-library/src/gallery/block.json | 5 + .../block-library/src/gallery/deprecated.js | 6 +- packages/block-library/src/gallery/edit.js | 24 +- .../block-library/src/gallery/transforms.js | 23 +- packages/block-library/src/gallery/utils.js | 18 +- packages/block-library/src/group/block.json | 12 +- .../block-library/src/group/deprecated.js | 91 +- packages/block-library/src/group/edit.js | 17 +- packages/block-library/src/group/editor.scss | 31 +- .../block-library/src/group/variations.js | 7 +- packages/block-library/src/heading/block.json | 4 +- .../block-library/src/heading/deprecated.js | 6 +- packages/block-library/src/home-link/edit.js | 39 +- packages/block-library/src/image/block.json | 20 +- packages/block-library/src/image/edit.js | 20 +- packages/block-library/src/image/editor.scss | 42 +- packages/block-library/src/image/index.php | 2 +- packages/block-library/src/index.native.js | 25 +- packages/block-library/src/list-item/edit.js | 3 +- .../src/list-item/hooks/index.js | 1 + .../src/list-item/hooks/use-copy.js | 36 + .../src/list-item/list-style-type.native.js | 9 +- .../src/list-item/style.native.scss | 4 + packages/block-library/src/list/block.json | 4 + .../block-library/src/media-text/block.json | 17 + .../src/media-text/deprecated.js | 5 +- .../block-library/src/media-text/style.scss | 2 + .../block-library/src/navigation-link/edit.js | 22 +- .../src/navigation-submenu/edit.js | 22 +- .../block-library/src/navigation/block.json | 1 + .../src/navigation/deprecated.js | 6 +- .../src/navigation/edit/index.js | 240 +- .../navigation/edit/unsaved-inner-blocks.js | 4 +- .../use-convert-classic-menu-to-block-menu.js | 68 +- .../block-library/src/navigation/editor.scss | 5 +- .../block-library/src/navigation/index.php | 27 +- .../src/navigation/menu-items-to-blocks.js | 9 +- .../block-library/src/navigation/style.scss | 5 +- .../navigation/test/use-navigation-menu.js | 19 +- .../src/navigation/use-navigation-menu.js | 19 +- packages/block-library/src/page-list/edit.js | 8 +- .../block-library/src/paragraph/block.json | 7 + .../block-library/src/paragraph/deprecated.js | 68 +- packages/block-library/src/paragraph/edit.js | 1 + .../block-library/src/paragraph/editor.scss | 8 +- .../src/post-author-biography/block.json | 1 + .../src/post-author-name/block.json | 6 +- .../block-library/src/post-author/block.json | 6 +- .../src/post-comments-count/block.json | 5 +- .../src/post-comments-count/edit.js | 12 +- .../src/post-comments-link/block.json | 6 +- .../block-library/src/post-date/block.json | 9 + packages/block-library/src/post-date/edit.js | 14 +- .../block-library/src/post-date/index.php | 12 +- .../block-library/src/post-date/style.scss | 4 + .../src/post-featured-image/block.json | 12 + .../src/post-featured-image/edit.js | 56 +- .../src/post-featured-image/editor.scss | 97 +- .../src/post-featured-image/index.php | 65 +- .../src/post-featured-image/style.scss | 1 + .../src/post-navigation-link/block.json | 5 +- .../src/post-template/block.json | 16 +- .../block-library/src/post-template/edit.js | 7 +- .../block-library/src/post-template/index.php | 11 +- .../block-library/src/post-terms/block.json | 8 +- .../block-library/src/post-title/block.json | 3 +- .../block-library/src/post-title/style.scss | 2 + .../block-library/src/preformatted/block.json | 6 +- .../block-library/src/pullquote/block.json | 15 +- .../block-library/src/pullquote/deprecated.js | 902 ++-- packages/block-library/src/pullquote/edit.js | 2 +- .../src/pullquote/edit.native.js | 1 - .../block-library/src/pullquote/editor.scss | 16 - packages/block-library/src/pullquote/index.js | 4 +- packages/block-library/src/pullquote/save.js | 2 +- .../block-library/src/pullquote/style.scss | 11 - .../block-library/src/pullquote/transforms.js | 50 +- .../src/query-no-results/edit.js | 2 +- .../block-library/src/query-title/block.json | 9 +- .../block-library/src/query-title/edit.js | 21 +- .../block-library/src/query-title/index.php | 12 +- .../block-library/src/query-title/style.scss | 4 + .../block-library/src/query/deprecated.js | 13 +- .../block-library/src/query/edit/index.js | 43 +- .../inspector-controls/taxonomy-controls.js | 2 +- .../src/query/edit/query-placeholder.js | 19 +- packages/block-library/src/query/utils.js | 36 +- .../block-library/src/quote/deprecated.js | 11 +- .../block-library/src/quote/transforms.js | 22 +- packages/block-library/src/search/index.php | 2 +- .../block-library/src/separator/block.json | 1 + .../block-library/src/separator/deprecated.js | 5 +- .../block-library/src/site-logo/editor.scss | 74 +- .../src/social-link/icons/reddit.js | 2 +- .../block-library/src/social-link/index.php | 2 +- .../src/social-link/socials-with-bg.scss | 2 +- .../src/social-link/socials-without-bg.scss | 2 +- .../block-library/src/social-links/block.json | 9 + .../block-library/src/social-links/edit.js | 66 +- packages/block-library/src/spacer/block.json | 8 +- packages/block-library/src/style.scss | 2 + .../src/table-of-contents/block.json | 25 +- packages/block-library/src/table/block.json | 4 + packages/block-library/src/table/state.js | 40 +- .../block-library/src/tag-cloud/block.json | 6 +- .../block-library/src/template-part/index.js | 5 +- .../src/term-description/block.json | 4 + .../block-library/src/text-columns/edit.js | 4 +- .../block-library/src/text-columns/save.js | 4 +- packages/block-library/src/verse/block.json | 1 + packages/block-library/src/video/block.json | 4 + packages/block-library/src/video/style.scss | 2 + packages/blocks/CHANGELOG.md | 4 + packages/blocks/package.json | 4 +- packages/blocks/src/api/constants.js | 3 + packages/blocks/src/api/factory.js | 11 +- .../src/api/parser/fix-custom-classname.js | 7 +- .../src/api/raw-handling/is-inline-content.js | 9 +- .../src/api/raw-handling/paste-handler.js | 4 + .../raw-handling/slack-paragraph-corrector.js | 21 + packages/blocks/src/api/registration.js | 17 +- packages/blocks/src/api/validation/index.js | 16 +- packages/blocks/src/store/actions.js | 2 +- packages/blocks/src/store/reducer.js | 96 +- packages/blocks/src/store/selectors.js | 5 +- packages/browserslist-config/CHANGELOG.md | 4 + packages/browserslist-config/README.md | 2 +- packages/browserslist-config/package.json | 2 +- packages/components/CHANGELOG.md | 74 +- packages/components/CONTRIBUTING.md | 20 +- packages/components/package.json | 9 +- .../src/alignment-matrix-control/index.js | 2 +- .../alignment-matrix-control/stories/index.js | 73 +- .../styles/alignment-matrix-control-styles.js | 4 +- .../src/angle-picker-control/index.js | 8 +- .../src/angle-picker-control/stories/index.js | 13 +- .../styles/angle-picker-control-styles.js | 15 +- packages/components/src/autocomplete/index.js | 27 +- .../styles/base-control-styles.ts | 2 +- packages/components/src/base-field/styles.js | 2 +- .../test/__snapshots__/index.js.snap | 4 +- .../styles/box-control-visualizer-styles.js | 1 - .../components/src/box-control/test/index.js | 16 +- packages/components/src/button/test/index.js | 334 +- .../card-body/{component.js => component.tsx} | 22 +- .../src/card/card-body/{hook.js => hook.ts} | 10 +- .../src/card/card-body/{index.js => index.ts} | 0 .../{component.js => component.tsx} | 26 +- .../card/card-divider/{hook.js => hook.ts} | 10 +- .../card/card-divider/{index.js => index.ts} | 0 .../{component.js => component.tsx} | 22 +- .../src/card/card-footer/{hook.js => hook.ts} | 10 +- .../card/card-footer/{index.js => index.ts} | 0 .../{component.js => component.tsx} | 22 +- .../src/card/card-header/{hook.js => hook.ts} | 10 +- .../card/card-header/{index.js => index.ts} | 0 .../{component.js => component.tsx} | 21 +- .../src/card/card-media/{hook.js => hook.ts} | 10 +- .../card/card-media/{index.js => index.ts} | 0 .../card/card/{component.js => component.tsx} | 22 +- .../src/card/card/{hook.js => hook.ts} | 22 +- .../src/card/card/{index.js => index.ts} | 0 .../src/card/{context.js => context.ts} | 0 .../src/card/{index.js => index.ts} | 0 packages/components/src/card/stories/index.js | 209 - .../components/src/card/stories/index.tsx | 75 + .../src/card/{styles.js => styles.ts} | 0 .../{index.js.snap => index.tsx.snap} | 0 .../src/card/test/{index.js => index.tsx} | 6 +- packages/components/src/card/types.ts | 9 +- .../components/src/color-list-picker/index.js | 18 +- .../src/color-list-picker/style.scss | 11 + .../components/src/color-palette/index.js | 48 +- .../src/color-palette/index.native.js | 16 +- .../src/color-palette/stories/index.js | 2 +- .../test/__snapshots__/index.js.snap | 20 +- .../components/src/combobox-control/index.js | 11 +- .../src/combobox-control/stories/index.js | 12 +- .../src/combobox-control/style.scss | 1 - .../src/confirm-dialog/test/index.js | 147 +- .../gradient-bar}/constants.js | 0 .../gradient-bar}/control-points.js | 104 +- .../gradient-bar}/index.js | 3 - .../gradient-bar}/test/utils.js | 0 .../gradient-bar}/utils.js | 0 .../src/custom-gradient-picker/index.js | 21 +- .../custom-gradient-picker/stories/index.js | 7 +- .../src/custom-gradient-picker/style.scss | 57 +- .../src/custom-select-control/README.md | 10 + .../src/custom-select-control/index.js | 38 +- .../custom-select-control/stories/index.js | 2 +- .../src/custom-select-control/style.scss | 12 - .../src/custom-select-control/styles.ts | 28 + .../src/custom-select-control/test/index.js | 5 +- .../components/src/date-time/constants.ts | 1 + .../src/date-time/date-time/index.tsx | 5 +- .../src/date-time/date/datepicker.scss | 863 ---- .../components/src/date-time/date/index.tsx | 473 +- .../components/src/date-time/date/style.scss | 85 - .../components/src/date-time/date/styles.ts | 113 +- .../src/date-time/date/test/index.tsx | 46 +- .../src/date-time/date/test/utils.ts | 32 - .../components/src/date-time/date/utils.ts | 20 - packages/components/src/date-time/style.scss | 1 - .../components/src/date-time/time/index.tsx | 42 +- packages/components/src/date-time/utils.ts | 17 + .../components/src/dimension-control/index.js | 6 +- packages/components/src/disabled/index.js | 55 - packages/components/src/disabled/index.tsx | 80 + .../components/src/disabled/stories/index.js | 61 - .../components/src/disabled/stories/index.tsx | 87 + ...disabled-styles.js => disabled-styles.tsx} | 0 .../components/src/disabled/test/index.js | 240 -- .../components/src/disabled/test/index.tsx | 174 + packages/components/src/disabled/types.ts | 13 + packages/components/src/drop-zone/index.js | 5 +- .../src/dropdown-menu/stories/index.js | 15 +- packages/components/src/dropdown/index.js | 8 +- .../src/duotone-picker/custom-duotone-bar.js | 2 +- .../src/duotone-picker/duotone-picker.js | 60 +- .../src/duotone-picker/duotone-swatch.js | 17 +- .../duotone-picker/stories/duotone-picker.js | 66 + .../duotone-picker/stories/duotone-swatch.js | 32 + .../src/focal-point-picker/index.js | 15 +- .../styles/focal-point-style.js | 1 - .../src/focal-point-picker/test/index.js | 123 +- .../components/src/font-size-picker/index.js | 305 +- .../src/font-size-picker/stories/index.js | 1 + .../src/font-size-picker/style.scss | 13 +- .../src/font-size-picker/test/index.js | 19 +- .../test/{util.js => utils.js} | 78 +- .../components/src/font-size-picker/utils.js | 61 +- .../components/src/form-token-field/README.md | 1 + .../components/src/form-token-field/index.tsx | 74 +- .../src/form-token-field/stories/index.tsx | 8 + .../src/form-token-field/test/index.js | 411 -- .../src/form-token-field/test/index.tsx | 2106 +++++++++ .../src/form-token-field/test/lib/fixtures.js | 89 - .../test/lib/token-field-wrapper.tsx | 71 - .../components/src/form-token-field/types.ts | 7 + .../components/src/gradient-picker/index.js | 29 +- .../src/gradient-picker/stories/index.js | 137 +- packages/components/src/guide/index.js | 4 +- packages/components/src/guide/page-control.js | 7 +- .../components/src/guide/stories/index.js | 23 +- packages/components/src/guide/test/index.js | 91 +- .../components/src/guide/test/page-control.js | 31 +- .../higher-order/with-notices/test/index.js | 6 +- .../with-spoken-messages/test/index.js | 2 +- packages/components/src/item-group/styles.ts | 6 +- .../test/__snapshots__/index.js.snap | 23 - .../components/src/menu-group/test/index.js | 25 +- .../src/mobile/bottom-sheet/index.native.js | 6 +- .../global-styles-context/utils.native.js | 3 +- .../src/mobile/image/index.native.js | 39 +- .../src/mobile/picker/index.android.js | 14 +- .../src/mobile/picker/styles.native.scss | 8 +- packages/components/src/modal/index.js | 3 +- packages/components/src/modal/test/index.js | 20 +- .../src/navigable-container/container.js | 30 +- .../src/navigable-container/menu.js | 10 +- .../src/navigable-container/test/menu.js | 25 +- .../navigator/navigator-back-button/hook.ts | 3 - .../src/navigator/navigator-button/hook.ts | 3 - packages/components/src/notice/list.js | 22 +- packages/components/src/palette-edit/index.js | 1 + .../components/src/palette-edit/styles.js | 11 +- packages/components/src/placeholder/README.md | 2 +- .../components/src/placeholder/style.scss | 85 +- .../components/src/placeholder/test/index.js | 163 - .../components/src/placeholder/test/index.tsx | 174 + packages/components/src/popover/index.js | 245 +- .../components/src/popover/stories/index.js | 20 +- .../popover/test/__snapshots__/index.js.snap | 12 +- packages/components/src/popover/test/index.js | 165 +- packages/components/src/popover/utils.js | 107 + .../components/src/range-control/index.tsx | 3 + .../styles/range-control-styles.ts | 13 +- .../components/src/range-control/types.ts | 7 +- .../src/select-control/chevron-down.tsx | 25 + .../components/src/select-control/index.tsx | 15 +- .../styles/select-control-styles.ts | 37 +- .../components/src/slot-fill/test/slot.js | 10 +- packages/components/src/snackbar/list.js | 5 +- packages/components/src/spinner/index.tsx | 2 + packages/components/src/style.scss | 2 - packages/components/src/swatch/index.tsx | 22 - packages/components/src/swatch/style.scss | 21 - packages/components/src/swatch/types.ts | 11 - packages/components/src/text/styles.js | 2 +- packages/components/src/text/test/index.tsx | 2 +- .../src/toggle-group-control/stories/index.js | 203 - .../toggle-group-control/stories/index.tsx | 127 + .../{index.js.snap => index.tsx.snap} | 50 +- .../test/{index.js => index.tsx} | 6 +- .../component.tsx | 3 + .../styles.ts | 18 + .../README.md | 14 +- .../component.tsx | 37 +- .../toggle-group-control-option/component.tsx | 22 +- .../toggle-group-control/README.md | 2 + .../toggle-group-control/component.tsx | 27 +- .../toggle-group-control/styles.ts | 15 +- .../src/toggle-group-control/types.ts | 133 +- .../src/toolbar-group/test/index.js | 24 +- packages/components/src/toolbar/test/index.js | 8 +- packages/components/src/tools-panel/styles.ts | 4 +- .../test/__snapshots__/index.js.snap | 210 - .../components/src/tools-panel/test/index.js | 5 +- packages/components/src/tooltip/index.js | 6 +- packages/components/src/tooltip/test/index.js | 360 +- packages/components/src/tree-grid/index.js | 13 +- .../src/ui/context/context-connect.ts | 5 +- .../components/src/unit-control/index.tsx | 4 +- packages/components/src/unit-control/types.ts | 11 +- .../components/src/utils/colors-values.js | 179 +- .../components/src/utils/config-values.js | 2 +- .../src/utils/input/input-control.js | 12 +- packages/components/src/utils/rtl.js | 8 +- packages/components/src/utils/strings.ts | 72 + packages/components/src/utils/test/strings.js | 15 + packages/components/tsconfig.json | 1 - packages/compose/package.json | 1 + .../create-higher-order-component/index.ts | 4 +- packages/core-data/CHANGELOG.md | 4 + packages/core-data/README.md | 79 +- packages/core-data/package.json | 1 + packages/core-data/src/entities.ts | 14 +- packages/core-data/src/entity-types/theme.ts | 4 + packages/core-data/src/hooks/index.ts | 4 + .../src/hooks/test/use-entity-record.js | 42 +- .../hooks/test/use-resource-permissions.js | 68 +- .../core-data/src/hooks/use-entity-record.ts | 22 +- .../src/hooks/use-resource-permissions.ts | 102 +- packages/core-data/src/index.js | 3 - packages/core-data/src/resolvers.js | 60 +- .../CHANGELOG.md | 4 + .../block-templates/index.js.mustache | 5 + .../block-templates/save.js.mustache | 2 + .../block-templates/template.php.mustache | 5 + .../create-block-tutorial-template/index.js | 10 + .../plugin-templates/$slug.php.mustache | 27 + packages/create-block/CHANGELOG.md | 9 + packages/create-block/README.md | 19 +- .../lib/check-system-requirements.js | 30 +- packages/create-block/lib/index.js | 141 +- packages/create-block/lib/init-block.js | 33 +- .../create-block/lib/init-package-json.js | 17 +- packages/create-block/lib/output.js | 14 +- packages/create-block/lib/prompts.js | 13 +- packages/create-block/lib/scaffold.js | 88 +- packages/create-block/lib/templates.js | 55 +- .../lib/templates/block/index.js.mustache | 5 + .../lib/templates/block/save.js.mustache | 2 + .../lib/templates/block/template.php.mustache | 5 + .../lib/templates/es5/$slug.php.mustache | 20 + .../lib/templates/es5/index.js.mustache | 2 + .../lib/templates/es5/template.php.mustache | 5 + .../lib/templates/plugin/$slug.php.mustache | 27 + packages/create-block/package.json | 5 +- .../keyboard-shortcut-help-modal/style.scss | 5 - packages/data/CHANGELOG.md | 8 + packages/data/README.md | 4 + packages/data/package.json | 3 +- packages/data/src/index.js | 5 +- .../data/src/plugins/persistence/index.js | 2 +- packages/data/src/types.ts | 8 + packages/data/tsconfig.json | 6 +- packages/date/README.md | 4 +- packages/date/src/index.js | 24 +- .../CHANGELOG.md | 4 + .../README.md | 2 +- .../package.json | 2 +- packages/docgen/lib/get-export-entries.js | 9 +- .../lib/get-intermediate-representation.js | 9 +- packages/docgen/lib/get-leading-comments.js | 10 +- packages/docgen/lib/get-type-annotation.js | 2 +- packages/docgen/lib/index.js | 6 +- packages/docgen/package.json | 1 - .../e2e-test-utils-playwright/package.json | 4 +- .../src/admin/index.ts | 3 - .../src/page-utils/press-key-with-modifier.ts | 4 +- .../src/request-utils/plugins.ts | 2 +- packages/e2e-test-utils/CHANGELOG.md | 4 + packages/e2e-test-utils/README.md | 4 +- packages/e2e-test-utils/package.json | 3 +- .../e2e-test-utils/src/click-menu-item.js | 11 +- .../src/click-on-more-menu-item.js | 13 +- ...-sidebar-panel-toggle-button-with-title.js | 12 +- .../src/get-all-block-inserter-item-titles.js | 7 +- packages/e2e-test-utils/src/plugins.js | 2 +- .../src/press-key-with-modifier.js | 6 +- packages/e2e-test-utils/src/preview.js | 7 +- packages/e2e-tests/CHANGELOG.md | 6 +- packages/e2e-tests/README.md | 2 +- packages/e2e-tests/assets/large-post.html | 546 ++- packages/e2e-tests/package.json | 2 +- .../__snapshots__/navigation.test.js.snap | 4 +- .../blocks/__snapshots__/quote.test.js.snap | 6 +- .../specs/editor/blocks/navigation.test.js | 548 ++- .../specs/editor/blocks/quote.test.js | 5 +- .../__snapshots__/cpt-locking.test.js.snap | 4 +- .../editor/plugins/wp-editor-meta-box.test.js | 58 - .../__snapshots__/block-grouping.test.js.snap | 10 +- .../block-hierarchy-navigation.test.js.snap | 2 +- .../draggable-block.test.js.snap | 24 +- .../inserting-blocks.test.js.snap | 2 +- ...ep-styles-on-block-transforms.test.js.snap | 2 +- .../multi-block-selection.test.js.snap | 14 +- .../editor/various/block-grouping.test.js | 4 +- .../editor/various/draggable-block.test.js | 97 +- .../various/multi-block-selection.test.js | 33 +- .../editor/various/post-visibility.test.js | 6 +- .../specs/editor/various/scheduling.test.js | 8 +- .../editor/various/switch-to-draft.test.js | 6 +- .../specs/performance/post-editor.test.js | 6 +- .../site-editor/global-styles-sidebar.test.js | 3 +- .../block-placeholder/menu-items-to-blocks.js | 9 +- .../src/components/sidebar/style.scss | 5 +- .../src/filters/add-menu-name-editor.js | 5 +- packages/edit-navigation/src/store/actions.js | 18 +- .../edit-navigation/src/store/transform.js | 6 +- .../plugin-block-settings-menu-item.js | 7 +- .../components/header/header-toolbar/index.js | 1 + .../components/sidebar/post-template/form.js | 29 +- .../src/components/visual-editor/index.js | 12 +- .../add-new-template/new-template.js | 17 +- .../block-editor/resizable-editor.js | 46 +- .../src/components/editor/style.scss | 1 + .../components/global-styles/border-panel.js | 6 +- .../global-styles/dimensions-panel.js | 164 +- .../src/components/global-styles/hooks.js | 6 +- .../src/components/global-styles/style.scss | 5 +- .../test/use-global-styles-output.js | 19 +- .../components/global-styles/test/utils.js | 76 +- .../global-styles/typography-panel.js | 190 +- .../global-styles/use-global-styles-output.js | 55 +- .../src/components/global-styles/utils.js | 33 +- .../header/document-actions/index.js | 3 + .../edit-site/src/components/header/index.js | 5 +- .../components/header/mode-switcher/index.js | 3 - .../src/components/header/more-menu/index.js | 9 +- .../src/components/sidebar/default-sidebar.js | 12 + .../sidebar/plugin-sidebar/index.js | 12 + .../template-details/edit-template-title.js | 10 +- .../src/components/template-details/index.js | 27 +- .../components/template-details/style.scss | 5 - .../template-part-area-selector.js | 38 + packages/edit-site/src/index.js | 2 +- .../index.js | 58 +- .../src/components/post-author/test/check.js | 14 +- .../post-last-revision/test/check.js | 14 +- .../post-pending-status/test/check.js | 10 +- .../components/post-schedule/test/check.js | 10 +- .../src/components/post-slug/test/check.js | 6 +- .../src/components/post-sticky/test/index.js | 18 +- .../post-taxonomies/flat-term-selector.js | 12 +- .../editor/src/components/post-title/index.js | 18 +- .../components/post-visibility/test/check.js | 24 +- .../provider/use-block-editor-settings.js | 1 + .../theme-support-check/test/index.js | 28 +- .../custom-sources-backwards-compatibility.js | 26 +- packages/editor/src/store/actions.js | 7 +- packages/editor/src/store/reducer.js | 26 +- packages/editor/src/store/selectors.js | 57 +- packages/element/CHANGELOG.md | 4 + packages/element/package.json | 2 +- packages/element/src/serialize.js | 2 +- packages/element/src/test/platform.js | 10 +- packages/eslint-plugin/CHANGELOG.md | 7 +- packages/eslint-plugin/README.md | 20 +- .../configs/recommended-with-formatting.js | 26 +- .../docs/rules/dependency-group.md | 4 +- packages/eslint-plugin/package.json | 4 +- .../rules/__tests__/dependency-group.js | 12 +- .../rules/__tests__/no-unsafe-wp-apis.js | 14 +- .../components/interface-skeleton/index.js | 3 - packages/jest-console/CHANGELOG.md | 4 + packages/jest-console/README.md | 2 +- packages/jest-console/package.json | 2 +- packages/jest-preset-default/CHANGELOG.md | 8 + packages/jest-preset-default/README.md | 2 +- packages/jest-preset-default/jest-preset.js | 1 - packages/jest-preset-default/package.json | 2 +- packages/jest-puppeteer-axe/CHANGELOG.md | 4 + packages/jest-puppeteer-axe/README.md | 2 +- packages/jest-puppeteer-axe/package.json | 2 +- packages/keycodes/package.json | 1 + packages/keycodes/src/index.js | 20 +- .../npm-package-json-lint-config/CHANGELOG.md | 8 + .../npm-package-json-lint-config/README.md | 2 +- .../npm-package-json-lint-config/package.json | 2 +- .../test/index.test.js | 11 +- packages/postcss-plugins-preset/CHANGELOG.md | 4 + packages/postcss-plugins-preset/README.md | 2 +- packages/postcss-plugins-preset/package.json | 2 +- packages/postcss-themes/CHANGELOG.md | 4 + packages/postcss-themes/README.md | 2 +- packages/postcss-themes/package.json | 2 +- packages/prettier-config/CHANGELOG.md | 8 + packages/prettier-config/README.md | 2 +- packages/prettier-config/package.json | 2 +- packages/prettier-config/test/index.js | 8 +- .../gutenberg-editor-block-insertion.test.js | 4 +- .../__device-tests__/helpers/utils.js | 6 +- .../CHANGELOG.md | 4 +- .../README.md | 2 +- .../package.json | 2 +- packages/redux-routine/CHANGELOG.md | 4 + packages/redux-routine/package.json | 2 +- packages/redux-routine/src/is-action.js | 2 +- packages/rich-text/src/get-text-content.js | 11 +- packages/scripts/CHANGELOG.md | 9 + packages/scripts/README.md | 2 +- packages/scripts/config/.eslintrc.js | 7 + packages/scripts/package.json | 4 +- packages/style-engine/README.md | 122 +- ...class-wp-style-engine-css-declarations.php | 33 +- .../class-wp-style-engine-css-rule.php | 14 +- .../class-wp-style-engine-css-rules-store.php | 9 +- .../class-wp-style-engine-processor.php | 10 +- .../style-engine/class-wp-style-engine.php | 175 +- ...-wp-style-engine-css-declarations-test.php | 2 + ...s-wp-style-engine-css-rules-store-test.php | 14 + .../phpunit/class-wp-style-engine-test.php | 42 +- packages/style-engine/src/index.ts | 8 +- .../src/styles/typography/index.ts | 13 + packages/style-engine/src/styles/utils.ts | 10 +- packages/style-engine/src/test/index.js | 34 +- packages/style-engine/src/types.ts | 7 +- packages/stylelint-config/CHANGELOG.md | 4 + packages/stylelint-config/README.md | 2 +- packages/stylelint-config/package.json | 2 +- .../src/blocks/legacy-widget/edit/form.js | 4 +- .../src/blocks/legacy-widget/editor.scss | 4 +- phpcs.xml.dist | 9 + phpunit.xml.dist | 1 + phpunit/blocks/render-comments-test.php | 46 + phpunit/blocks/render-last-posts-test.php | 41 +- phpunit/bootstrap.php | 17 + ...ass-block-library-navigation-link-test.php | 19 + phpunit/class-wp-theme-json-test.php | 286 +- phpunit/class-wp-webfonts-test.php | 2 + schemas/json/block.json | 5 + schemas/json/theme.json | 11 +- storybook/decorators/with-margin-checker.js | 40 + storybook/preview.js | 16 +- ...ed-using-the-block-inserter-1-chromium.txt | 2 +- ...ed-using-the-slash-inserter-1-chromium.txt | 2 +- ...t-using-the-button-appender-1-chromium.txt | 2 +- ...e-into-group-with-Backspace-1-chromium.txt | 9 + ...e-into-group-with-Backspace-2-chromium.txt | 9 + test/e2e/specs/editor/blocks/group.spec.js | 17 + .../editor/plugins/wp-editor-meta-box.spec.js | 42 + ...extual-element-image-spacer-1-chromium.txt | 10 +- ...ld-handle-paste-events-once-1-chromium.txt | 10 +- .../editor/various/copy-cut-paste.spec.js | 29 +- test/integration/blocks-raw-handling.test.js | 1 + .../fixtures/blocks/core__comments.json | 6 +- .../blocks/core__comments.serialized.html | 2 +- .../blocks/core__comments__deprecated-1.json | 6 +- ...re__comments__deprecated-1.serialized.html | 2 +- .../core__group-layout-content-size.html | 11 + .../core__group-layout-content-size.json | 34 + ...ore__group-layout-content-size.parsed.json | 36 + ..._group-layout-content-size.serialized.html | 9 + ...group-layout-content-size__deprecated.html | 11 + ...group-layout-content-size__deprecated.json | 35 + ...ayout-content-size__deprecated.parsed.json | 36 + ...t-content-size__deprecated.serialized.html | 9 + .../fixtures/blocks/core__group.html | 18 +- .../fixtures/blocks/core__group.json | 3 + .../fixtures/blocks/core__group.parsed.json | 21 +- .../blocks/core__group.serialized.html | 2 +- .../blocks/core__group__deprecated-3.html | 9 + .../blocks/core__group__deprecated-3.json | 31 + .../core__group__deprecated-3.parsed.json | 33 + .../core__group__deprecated-3.serialized.html | 9 + .../fixtures/blocks/core__post-date.json | 3 +- .../fixtures/blocks/core__pullquote.json | 2 +- .../core__pullquote__custom-colors.json | 2 +- ...ullquote__custom-colors__deprecated-4.json | 2 +- .../blocks/core__pullquote__deprecated-1.json | 2 +- .../blocks/core__pullquote__deprecated-2.json | 2 +- .../blocks/core__pullquote__deprecated-3.json | 2 +- .../blocks/core__pullquote__deprecated-4.json | 2 +- .../blocks/core__pullquote__deprecated-5.html | 7 + .../blocks/core__pullquote__deprecated-5.json | 11 + .../core__pullquote__deprecated-5.parsed.json | 11 + ...e__pullquote__deprecated-5.serialized.html | 3 + ...quote__deprecated-5__multi-paragraph.html} | 0 ...quote__deprecated-5__multi-paragraph.json} | 2 +- ...deprecated-5__multi-paragraph.parsed.json} | 0 ...ecated-5__multi-paragraph.serialized.html} | 2 +- ...ore__pullquote__deprecated-main-color.json | 2 +- .../fixtures/blocks/core__query-title.json | 1 + .../documents/slack-paragraphs-in.html | 1 + .../documents/slack-paragraphs-out.html | 11 + test/integration/fixtures/utils.js | 15 +- test/native/jest.config.js | 2 +- 786 files changed, 16719 insertions(+), 13724 deletions(-) delete mode 100644 composer.lock create mode 100644 lib/compat/wordpress-6.1/block-patterns/centered-footer-with-social-links.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/centered-footer.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/centered-header.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/centered-logo-in-navigation.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/footer-with-background-color-and-three-columns.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/footer-with-credit-line-and-navigation.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/footer-with-large-font-size.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/footer-with-navigation-and-credit-line.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/footer-with-search-site-title-and-credit-line.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/footer-with-site-title-and-credit-line.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/header-with-large-font-size.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/left-aligned-footer.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/right-aligned-footer.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/simple-header-inside-image.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/simple-header-with-background-color.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/simple-header-with-image.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/simple-header-with-tagline-2.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/simple-header-with-tagline.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/simple-header.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/site-title-and-menu-button.php create mode 100644 lib/compat/wordpress-6.1/block-patterns/site-title-and-vertical-navigation.php create mode 100644 packages/block-editor/src/components/block-edit-visually-button/index.js delete mode 100644 packages/block-editor/src/components/block-settings-menu/block-edit-visually-button.js create mode 100644 packages/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/all-input-control.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/axial-input-controls.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/index.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/input-controls.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/linked-button.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/spacing-input-control.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/style.scss create mode 100644 packages/block-editor/src/components/spacing-sizes-control/test/utils.js create mode 100644 packages/block-editor/src/components/spacing-sizes-control/utils.js create mode 100644 packages/block-editor/src/layouts/constrained.js create mode 100644 packages/block-editor/src/layouts/test/constrained.js create mode 100644 packages/block-library/src/list-item/hooks/use-copy.js create mode 100644 packages/block-library/src/post-date/style.scss create mode 100644 packages/block-library/src/query-title/style.scss create mode 100644 packages/blocks/src/api/raw-handling/slack-paragraph-corrector.js rename packages/components/src/card/card-body/{component.js => component.tsx} (60%) rename packages/components/src/card/card-body/{hook.js => hook.ts} (78%) rename packages/components/src/card/card-body/{index.js => index.ts} (100%) rename packages/components/src/card/card-divider/{component.js => component.tsx} (51%) rename packages/components/src/card/card-divider/{hook.js => hook.ts} (72%) rename packages/components/src/card/card-divider/{index.js => index.ts} (100%) rename packages/components/src/card/card-footer/{component.js => component.tsx} (51%) rename packages/components/src/card/card-footer/{hook.js => hook.ts} (79%) rename packages/components/src/card/card-footer/{index.js => index.ts} (100%) rename packages/components/src/card/card-header/{component.js => component.tsx} (51%) rename packages/components/src/card/card-header/{hook.js => hook.ts} (79%) rename packages/components/src/card/card-header/{index.js => index.ts} (100%) rename packages/components/src/card/card-media/{component.js => component.tsx} (56%) rename packages/components/src/card/card-media/{hook.js => hook.ts} (72%) rename packages/components/src/card/card-media/{index.js => index.ts} (100%) rename packages/components/src/card/card/{component.js => component.tsx} (83%) rename packages/components/src/card/card/{hook.js => hook.ts} (72%) rename packages/components/src/card/card/{index.js => index.ts} (100%) rename packages/components/src/card/{context.js => context.ts} (100%) rename packages/components/src/card/{index.js => index.ts} (100%) delete mode 100644 packages/components/src/card/stories/index.js create mode 100644 packages/components/src/card/stories/index.tsx rename packages/components/src/card/{styles.js => styles.ts} (100%) rename packages/components/src/card/test/__snapshots__/{index.js.snap => index.tsx.snap} (100%) rename packages/components/src/card/test/{index.js => index.tsx} (98%) rename packages/components/src/{custom-gradient-bar => custom-gradient-picker/gradient-bar}/constants.js (100%) rename packages/components/src/{custom-gradient-bar => custom-gradient-picker/gradient-bar}/control-points.js (84%) rename packages/components/src/{custom-gradient-bar => custom-gradient-picker/gradient-bar}/index.js (98%) rename packages/components/src/{custom-gradient-bar => custom-gradient-picker/gradient-bar}/test/utils.js (100%) rename packages/components/src/{custom-gradient-bar => custom-gradient-picker/gradient-bar}/utils.js (100%) create mode 100644 packages/components/src/custom-select-control/styles.ts create mode 100644 packages/components/src/date-time/constants.ts delete mode 100644 packages/components/src/date-time/date/datepicker.scss delete mode 100644 packages/components/src/date-time/date/style.scss delete mode 100644 packages/components/src/date-time/date/test/utils.ts delete mode 100644 packages/components/src/date-time/date/utils.ts delete mode 100644 packages/components/src/date-time/style.scss create mode 100644 packages/components/src/date-time/utils.ts delete mode 100644 packages/components/src/disabled/index.js create mode 100644 packages/components/src/disabled/index.tsx delete mode 100644 packages/components/src/disabled/stories/index.js create mode 100644 packages/components/src/disabled/stories/index.tsx rename packages/components/src/disabled/styles/{disabled-styles.js => disabled-styles.tsx} (100%) delete mode 100644 packages/components/src/disabled/test/index.js create mode 100644 packages/components/src/disabled/test/index.tsx create mode 100644 packages/components/src/disabled/types.ts create mode 100644 packages/components/src/duotone-picker/stories/duotone-picker.js create mode 100644 packages/components/src/duotone-picker/stories/duotone-swatch.js rename packages/components/src/font-size-picker/test/{util.js => utils.js} (65%) delete mode 100644 packages/components/src/form-token-field/test/index.js create mode 100644 packages/components/src/form-token-field/test/index.tsx delete mode 100644 packages/components/src/form-token-field/test/lib/fixtures.js delete mode 100644 packages/components/src/form-token-field/test/lib/token-field-wrapper.tsx delete mode 100644 packages/components/src/menu-group/test/__snapshots__/index.js.snap delete mode 100644 packages/components/src/placeholder/test/index.js create mode 100644 packages/components/src/placeholder/test/index.tsx create mode 100644 packages/components/src/popover/utils.js create mode 100644 packages/components/src/select-control/chevron-down.tsx delete mode 100644 packages/components/src/swatch/index.tsx delete mode 100644 packages/components/src/swatch/style.scss delete mode 100644 packages/components/src/swatch/types.ts delete mode 100644 packages/components/src/toggle-group-control/stories/index.js create mode 100644 packages/components/src/toggle-group-control/stories/index.tsx rename packages/components/src/toggle-group-control/test/__snapshots__/{index.js.snap => index.tsx.snap} (94%) rename packages/components/src/toggle-group-control/test/{index.js => index.tsx} (97%) delete mode 100644 packages/components/src/tools-panel/test/__snapshots__/index.js.snap create mode 100644 packages/components/src/utils/strings.ts create mode 100644 packages/components/src/utils/test/strings.js create mode 100644 packages/create-block-tutorial-template/block-templates/template.php.mustache create mode 100644 packages/create-block/lib/templates/block/template.php.mustache create mode 100644 packages/create-block/lib/templates/es5/template.php.mustache delete mode 100644 packages/e2e-tests/specs/editor/plugins/wp-editor-meta-box.test.js create mode 100644 packages/edit-site/src/components/template-details/template-part-area-selector.js create mode 100644 phpunit/blocks/render-comments-test.php create mode 100644 storybook/decorators/with-margin-checker.js create mode 100644 test/e2e/specs/editor/blocks/__snapshots__/Group-can-merge-into-group-with-Backspace-1-chromium.txt create mode 100644 test/e2e/specs/editor/blocks/__snapshots__/Group-can-merge-into-group-with-Backspace-2-chromium.txt create mode 100644 test/e2e/specs/editor/plugins/wp-editor-meta-box.spec.js create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size.html create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size.json create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size.parsed.json create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size.serialized.html create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size__deprecated.html create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size__deprecated.json create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size__deprecated.parsed.json create mode 100644 test/integration/fixtures/blocks/core__group-layout-content-size__deprecated.serialized.html create mode 100644 test/integration/fixtures/blocks/core__group__deprecated-3.html create mode 100644 test/integration/fixtures/blocks/core__group__deprecated-3.json create mode 100644 test/integration/fixtures/blocks/core__group__deprecated-3.parsed.json create mode 100644 test/integration/fixtures/blocks/core__group__deprecated-3.serialized.html create mode 100644 test/integration/fixtures/blocks/core__pullquote__deprecated-5.html create mode 100644 test/integration/fixtures/blocks/core__pullquote__deprecated-5.json create mode 100644 test/integration/fixtures/blocks/core__pullquote__deprecated-5.parsed.json create mode 100644 test/integration/fixtures/blocks/core__pullquote__deprecated-5.serialized.html rename test/integration/fixtures/blocks/{core__pullquote__multi-paragraph.html => core__pullquote__deprecated-5__multi-paragraph.html} (100%) rename test/integration/fixtures/blocks/{core__pullquote__multi-paragraph.json => core__pullquote__deprecated-5__multi-paragraph.json} (63%) rename test/integration/fixtures/blocks/{core__pullquote__multi-paragraph.parsed.json => core__pullquote__deprecated-5__multi-paragraph.parsed.json} (100%) rename test/integration/fixtures/blocks/{core__pullquote__multi-paragraph.serialized.html => core__pullquote__deprecated-5__multi-paragraph.serialized.html} (55%) create mode 100644 test/integration/fixtures/documents/slack-paragraphs-in.html create mode 100644 test/integration/fixtures/documents/slack-paragraphs-out.html diff --git a/.eslintrc.js b/.eslintrc.js index d17293fe35514a..725c6e30237081 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -79,14 +79,18 @@ module.exports = { { name: 'lodash', importNames: [ + 'camelCase', + 'capitalize', 'chunk', 'clamp', 'compact', 'concat', 'countBy', + 'deburr', 'defaults', 'defaultTo', 'delay', + 'difference', 'differenceWith', 'dropRight', 'each', @@ -115,6 +119,7 @@ module.exports = { 'keyBy', 'keys', 'lowerCase', + 'mapKeys', 'maxBy', 'memoize', 'negate', @@ -129,18 +134,26 @@ module.exports = { 'reverse', 'size', 'snakeCase', + 'sortBy', + 'startCase', 'startsWith', 'stubFalse', 'stubTrue', 'sum', 'sumBy', 'take', + 'times', 'toString', 'trim', 'truncate', + 'uniq', + 'uniqBy', 'uniqueId', 'uniqWith', + 'upperFirst', 'values', + 'words', + 'xor', 'zip', ], message: diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 012ada8d05f149..ba264fed3bfc14 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -22,9 +22,6 @@ jobs: matrix: node: [14] os: [macos-latest, ubuntu-latest, windows-latest] - include: - - node: 12 - os: ubuntu-latest steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 2efa28a0fb736a..f45c1f229666ab 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -1,4 +1,4 @@ -name: Performances Tests +name: Performance Tests on: pull_request: diff --git a/.github/workflows/stale-issue-mark-stale.yml b/.github/workflows/stale-issue-mark-stale.yml index e0ebd50ec32c04..28154b35a0b70f 100644 --- a/.github/workflows/stale-issue-mark-stale.yml +++ b/.github/workflows/stale-issue-mark-stale.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/stale@996798eb71ef485dc4c7b4d3285842d714040c4a # v3.0.17 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "Hi,\nThis issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.\nThanks for helping out." days-before-stale: 30 days-before-close: -1 only-labels: 'Needs Testing' diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 795ad86c9a2763..4ed5c3d750feed 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - node: ['12', '14'] + node: ['14'] steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 diff --git a/.gitignore b/.gitignore index e9b28ae1901f15..1f5680e2c6c2da 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ coverage yarn.lock /artifacts /perf-envs +/composer.lock .cache *.tsbuildinfo diff --git a/.stylelintignore b/.stylelintignore index 06bb87c852b4a0..801a210d64800a 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1 +1,4 @@ +build +build-style +node_modules packages/stylelint-config/test diff --git a/bin/plugin/commands/changelog.js b/bin/plugin/commands/changelog.js index 382cbbc0bc42e9..520e9c60a29e12 100644 --- a/bin/plugin/commands/changelog.js +++ b/bin/plugin/commands/changelog.js @@ -1,14 +1,7 @@ /** * External dependencies */ -const { - groupBy, - escapeRegExp, - uniq, - flow, - sortBy, - uniqBy, -} = require( 'lodash' ); +const { groupBy, escapeRegExp, flow } = require( 'lodash' ); const Octokit = require( '@octokit/rest' ); const { sprintf } = require( 'sprintf-js' ); const semver = require( 'semver' ); @@ -201,13 +194,15 @@ const REWORD_TERMS = { * @return {string[]} Type candidates. */ function getTypesByLabels( labels ) { - return uniq( - labels - .filter( ( label ) => - Object.keys( LABEL_TYPE_MAPPING ).includes( label ) - ) - .map( ( label ) => LABEL_TYPE_MAPPING[ label ] ) - ); + return [ + ...new Set( + labels + .filter( ( label ) => + Object.keys( LABEL_TYPE_MAPPING ).includes( label ) + ) + .map( ( label ) => LABEL_TYPE_MAPPING[ label ] ) + ), + ]; } /** @@ -828,7 +823,9 @@ function getContributorPropsMarkdownList( ftcPRs ) { * @return {IssuesListForRepoResponseItem[]} The sorted list of pull requests. */ function sortByUsername( items ) { - return sortBy( items, ( item ) => item.user.login.toLowerCase() ); + return [ ...items ].sort( ( a, b ) => + a.user.login.toLowerCase().localeCompare( b.user.login.toLowerCase() ) + ); } /** @@ -838,7 +835,17 @@ function sortByUsername( items ) { * @return {IssuesListForRepoResponseItem[]} The list of pull requests unique per user. */ function getUniqueByUsername( items ) { - return uniqBy( items, ( item ) => item.user.login ); + /** + * @type {IssuesListForRepoResponseItem[]} List of pull requests. + */ + const EMPTY_PR_LIST = []; + + return items.reduce( ( acc, item ) => { + if ( ! acc.some( ( i ) => i.user.login === item.user.login ) ) { + acc.push( item ); + } + return acc; + }, EMPTY_PR_LIST ); } /** diff --git a/changelog.txt b/changelog.txt index 7e17bfa688c6ce..e10d9c84a402d2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,852 @@ == Changelog == += 13.9.0 = + +## Changelog + +### Enhancements + +#### Block Library + +- Archives: Add a control to make block's dropdown label invisible. ([43025](https://github.com/WordPress/gutenberg/pull/43025)) +- Media&Text: Add help to ImageSizeControl. ([40642](https://github.com/WordPress/gutenberg/pull/40642)) +- Navigation: Move overlay colors to the responsive wrapper. ([42875](https://github.com/WordPress/gutenberg/pull/42875)) +- Navigation: Extract navigation block utils. ([42865](https://github.com/WordPress/gutenberg/pull/42865)) +- Navigation: Fix link inheritance in overlay. ([42929](https://github.com/WordPress/gutenberg/pull/42929)) +- Post Author: Rendering html for the author description at the editor. ([42109](https://github.com/WordPress/gutenberg/pull/42109)) +- Post Featured Image: Add link target and rel attributes. ([42853](https://github.com/WordPress/gutenberg/pull/42853)) +- Post Title: Do not add `rel` attribute if empty. ([42855](https://github.com/WordPress/gutenberg/pull/42855)) +- Query Pagination: Correctly position the "next" link on the first page. ([42764](https://github.com/WordPress/gutenberg/pull/42764)) +- Query Title: Add a search title variation. ([42662](https://github.com/WordPress/gutenberg/pull/42662)) +- Quote: Unwrap on Backspace at start. ([42808](https://github.com/WordPress/gutenberg/pull/42808)) +- Search Block: Remove margins from the input. ([42959](https://github.com/WordPress/gutenberg/pull/42959)) +- Transforms: Add group unwrap. ([42685](https://github.com/WordPress/gutenberg/pull/42685)) + +#### Components + +- BaseControl: Add `box-sizing` reset. ([42889](https://github.com/WordPress/gutenberg/pull/42889)) +- BorderControl: Add `box-sizing` reset. ([42754](https://github.com/WordPress/gutenberg/pull/42754)) +- BoxControl: Export `applyValueToSides` util function. ([42733](https://github.com/WordPress/gutenberg/pull/42733)) +- ComboboxControl and FormTokenField: Enhance components with custom render callback for options. ([42597](https://github.com/WordPress/gutenberg/pull/42597)) +- ComboboxControl: Add support for uncontrolled mode. ([42752](https://github.com/WordPress/gutenberg/pull/42752)) +- Flex: Convert component to TypeScript. ([42537](https://github.com/WordPress/gutenberg/pull/42537)) +- FontSizePicker: Add 40px size variant. ([42716](https://github.com/WordPress/gutenberg/pull/42716)) +- List View Expander: Fix icon in RTL mode. ([42997](https://github.com/WordPress/gutenberg/pull/42997)) +- Placeholder: Convert component to TypeScript. ([42990](https://github.com/WordPress/gutenberg/pull/42990)) +- Popover: Rewrite Storybook examples using controls. ([42903](https://github.com/WordPress/gutenberg/pull/42903)) +- Popover: Tidy up code, add more comments. ([42944](https://github.com/WordPress/gutenberg/pull/42944)) +- ResizableBox: Change tooltip background to match other tooltips. ([42800](https://github.com/WordPress/gutenberg/pull/42800)) +- Storybook: Add global CSS switcher. ([42747](https://github.com/WordPress/gutenberg/pull/42747)) +- StyleProvider: Convert component to TypeScript. ([42541](https://github.com/WordPress/gutenberg/pull/42541)) +- Swatch: Convert component to TypeScript. ([42162](https://github.com/WordPress/gutenberg/pull/42162)) +- Tooltip (Experimental), CustomSelectControl, TimePicker: add missing font sizes which were necessary in non-WordPress contexts. ([42844](https://github.com/WordPress/gutenberg/pull/42844)) +- Typography Panel: Fix font appearance control width. ([42795](https://github.com/WordPress/gutenberg/pull/42795)) +- UnitControl: Update unit dropdown design. ([42000](https://github.com/WordPress/gutenberg/pull/42000)) +- Update control labels to the new uppercase styles. ([42789](https://github.com/WordPress/gutenberg/pull/42789)) + +#### Reusable Blocks + +- Make template part and reusable block creation language consistent. ([43032](https://github.com/WordPress/gutenberg/pull/43032)) + +#### CSS & Styling + +- Rename solid color. ([42918](https://github.com/WordPress/gutenberg/pull/42918)) +- Tab style subpixel fix. ([42892](https://github.com/WordPress/gutenberg/pull/42892)) +- Navigation: Try to keep :Where just for paddings. ([42967](https://github.com/WordPress/gutenberg/pull/42967)) + +#### Global Styles + +- Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles. ([42544](https://github.com/WordPress/gutenberg/pull/42544)) +- Enable alpha (opacity) in Global Styles color pickers. ([43045](https://github.com/WordPress/gutenberg/pull/43045)) +- Add block spacing to root block support UI. ([42797](https://github.com/WordPress/gutenberg/pull/42797)) +- Elements: Update the load order of the CSS in the Site Editor. ([42863](https://github.com/WordPress/gutenberg/pull/42863)) +- Heading element UI controls. ([42176](https://github.com/WordPress/gutenberg/pull/42176)) +- Theme JSON: Add a static $blocks\_metadata data definition to the Gutenberg instance of WP\_Theme\_JSON. ([42776](https://github.com/WordPress/gutenberg/pull/42776)) +- Upsize typography panel components. ([42718](https://github.com/WordPress/gutenberg/pull/42718)) + +#### Design Tools + +- Cover: Show Resize Tooltip on Drag. ([23522](https://github.com/WordPress/gutenberg/pull/23522)) +- Update color button style. ([41838](https://github.com/WordPress/gutenberg/pull/41838)) +- Add explicit bypass for fluid font size calculation. ([42757](https://github.com/WordPress/gutenberg/pull/42757)) + +#### Post Editor + +- Post Template: Update template title selector. ([42091](https://github.com/WordPress/gutenberg/pull/42091)) + +#### Site Editor + +- Add author nicename template creation ability. ([42165](https://github.com/WordPress/gutenberg/pull/42165)) +- Add fallback template content on creation. ([42520](https://github.com/WordPress/gutenberg/pull/42520)) +- Add a 'View Site' link in the site editor. ([42331](https://github.com/WordPress/gutenberg/pull/42331)) +- Update `clear customizations` copy for templates. ([41765](https://github.com/WordPress/gutenberg/pull/41765)) + +#### Widgets Editor + +- Format Library: Add missing keyboard shortcut description in customizer widget. ([43044](https://github.com/WordPress/gutenberg/pull/43044)) + +#### Block Editor + +- Rich text: Add character shortcuts for wrapping selection. ([42469](https://github.com/WordPress/gutenberg/pull/42469)) + +#### Block Directory + +- Modernize `DownloadableBlockListItem` tests. ([43026](https://github.com/WordPress/gutenberg/pull/43026)) + +### Bug Fixes + +#### Accessibility + +- Fix issue where changing the id of the recursion provider can result in focus loss. ([42916](https://github.com/WordPress/gutenberg/pull/42916)) +- Site Editor: Don't disable the Save button. ([42842](https://github.com/WordPress/gutenberg/pull/42842)) + +#### Components + +- Block Styles: Truncate long button labels. ([42975](https://github.com/WordPress/gutenberg/pull/42975)) +- ColorGradientControl: Fix awkward padding in popover. ([43018](https://github.com/WordPress/gutenberg/pull/43018)) +- ColorPicker: Fix layout overflow. ([42992](https://github.com/WordPress/gutenberg/pull/42992)) +- External link component: Add a check for on page anchor links. ([42259](https://github.com/WordPress/gutenberg/pull/42259)) +- Icons: Fix storybook library icon names. ([43034](https://github.com/WordPress/gutenberg/pull/43034)) +- InputControl: Fix acceptance of falsy values in controlled updates. ([42484](https://github.com/WordPress/gutenberg/pull/42484)) +- InputControl: Fix incorrect size prop passing to `Text`. ([42793](https://github.com/WordPress/gutenberg/pull/42793)) +- Popover: Anchor correctly to parent node when no explicit anchor is passed. ([42971](https://github.com/WordPress/gutenberg/pull/42971)) +- Popover: Fix arrow placement and design. ([42874](https://github.com/WordPress/gutenberg/pull/42874)) +- Popover: Improve iframe offset computation. ([42417](https://github.com/WordPress/gutenberg/pull/42417)) +- Popover: Make sure that ownerDocument is always defined. ([42886](https://github.com/WordPress/gutenberg/pull/42886)) + +#### Block Library + +- Disabled blocks passed to BlockTypesList are no longer draggable. ([42751](https://github.com/WordPress/gutenberg/pull/42751)) +- Fix drag and drop performance when dragging over the insertion point. ([42806](https://github.com/WordPress/gutenberg/pull/42806)) +- LatestPost: Fix issue with floated featured images overflowing focus style. ([40663](https://github.com/WordPress/gutenberg/pull/40663)) +- List v2: Fix Cmd+A. ([42858](https://github.com/WordPress/gutenberg/pull/42858)) +- Media&Text: Round position attribute on focal point save. ([33915](https://github.com/WordPress/gutenberg/pull/33915)) +- Navigation: Fix `current-menu-item` class logic. ([42849](https://github.com/WordPress/gutenberg/pull/42849)) +- Navigation: Fix invalid permissions warning by avoiding using trashed wp\_navigation posts (JS implementation). ([42982](https://github.com/WordPress/gutenberg/pull/42982)) +- Separator: Fix the block CSS classes in the editor. ([42769](https://github.com/WordPress/gutenberg/pull/42769)) +- Social Link: add missing 'width' and 'height' attributes. ([41373](https://github.com/WordPress/gutenberg/pull/41373)) +- Social: Include has-visible-labels on edit component. ([42791](https://github.com/WordPress/gutenberg/pull/42791)) +- Tag Cloud: Fix alignment issue when align center. ([43017](https://github.com/WordPress/gutenberg/pull/43017)) +- Writing flow: Fix Shift+Arrow partial selection for lists & quote. ([42885](https://github.com/WordPress/gutenberg/pull/42885)) + +#### CSS & Styling + +- Layout: Fix flex direction column. ([42939](https://github.com/WordPress/gutenberg/pull/42939)) +- Layout: Merge CSS rule for block gap. ([43052](https://github.com/WordPress/gutenberg/pull/43052)) +- Style Engine: Include 6.1 CSS filter, ensure style engine can output CSS functions like clamp. ([43004](https://github.com/WordPress/gutenberg/pull/43004)) +- Style engine: Disable stylesheet optimization temporarily. ([43051](https://github.com/WordPress/gutenberg/pull/43051)) +- Style Engine: Defensive guarding for when style does not define 'individual' property. ([43122](https://github.com/WordPress/gutenberg/pull/43122)) + +#### Global Styles + +- Fix styles declarations returning before all properties output. ([42954](https://github.com/WordPress/gutenberg/pull/42954)) +- Fluid typography: Migrate fluid typography algorithm to JS for site editor. ([42688](https://github.com/WordPress/gutenberg/pull/42688)) +- Spacing presets: Prevent % spacing size units being stripped by sanitize\_title. ([43101](https://github.com/WordPress/gutenberg/pull/43101)) +- Specify priority in remove\_action. ([43073](https://github.com/WordPress/gutenberg/pull/43073)) + +#### Block Editor + +- Inserter: Avoid warning when CRA is displayed. ([42723](https://github.com/WordPress/gutenberg/pull/42723)) +- Pasting: Dismiss pasted image if file:// schema detected. ([42785](https://github.com/WordPress/gutenberg/pull/42785)) +- Prevent multiselection via dragging when already dragging blocks. ([42877](https://github.com/WordPress/gutenberg/pull/42877)) +- Quote: Fix raw transform handler. ([43093](https://github.com/WordPress/gutenberg/pull/43093)) +- Rich text: Fix error when attempting to remove placeholder on composition start. ([42821](https://github.com/WordPress/gutenberg/pull/42821)) +- Paste from Slack: Interpret paragraph markup. ([43114](https://github.com/WordPress/gutenberg/pull/43114)) + +#### Post Editor + +- Decode the post URL for the button label. ([42930](https://github.com/WordPress/gutenberg/pull/42930)) + +#### Site Editor + +- Internalization fixes for site editor template creation. ([42762](https://github.com/WordPress/gutenberg/pull/42762)) +- Fix error in compileStyleValue. ([43116](https://github.com/WordPress/gutenberg/pull/43116)) + +#### RichText + +- Firefox: Fix issue where it selects a nearby contentEditable. ([42777](https://github.com/WordPress/gutenberg/pull/42777)) + +#### Build Tooling + +- Fix: CSS files don't build in dev mode on Windows. ([42041](https://github.com/WordPress/gutenberg/pull/42041)) +- Fix: Script name error in main package.json. ([43089](https://github.com/WordPress/gutenberg/pull/43089)) + +#### Testing + +- Fix: Just another end-to-end test. ([42947](https://github.com/WordPress/gutenberg/pull/42947)) + +#### CreateBlock + +- Remove i18n references from save properties. ([43035](https://github.com/WordPress/gutenberg/pull/43035)) + +### Accessibility + +- Shortcuts: Add Ctrl+Y for redo on Windows. ([42627](https://github.com/WordPress/gutenberg/pull/42627)) +- Change shortcut text for redo tooltip on Windows. ([42830](https://github.com/WordPress/gutenberg/pull/42830)) + +### Performance + +- Lodash: Refactor away from `_.isMatch()`. ([42271](https://github.com/WordPress/gutenberg/pull/42271)) +- Lodash: Refactor away from `_.zip()`. ([42926](https://github.com/WordPress/gutenberg/pull/42926)) +- Lodash: Refactor away from `_.delay()`. ([42966](https://github.com/WordPress/gutenberg/pull/42966)) +- Lodash: Refactor away from `_.startsWith()`. ([43019](https://github.com/WordPress/gutenberg/pull/43019)) +- Lodash: Refactor away from `_.isPlainObject()`. ([42508](https://github.com/WordPress/gutenberg/pull/42508)) +- Lodash: Refactor away from `_.maxBy()`. ([42914](https://github.com/WordPress/gutenberg/pull/42914)) +- Lodash: Refactor Calendar block away from `moment`. ([43029](https://github.com/WordPress/gutenberg/pull/43029)) +- Lodash: Remove completely from `@wordpress/dom` package. ([42912](https://github.com/WordPress/gutenberg/pull/42912)) +- Lodash: Remove completely from `@wordpress/element` package. ([42898](https://github.com/WordPress/gutenberg/pull/42898)) + +### Experiments + +#### Style Engine +- Enqueue block support styles. ([42452](https://github.com/WordPress/gutenberg/pull/42452)) ([42880](https://github.com/WordPress/gutenberg/pull/42880)) +- Prettify combined selectors. ([43003](https://github.com/WordPress/gutenberg/pull/43003)) +- Prettify output. ([42909](https://github.com/WordPress/gutenberg/pull/42909)) +- Rename global function. ([42719](https://github.com/WordPress/gutenberg/pull/42719)) +- Combine style-engine stores for block-supports. ([42970](https://github.com/WordPress/gutenberg/pull/42970)) +- Add optimize flag and combine functions into wp\_style\_engine\_get\_stylesheet. ([42878](https://github.com/WordPress/gutenberg/pull/42878)) + +### Documentation + +- Add examples for `core/blocks` actions. ([42637](https://github.com/WordPress/gutenberg/pull/42637)) +- Add examples for core/viewport package. ([42921](https://github.com/WordPress/gutenberg/pull/42921)) +- Added the allowedFormat details in richtext readme. ([42426](https://github.com/WordPress/gutenberg/pull/42426)) +- Adding `@example` entries to the public API exposed in `core/blocks`. ([42745](https://github.com/WordPress/gutenberg/pull/42745)) +- Cover: Fix rendered content PHPDoc type. ([43099](https://github.com/WordPress/gutenberg/pull/43099)) +- Create Block: Update document links in templates. ([42839](https://github.com/WordPress/gutenberg/pull/42839)) +- Fix return type of home link attribute function. ([42901](https://github.com/WordPress/gutenberg/pull/42901)) +- Fix textual consistency about block attributes. ([43075](https://github.com/WordPress/gutenberg/pull/43075)) +- Link plugins GitHub release pages. ([42736](https://github.com/WordPress/gutenberg/pull/42736)) +- Document the cherry-picking automation. ([42932](https://github.com/WordPress/gutenberg/pull/42932)) +- Fixed broken external link to Mozilla Developer documentation. ([43065](https://github.com/WordPress/gutenberg/pull/43065)) +- Release Docs: Troubleshooting failed "Bump version" job. ([42936](https://github.com/WordPress/gutenberg/pull/42936)) +- Release docs: Update performance test instructions. ([43015](https://github.com/WordPress/gutenberg/pull/43015)) +- Remove the emoji characters to fix the handbook rendering. ([43028](https://github.com/WordPress/gutenberg/pull/43028)) +- Update broken internal link. ([43094](https://github.com/WordPress/gutenberg/pull/43094)) +- Update theme-json.md to include new element support and :Ref. ([42412](https://github.com/WordPress/gutenberg/pull/42412)) +- Gutenberg Data Tutorial: Adjust the image URLs and whitespace to render correctly in the Handbook. ([42969](https://github.com/WordPress/gutenberg/pull/42969)) + +### Code Quality + +- Add mutations data and helper functions to useEntityRecord. ([39595](https://github.com/WordPress/gutenberg/pull/39595)) +- Remove old WordPress 5.8 code. ([42818](https://github.com/WordPress/gutenberg/pull/42818)) + +#### Block Library + +- Add separate callbacks for selecting a classic or navigation menu in the nav block. ([43057](https://github.com/WordPress/gutenberg/pull/43057)) +- Avoid reliance on status constants when consuming useCreateNavigationMenu hook. ([42704](https://github.com/WordPress/gutenberg/pull/42704)) +- Home Link: Use 'sprintf' in the render callback. ([43024](https://github.com/WordPress/gutenberg/pull/43024)) +- Nav block: Extract hook for inner blocks. ([42743](https://github.com/WordPress/gutenberg/pull/42743)) +- Nav block: Normalize to function expressions. ([42744](https://github.com/WordPress/gutenberg/pull/42744)) +- Normalize usage of Notifications in Nav block. ([42706](https://github.com/WordPress/gutenberg/pull/42706)) +- Remove duplicate speak calls from navigation block. ([43079](https://github.com/WordPress/gutenberg/pull/43079)) +- Site Title: Use home\_url instead of get\_bloginfo. ([42857](https://github.com/WordPress/gutenberg/pull/42857)) +- Page List: Fix indentation in PHP file. ([42852](https://github.com/WordPress/gutenberg/pull/42852)) +- Query Loop: Try filters with ToolsPanel. ([42629](https://github.com/WordPress/gutenberg/pull/42629)) + +#### Site Editor + +- Navigation Menu Sidebar: Remove unnecessary Fragment. ([43021](https://github.com/WordPress/gutenberg/pull/43021)) + +#### Style Engine + +- Tweak Declarations filtering logic slightly. ([43215](https://github.com/WordPress/gutenberg/pull/43215)) +- Minor tweaks. ([43111](https://github.com/WordPress/gutenberg/pull/43111)) + +#### Global Styles + +- useGlobalStylesOutput: Use memo for derived values. ([42917](https://github.com/WordPress/gutenberg/pull/42917)) + +### Tools + +#### Env + +- Use git for `wp-env`'s default WordPress version. ([42826](https://github.com/WordPress/gutenberg/pull/42826)) + +#### Testing + +- Migrate deprecated node matcher tests to playwright. ([42759](https://github.com/WordPress/gutenberg/pull/42759)) +- Migrate group block tests to Playwright. ([42801](https://github.com/WordPress/gutenberg/pull/42801)) +- Migrate missing block tests to Playwright. ([41680](https://github.com/WordPress/gutenberg/pull/41680)) +- Migrate Convert Block Type test to Playwright. ([42760](https://github.com/WordPress/gutenberg/pull/42760)) + +#### Build Tooling + +- Lodash: Refactor away from `_.flatMap()`. ([42360](https://github.com/WordPress/gutenberg/pull/42360)) +- Standardize script naming in main package.json. ([42368](https://github.com/WordPress/gutenberg/pull/42368)) + +## First time contributors +- @fellyph: Rendering html for the author description at the editor. ([42109](https://github.com/WordPress/gutenberg/pull/42109)) +- @merkys7: Fix social-link block missing 'width' and 'height' attributes. ([41373](https://github.com/WordPress/gutenberg/pull/41373)) +- @Smit2808: Added the allowedFormat details in richtext readme. ([42426](https://github.com/WordPress/gutenberg/pull/42426)) +- @theminaldiwan: Fixed alignment issue of tagcloud block when align center. ([43017](https://github.com/WordPress/gutenberg/pull/43017)) + +## Contributors + +The following contributors merged PRs in this release: @aaronrobertshaw @adamziel @andrewserong @aristath @carolinan @chad1008 @ciampo @derekblank @dougwollison @ellatrix @fellyph @geriux @getdave @glendaviesnz @hellofromtonya @ItsJonQ @jameskoster @jasmussen @jorgefilipecosta @JustinyAhin @kjohnson @Mamaduka @manzoorwanijk @matiasbenedetto @mcsf @merkys7 @mikachan @mirka @ndiego @noahtallen @ntsekouras @pavanpatil1 @pooja-muchandikar @ramonjd @ryanwelcher @SavPhill @scruffian @shimotmk @SiobhyB @Smit2808 @Soean @stokesman @t-hamano @talldan @tellthemachines @theminaldiwan @tyxla @walbo + += 13.8.2 = + + + +## Changelog + + +### Enhancements + +- Allow removing CSS declarations from the WP_Style_Engine_CSS_Declarations object. ([42428](https://github.com/WordPress/gutenberg/pull/42428)) +- Equalize modal content padding. ([42370](https://github.com/WordPress/gutenberg/pull/42370)) +- Remove top margin on the first paragraph in a modal. ([42369](https://github.com/WordPress/gutenberg/pull/42369)) + +#### Components +- BorderControl: Render border color/style dropdown as UnitControl prefix. ([42212](https://github.com/WordPress/gutenberg/pull/42212)) +- ColorPicker: Cleanly implement large size. ([42002](https://github.com/WordPress/gutenberg/pull/42002)) +- ComboboxControl: Refactor `onKeyDown` to use `keyboardEvent.code`. ([42569](https://github.com/WordPress/gutenberg/pull/42569)) +- Elevation: Convert component to TypeScript. ([42302](https://github.com/WordPress/gutenberg/pull/42302)) +- InputControl: Decrease large default padding if has prefix/suffix. ([42166](https://github.com/WordPress/gutenberg/pull/42166)) +- ScrollLock: Covert component to TypeScript. ([42303](https://github.com/WordPress/gutenberg/pull/42303)) +- SelectControl: Add flag for larger default size. ([42456](https://github.com/WordPress/gutenberg/pull/42456)) +- Shortcut: Covert component to TypeScript. ([42272](https://github.com/WordPress/gutenberg/pull/42272)) +- Divider: Complete TypeScript migration of component. ([41991](https://github.com/WordPress/gutenberg/pull/41991)) +- ToggleGroupControl: Add size variants. ([42008](https://github.com/WordPress/gutenberg/pull/42008)) +- UnitControl: Update unit select's focus styles. ([42383](https://github.com/WordPress/gutenberg/pull/42383)) +- BorderControl: Add missing changelog for accessibility enhancements. ([42411](https://github.com/WordPress/gutenberg/pull/42411)) +- CustomSelectControl: Use styles from SelectControl. ([42460](https://github.com/WordPress/gutenberg/pull/42460)) +- Dropdown: Add wrapper for custom padding. ([42595](https://github.com/WordPress/gutenberg/pull/42595)) +- InputControl: Add padding wrapper for prefix/suffix. ([42378](https://github.com/WordPress/gutenberg/pull/42378)) +- ScrollLock: Improve Storybook story for documentation view. ([42344](https://github.com/WordPress/gutenberg/pull/42344)) +- `ColorPalette`: Display checkered preview background when `value` is transparent. ([42232](https://github.com/WordPress/gutenberg/pull/42232)) + +#### Block Library +- Added WhatsApp icon to the Social Icon Block. ([42137](https://github.com/WordPress/gutenberg/pull/42137)) +- Template Part: Swap block action places. ([42221](https://github.com/WordPress/gutenberg/pull/42221)) +- Template Parts: Add search to replacement modal. ([42459](https://github.com/WordPress/gutenberg/pull/42459)) +- Image: Add border block support for color, width, and style. ([31366](https://github.com/WordPress/gutenberg/pull/31366)) +- List v2: Remove quote transforms as removed by Quote v2. ([42700](https://github.com/WordPress/gutenberg/pull/42700)) +- Merge Comments and Post Comments blocks. ([41807](https://github.com/WordPress/gutenberg/pull/41807)) +- Theme.json: Add support for heading / caption elements in theme.json schema. ([42433](https://github.com/WordPress/gutenberg/pull/42433)) + +#### Global Styles +- Add layout content size controls to global styles. ([42309](https://github.com/WordPress/gutenberg/pull/42309)) +- Core CSS support for root padding and alignfull blocks. ([42085](https://github.com/WordPress/gutenberg/pull/42085)) +- Theme.json: Add block support feature level selectors for blocks. ([42087](https://github.com/WordPress/gutenberg/pull/42087)) + +#### Document Settings +- Make 'Move to trash' button full width. ([42577](https://github.com/WordPress/gutenberg/pull/42577)) + +#### Block Editor +- Add setting to display rich text toolbar inline. ([42399](https://github.com/WordPress/gutenberg/pull/42399)) +- Add block variations for individual template parts. ([42454](https://github.com/WordPress/gutenberg/pull/42454)) +- Enable `onEnter` support for group block. ([40724](https://github.com/WordPress/gutenberg/pull/40724)) + +#### Site Editor +- On template creation, don't show search if not needed. ([42357](https://github.com/WordPress/gutenberg/pull/42357)) + +#### Accessibility +- BorderControl: Update labelling, tooltips and wrap with fieldset and legend. ([42348](https://github.com/WordPress/gutenberg/pull/42348)) + +#### Icons +- Add shuffle icon to library. ([42193](https://github.com/WordPress/gutenberg/pull/42193)) + +#### Nested / Inner Blocks +- Quote: Use nested blocks. ([25892](https://github.com/WordPress/gutenberg/pull/25892)) + +#### Colors +- Update color palette popover style. ([41900](https://github.com/WordPress/gutenberg/pull/41900)) + + +### Bug Fixes +- Quote: fix raw transform handler ([https://github.com/WordPress/gutenberg/pull/43093])(https://github.com/WordPress/gutenberg/commit/9649f759c2235cde4281b1fd7fa9d8f9bf2f3f0e) +- Paste from Slack: interpret paragraph markup ([https://github.com/WordPress/gutenberg/pull/43114])(https://github.com/WordPress/gutenberg/commit/1a2f08e59646f1d6a20fcb9cdd9182dbb3a6aeac) +- Env: Download WordPress PHPUnit Into Container. ([41780](https://github.com/WordPress/gutenberg/pull/41780)) +- Env: Restrict `WP_TESTS_DOMAIN` constant to just hostname and not home URL. ([41039](https://github.com/WordPress/gutenberg/pull/41039)) +- Fix: Condition bug on BoxControl. ([42402](https://github.com/WordPress/gutenberg/pull/42402)) +- MaybeCategoryPanel: Update category selector. ([42663](https://github.com/WordPress/gutenberg/pull/42663)) +- Post title: Fix single line paste. ([42321](https://github.com/WordPress/gutenberg/pull/42321)) +- Scripts: Exit error code 1 when status value is null. ([42396](https://github.com/WordPress/gutenberg/pull/42396)) +- Style engine: Check item value validity. ([42487](https://github.com/WordPress/gutenberg/pull/42487)) +- Utilize WordPress PHPUnit Test Library Included By `wp-env`. ([41852](https://github.com/WordPress/gutenberg/pull/41852)) +- fix: Correct alt text footnote spacing. ([42504](https://github.com/WordPress/gutenberg/pull/42504)) + +#### Block Library +- Cover Block: Prevent transform to Group block when featured image is set. ([42638](https://github.com/WordPress/gutenberg/pull/42638)) +- Cover block: Adding background-size and background-repeat properties to the block CSS. ([42470](https://github.com/WordPress/gutenberg/pull/42470)) +- Fix tab/focus order issue in Media & text block. ([40806](https://github.com/WordPress/gutenberg/pull/40806)) +- List v2: Add forward delete. ([42564](https://github.com/WordPress/gutenberg/pull/42564)) +- List v2: Improve paste handling. ([42524](https://github.com/WordPress/gutenberg/pull/42524)) +- List v2: Merge with nested items. ([42551](https://github.com/WordPress/gutenberg/pull/42551)) +- List v2: Switch to default block type on Backspace from start. ([42633](https://github.com/WordPress/gutenberg/pull/42633)) +- Page List: Fetch items with 'view' context. ([42559](https://github.com/WordPress/gutenberg/pull/42559)) +- Social Icons Block: Fix button opacity in template parts. ([42641](https://github.com/WordPress/gutenberg/pull/42641)) +- Group block: Add context to the word "Row". ([42255](https://github.com/WordPress/gutenberg/pull/42255)) +- Hide prefix and suffix placeholders in post terms. ([42418](https://github.com/WordPress/gutenberg/pull/42418)) +- Theme.json: Fix schema for button elements. ([42431](https://github.com/WordPress/gutenberg/pull/42431)) +- [Media Text]: Fix deprecations regression. ([42816](https://github.com/WordPress/gutenberg/pull/42816)) +- Site Logo: Add the missing 'site_icon_url' to the REST_API index. ([42957](https://github.com/WordPress/gutenberg/pull/42957)) + +#### Components +- AnglePickerControl: Fix gap between elements in RTL mode. ([42534](https://github.com/WordPress/gutenberg/pull/42534)) +- ColorPalette: Fix background image in RTL mode. ([42510](https://github.com/WordPress/gutenberg/pull/42510)) +- Context System: Don't explicitly set `undefined` value to `children`. ([42686](https://github.com/WordPress/gutenberg/pull/42686)) +- Popover: Fix width on `expandOnMobile`. ([42635](https://github.com/WordPress/gutenberg/pull/42635)) +- RangeControl: Clamp initialPosition between min and max values. ([42571](https://github.com/WordPress/gutenberg/pull/42571)) +- Tooltip: Avoid unnecessary re-renders of `