From 4673738317d87a2509f7e97832c57cc177179967 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 13 Jan 2025 15:22:01 +0400 Subject: [PATCH 01/15] Site Logo: Prevent focus loss when updating media from the sidebar (#68621) Co-authored-by: Mamaduka Co-authored-by: afercia --- packages/block-library/src/site-logo/edit.js | 75 +++++++------------ .../block-library/src/site-logo/editor.scss | 9 +-- 2 files changed, 32 insertions(+), 52 deletions(-) diff --git a/packages/block-library/src/site-logo/edit.js b/packages/block-library/src/site-logo/edit.js index 6d3eda830878e..d2d2327736fd7 100644 --- a/packages/block-library/src/site-logo/edit.js +++ b/packages/block-library/src/site-logo/edit.js @@ -33,8 +33,6 @@ import { BlockControls, InspectorControls, MediaPlaceholder, - MediaUpload, - MediaUploadCheck, MediaReplaceFlow, useBlockProps, store as blockEditorStore, @@ -347,29 +345,24 @@ const SiteLogo = ( { // This is a light wrapper around MediaReplaceFlow because the block has two // different MediaReplaceFlows, one for the inspector and one for the toolbar. -function SiteLogoReplaceFlow( { - mediaURL, - onRemoveLogo, - ...mediaReplaceProps -} ) { +function SiteLogoReplaceFlow( { mediaURL, ...mediaReplaceProps } ) { return ( ); } -const InspectorLogoPreview = ( { mediaItemData = {}, itemGroupProps } ) => { +const InspectorLogoPreview = ( { media, itemGroupProps } ) => { const { alt_text: alt, source_url: logoUrl, slug: logoSlug, media_details: logoMediaDetails, - } = mediaItemData; + } = media ?? {}; const logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug; return ( @@ -530,7 +523,7 @@ export default function LogoEdit( { name: ! logoUrl ? __( 'Choose logo' ) : __( 'Replace' ), onSelect: onSelectLogo, onError: onUploadError, - onRemoveLogo, + onReset: onRemoveLogo, }; const controls = canUserEdit && ( @@ -603,50 +596,40 @@ export default function LogoEdit( {
- { ! canUserEdit && !! logoUrl && ( + { ! canUserEdit ? ( - ) } - { canUserEdit && !! logoUrl && ( - - } - popoverProps={ {} } - /> - ) } - { canUserEdit && ! logoUrl && ( - - ( -
- - -
+ ) : ( + <> + + ) : ( + __( 'Choose logo' ) + ) + } + renderToggle={ ( props ) => ( + ) } /> -
+ + ) }
diff --git a/packages/block-library/src/site-logo/editor.scss b/packages/block-library/src/site-logo/editor.scss index 2f9d1917079be..da6d8d0830411 100644 --- a/packages/block-library/src/site-logo/editor.scss +++ b/packages/block-library/src/site-logo/editor.scss @@ -108,17 +108,16 @@ } } -.block-library-site-logo__inspector-upload-container { +.block-library-site-logo__inspector-media-replace-container { + // Ensure the dropzone is positioned to the size of the item. position: relative; + // Since there is no option to skip rendering the drag'n'drop icon in drop // zone, we hide it for now. .components-drop-zone__content-icon { display: none; } -} -.block-library-site-logo__inspector-upload-container, -.block-library-site-logo__inspector-media-replace-container { button.components-button { color: $gray-900; box-shadow: inset 0 0 0 1px $gray-400; @@ -144,9 +143,7 @@ text-align: start; text-align-last: center; } -} -.block-library-site-logo__inspector-media-replace-container { .components-dropdown { display: block; } From cca80834c28619f9f630fb918c8b1a1816e07076 Mon Sep 17 00:00:00 2001 From: Dovid Levine Date: Mon, 13 Jan 2025 17:29:33 +0200 Subject: [PATCH 02/15] docs: fix param name in `gutenberg_add_can_update_block_bindings_editor_setting()` (#68390) Co-authored-by: justlevine Co-authored-by: Mamaduka --- lib/compat/wordpress-6.7/block-bindings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.7/block-bindings.php b/lib/compat/wordpress-6.7/block-bindings.php index 3cecb7fbc0985..08608a8d394e7 100644 --- a/lib/compat/wordpress-6.7/block-bindings.php +++ b/lib/compat/wordpress-6.7/block-bindings.php @@ -32,7 +32,7 @@ function gutenberg_bootstrap_server_block_bindings_sources() { /** * Initialize `canUpdateBlockBindings` editor setting if it doesn't exist. By default, it is `true` only for admin users. * - * @param array $settings The block editor settings from the `block_editor_settings_all` filter. + * @param array $editor_settings The block editor settings from the `block_editor_settings_all` filter. * @return array The editor settings including `canUpdateBlockBindings`. */ function gutenberg_add_can_update_block_bindings_editor_setting( $editor_settings ) { From cd8e65571b1d2c6316bcaa7e3e747857d92aa15b Mon Sep 17 00:00:00 2001 From: Vrishabh Jasani <71686151+Vrishabhsk@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:36:03 +0400 Subject: [PATCH 03/15] Block Directory : Block Inserter Search Infinity Spinner (#68600) Co-authored-by: Vrishabhsk Co-authored-by: Mamaduka --- packages/block-directory/src/store/resolvers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-directory/src/store/resolvers.js b/packages/block-directory/src/store/resolvers.js index cd13ba5ccd713..b697b1dd63029 100644 --- a/packages/block-directory/src/store/resolvers.js +++ b/packages/block-directory/src/store/resolvers.js @@ -35,5 +35,7 @@ export const getDownloadableBlocks = ); dispatch( receiveDownloadableBlocks( blocks, filterValue ) ); - } catch {} + } catch { + dispatch( receiveDownloadableBlocks( [], filterValue ) ); + } }; From aa38b2205f7fcbe18c8f06f48b06ba0dcc183b08 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Mon, 13 Jan 2025 20:26:07 +0100 Subject: [PATCH 04/15] Details block: remove auto-close behaviour (#67766) Co-authored-by: ellatrix Co-authored-by: Mamaduka Co-authored-by: annezazu --- packages/block-library/src/details/edit.js | 32 +++++++--------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/packages/block-library/src/details/edit.js b/packages/block-library/src/details/edit.js index 9cf6a7a845612..89aac092df22c 100644 --- a/packages/block-library/src/details/edit.js +++ b/packages/block-library/src/details/edit.js @@ -5,16 +5,15 @@ import { RichText, useBlockProps, useInnerBlocksProps, - store as blockEditorStore, InspectorControls, } from '@wordpress/block-editor'; -import { useSelect } from '@wordpress/data'; import { ToggleControl, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; +import { useState } from '@wordpress/element'; /** * Internal dependencies @@ -30,7 +29,7 @@ const TEMPLATE = [ ], ]; -function DetailsEdit( { attributes, setAttributes, clientId } ) { +function DetailsEdit( { attributes, setAttributes } ) { const { showContent, summary, allowedBlocks } = attributes; const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps( blockProps, { @@ -38,22 +37,9 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) { __experimentalCaptureToolbars: true, allowedBlocks, } ); + const [ isOpen, setIsOpen ] = useState( showContent ); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); - // Check if either the block or the inner blocks are selected. - const hasSelection = useSelect( - ( select ) => { - const { isBlockSelected, hasSelectedInnerBlock } = - select( blockEditorStore ); - /* Sets deep to true to also find blocks inside the details content block. */ - return ( - hasSelectedInnerBlock( clientId, true ) || - isBlockSelected( clientId ) - ); - }, - [ clientId ] - ); - return ( <> @@ -89,11 +75,13 @@ function DetailsEdit( { attributes, setAttributes, clientId } ) { -
- event.preventDefault() }> +
+ { + event.preventDefault(); + setIsOpen( ! isOpen ); + } } + > Date: Tue, 14 Jan 2025 09:57:29 +0530 Subject: [PATCH 05/15] Color Gradients: Adjust `max-width` for color gradient swatch to accommodate `reset` button size (#68626) * Style: Adjust max-width for color gradient swatch to accommodate button size * Color: incorporate grid unit to provide `reset` button more space Co-authored-by: yogeshbhutkar Co-authored-by: Mamaduka --- packages/block-editor/src/components/colors-gradients/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-editor/src/components/colors-gradients/style.scss b/packages/block-editor/src/components/colors-gradients/style.scss index fbdf144a4176b..661318e558241 100644 --- a/packages/block-editor/src/components/colors-gradients/style.scss +++ b/packages/block-editor/src/components/colors-gradients/style.scss @@ -111,6 +111,7 @@ $swatch-gap: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + max-width: calc(100% - ($button-size-next-default-40px + $grid-unit-05)); } } From b949616c85b4edeb3401028ea0086c7446f188c1 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Tue, 14 Jan 2025 11:10:16 +0530 Subject: [PATCH 06/15] Updated Inline Document order (#68650) * Changed Document Order in editor-behavior-overrides.js * Changed Inline Document Order in complementary-area-toggle/index.js Co-authored-by: shail-mehta Co-authored-by: Mamaduka --- .../interface/src/components/complementary-area-toggle/index.js | 2 +- .../gutenberg-web-single-block/editor-behavior-overrides.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/interface/src/components/complementary-area-toggle/index.js b/packages/interface/src/components/complementary-area-toggle/index.js index 40b4dd99be743..9c629a9bff276 100644 --- a/packages/interface/src/components/complementary-area-toggle/index.js +++ b/packages/interface/src/components/complementary-area-toggle/index.js @@ -13,9 +13,9 @@ import { store as interfaceStore } from '../../store'; /** * Whether the role supports checked state. * + * @see https://www.w3.org/TR/wai-aria-1.1/#aria-checked * @param {import('react').AriaRole} role Role. * @return {boolean} Whether the role supports checked state. - * @see https://www.w3.org/TR/wai-aria-1.1/#aria-checked */ function roleSupportsCheckedState( role ) { return [ diff --git a/packages/react-native-bridge/common/gutenberg-web-single-block/editor-behavior-overrides.js b/packages/react-native-bridge/common/gutenberg-web-single-block/editor-behavior-overrides.js index f0dec3339b9da..e606b694e8efd 100644 --- a/packages/react-native-bridge/common/gutenberg-web-single-block/editor-behavior-overrides.js +++ b/packages/react-native-bridge/common/gutenberg-web-single-block/editor-behavior-overrides.js @@ -13,8 +13,8 @@ function isAndroid() { * tapped. This is done via the 'hideTextSelectionContextMenu' method, which * is sent back to the Android app, where the dismissal is then handle. * - * @return {void} * @see https://github.com/WordPress/gutenberg/pull/34668 + * @return {void} */ function manageTextSelectionContextMenu() { // Listeners for native context menu visibility changes. From f73a06f4e7f5a54b1314777ac5421d050e9e1764 Mon Sep 17 00:00:00 2001 From: Karthick M <97787966+karthick-murugan@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:16:44 +0530 Subject: [PATCH 07/15] Change "Swap" to "Replace" for Template Action (#68234) Unlinked contributors: bgardner, kohheepeace. Co-authored-by: karthick-murugan Co-authored-by: annezazu Co-authored-by: richtabor Co-authored-by: Mamaduka --- .../components/post-template/swap-template-button.js | 2 +- packages/fields/src/fields/template/template-edit.tsx | 2 +- .../editor/various/post-editor-template-mode.spec.js | 8 ++++---- test/e2e/specs/site-editor/pages.spec.js | 6 +++--- .../specs/site-editor/template-registration.spec.js | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/editor/src/components/post-template/swap-template-button.js b/packages/editor/src/components/post-template/swap-template-button.js index bdda349398406..f85b18e355969 100644 --- a/packages/editor/src/components/post-template/swap-template-button.js +++ b/packages/editor/src/components/post-template/swap-template-button.js @@ -37,7 +37,7 @@ export default function SwapTemplateButton( { onClick } ) { return ( <> setShowModal( true ) }> - { __( 'Swap template' ) } + { __( 'Change template' ) } { showModal && ( - { __( 'Swap template' ) } + { __( 'Change template' ) } { // The default template in a post is indicated by an empty string diff --git a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js index 981f8ccbbd5d3..b78a059a6be2c 100644 --- a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js +++ b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js @@ -77,7 +77,7 @@ test.describe( 'Post Editor Template mode', () => { ).toBeVisible(); } ); - test( 'Swap templates and proper template resolution when switching to default template', async ( { + test( 'Change templates and proper template resolution when switching to default template', async ( { editor, page, requestUtils, @@ -88,10 +88,10 @@ test.describe( 'Post Editor Template mode', () => { await page.reload(); await postEditorTemplateMode.disableTemplateWelcomeGuide(); await postEditorTemplateMode.openTemplatePopover(); - // Swap to a custom template, save and reload. + // Change to a custom template, save and reload. await page .getByRole( 'menuitem', { - name: 'Swap template', + name: 'Change template', } ) .click(); await page @@ -101,7 +101,7 @@ test.describe( 'Post Editor Template mode', () => { .click(); await editor.saveDraft(); await page.reload(); - // Swap to the default template. + // Change to the default template. await postEditorTemplateMode.openTemplatePopover(); await page .getByRole( 'menuitem', { diff --git a/test/e2e/specs/site-editor/pages.spec.js b/test/e2e/specs/site-editor/pages.spec.js index 37b164e85a597..54f8a64e067cb 100644 --- a/test/e2e/specs/site-editor/pages.spec.js +++ b/test/e2e/specs/site-editor/pages.spec.js @@ -281,7 +281,7 @@ test.describe( 'Pages', () => { await templateOptionsButton.click(); await page .getByRole( 'menu', { name: 'Template options' } ) - .getByText( 'Swap template' ) + .getByText( 'Change template' ) .click(); const templateItem = page.locator( '.block-editor-block-patterns-list__item-title' @@ -305,7 +305,7 @@ test.describe( 'Pages', () => { await expect( templateOptionsButton ).toHaveText( 'Single Entries' ); } ); - test( 'swap template options should respect the declared `postTypes`', async ( { + test( 'change template options should respect the declared `postTypes`', async ( { page, editor, } ) => { @@ -321,7 +321,7 @@ test.describe( 'Pages', () => { await expect( page .getByRole( 'menu', { name: 'Template options' } ) - .getByText( 'Swap template' ) + .getByText( 'Change template' ) ).toHaveCount( 0 ); } ); } ); diff --git a/test/e2e/specs/site-editor/template-registration.spec.js b/test/e2e/specs/site-editor/template-registration.spec.js index 2960367fc32ef..9856db9713038 100644 --- a/test/e2e/specs/site-editor/template-registration.spec.js +++ b/test/e2e/specs/site-editor/template-registration.spec.js @@ -94,7 +94,7 @@ test.describe( 'Block template registration', () => { ).toBeHidden(); } ); - test( 'registered templates are available in the Swap template screen', async ( { + test( 'registered templates are available in the Change template screen', async ( { admin, editor, page, @@ -106,10 +106,10 @@ test.describe( 'Block template registration', () => { attributes: { content: 'User-created post.' }, } ); - // Swap template. + // Change template. await page.getByRole( 'button', { name: 'Post', exact: true } ).click(); await page.getByRole( 'button', { name: 'Template options' } ).click(); - await page.getByRole( 'menuitem', { name: 'Swap template' } ).click(); + await page.getByRole( 'menuitem', { name: 'Change template' } ).click(); await page.getByText( 'Plugin Template' ).click(); // Verify the template is applied. @@ -133,10 +133,10 @@ test.describe( 'Block template registration', () => { attributes: { content: 'User-created post.' }, } ); - // Swap template. + // Change template. await page.getByRole( 'button', { name: 'Post', exact: true } ).click(); await page.getByRole( 'button', { name: 'Template options' } ).click(); - await page.getByRole( 'menuitem', { name: 'Swap template' } ).click(); + await page.getByRole( 'menuitem', { name: 'Change template' } ).click(); await page.getByText( 'Custom', { exact: true } ).click(); // Verify the theme template is applied. From 680f51ffb6a34bb27e3ee46d09052b2b68401d7c Mon Sep 17 00:00:00 2001 From: Eshaan Dabasiya <76681468+im3dabasia@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:08:13 +0530 Subject: [PATCH 08/15] Customize Widgets: Standardize reduced motion handling using media queries (#68425) Co-authored-by: im3dabasia Co-authored-by: t-hamano --- packages/customize-widgets/src/components/header/style.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/customize-widgets/src/components/header/style.scss b/packages/customize-widgets/src/components/header/style.scss index 73789282108af..51699957cae06 100644 --- a/packages/customize-widgets/src/components/header/style.scss +++ b/packages/customize-widgets/src/components/header/style.scss @@ -42,8 +42,9 @@ } svg { - transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s; - @include reduce-motion("transition"); + @media not (prefers-reduced-motion) { + transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s; + } } &.is-pressed { From 64e1a8bf71c4d085e14d48e4724b3a2631101fe0 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 14 Jan 2025 11:40:34 +0400 Subject: [PATCH 09/15] Inline Commenting: Avoid querying comments when the experiment is disabled (#68632) Co-authored-by: Mamaduka Co-authored-by: t-hamano --- packages/editor/src/components/collab-sidebar/index.js | 5 +---- packages/editor/src/components/header/index.js | 8 +++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/components/collab-sidebar/index.js b/packages/editor/src/components/collab-sidebar/index.js index c53ee9e7e919c..dfece6c6f7319 100644 --- a/packages/editor/src/components/collab-sidebar/index.js +++ b/packages/editor/src/components/collab-sidebar/index.js @@ -29,8 +29,6 @@ import AddCommentToolbarButton from './comment-button-toolbar'; import { useGlobalStylesContext } from '../global-styles-provider'; import { getCommentIdsFromBlocks } from './utils'; -const isBlockCommentExperimentEnabled = - window?.__experimentalEnableBlockComment; const modifyBlockCommentAttributes = ( settings ) => { if ( ! settings.attributes.blockCommentId ) { settings.attributes = { @@ -329,8 +327,7 @@ export default function CollabSidebar() { } ); } - // Check if the experimental flag is enabled. - if ( ! isBlockCommentExperimentEnabled || postStatus === 'publish' ) { + if ( postStatus === 'publish' ) { return null; // or maybe return some message indicating no threads are available. } diff --git a/packages/editor/src/components/header/index.js b/packages/editor/src/components/header/index.js index 3adc5842d20b8..d0af73e7dcb0c 100644 --- a/packages/editor/src/components/header/index.js +++ b/packages/editor/src/components/header/index.js @@ -32,6 +32,9 @@ import { } from '../../store/constants'; import { unlock } from '../../lock-unlock'; +const isBlockCommentExperimentEnabled = + window?.__experimentalEnableBlockComment; + const toolbarVariations = { distractionFreeDisabled: { y: '-50px' }, distractionFreeHover: { y: 0 }, @@ -195,7 +198,10 @@ function Header( { } /> ) } - + + { isBlockCommentExperimentEnabled ? ( + + ) : undefined } { customSaveButton } From 5b1dacc0c278476bba6c7b023d43f15a6c680c3c Mon Sep 17 00:00:00 2001 From: Eshaan Dabasiya <76681468+im3dabasia@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:17:34 +0530 Subject: [PATCH 10/15] Edit Post: Standardize reduced motion handling using media queries (#68426) Co-authored-by: im3dabasia Co-authored-by: t-hamano --- packages/edit-post/src/components/back-button/style.scss | 5 +++-- packages/edit-post/src/components/layout/style.scss | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/edit-post/src/components/back-button/style.scss b/packages/edit-post/src/components/back-button/style.scss index aced752bfedfa..3082cb80a3e4e 100644 --- a/packages/edit-post/src/components/back-button/style.scss +++ b/packages/edit-post/src/components/back-button/style.scss @@ -23,8 +23,9 @@ } &::before { - transition: box-shadow 0.1s ease; - @include reduce-motion("transition"); + @media not (prefers-reduced-motion) { + transition: box-shadow 0.1s ease; + } content: ""; display: block; position: absolute; diff --git a/packages/edit-post/src/components/layout/style.scss b/packages/edit-post/src/components/layout/style.scss index 7a7f13382661a..c63f3eb252817 100644 --- a/packages/edit-post/src/components/layout/style.scss +++ b/packages/edit-post/src/components/layout/style.scss @@ -73,8 +73,9 @@ width: inherit; height: $grid-unit-05; border-radius: $radius-small; - transition: width 0.3s ease-out; - @include reduce-motion("transition"); + @media not (prefers-reduced-motion) { + transition: width 0.3s ease-out; + } } } From 067ee7b6ee22a4c6b01ffd557c1899e09eedfb0d Mon Sep 17 00:00:00 2001 From: Dovid Levine Date: Tue, 14 Jan 2025 10:22:59 +0200 Subject: [PATCH 11/15] docs: fix type syntax _gutenberg_add_block_template_plugin_attribute() (#68391) Co-authored-by: justlevine Co-authored-by: Mamaduka --- lib/compat/wordpress-6.7/compat.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.7/compat.php b/lib/compat/wordpress-6.7/compat.php index 33c123a14860d..98ea34c813ae4 100644 --- a/lib/compat/wordpress-6.7/compat.php +++ b/lib/compat/wordpress-6.7/compat.php @@ -73,8 +73,8 @@ function ( $registered_template ) use ( $template_files ) { /** * Hooks into `get_block_template` to add the `plugin` property when necessary. * - * @param [WP_Block_Template|null] $block_template The found block template, or null if there isn’t one. - * @return [WP_Block_Template|null] The block template that was already found with the plugin property defined if it was registered by a plugin. + * @param WP_Block_Template|null $block_template The found block template, or null if there isn’t one. + * @return WP_Block_Template|null The block template that was already found with the plugin property defined if it was registered by a plugin. */ function _gutenberg_add_block_template_plugin_attribute( $block_template ) { if ( $block_template ) { From 1b188a97b8b9c31758e5f33f0ddc42d014595bd1 Mon Sep 17 00:00:00 2001 From: Dovid Levine Date: Tue, 14 Jan 2025 10:33:00 +0200 Subject: [PATCH 12/15] docs: fix missing `false` return type on gutenberg_register_block_module_id() (#68393) Co-authored-by: justlevine Co-authored-by: Mamaduka --- lib/experimental/script-modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/experimental/script-modules.php b/lib/experimental/script-modules.php index 5a14e1418ed6d..9657fdad4a725 100644 --- a/lib/experimental/script-modules.php +++ b/lib/experimental/script-modules.php @@ -55,7 +55,7 @@ function gutenberg_filter_block_type_metadata_settings_register_view_module( $se * @param string $field_name Field name to pick from metadata. * @param int $index Optional. Index of the script to register when multiple items passed. * Default 0. - * @return string Module ID. + * @return string|false Module ID. */ function gutenberg_register_block_module_id( $metadata, $field_name, $index = 0 ) { if ( empty( $metadata[ $field_name ] ) ) { From 669662c740bf0e69f58ad1d7e570607c066f31ef Mon Sep 17 00:00:00 2001 From: Akira Tachibana Date: Tue, 14 Jan 2025 17:33:28 +0900 Subject: [PATCH 13/15] Docs: Interactivity API - missing styles in the sample code (#66253) Co-authored-by: atachibana Co-authored-by: Mamaduka --- .../the-reactive-and-declarative-mindset.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md b/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md index 3760fdf386780..4f167d4e37de8 100644 --- a/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md +++ b/docs/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md @@ -28,6 +28,15 @@ Take, for example, this interactive block with two buttons and a paragraph: + +