From 322a51482a6a80c61a2e04eb0b0d83ad01d65270 Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Thu, 27 Jul 2023 16:47:55 +1000 Subject: [PATCH 1/2] Remove caption button from mobile block toolbar --- packages/block-library/src/gallery/edit.js | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/block-library/src/gallery/edit.js b/packages/block-library/src/gallery/edit.js index 198892e286aba..c5d96e1a6e8e4 100644 --- a/packages/block-library/src/gallery/edit.js +++ b/packages/block-library/src/gallery/edit.js @@ -616,27 +616,27 @@ function GalleryEdit( props ) { ) } - - { ! isContentLocked && ( - { - setShowCaption( ! showCaption ); - if ( showCaption && caption ) { - setAttributes( { caption: undefined } ); - } - } } - icon={ captionIcon } - isPressed={ showCaption } - label={ - showCaption - ? __( 'Remove caption' ) - : __( 'Add caption' ) - } - /> - ) } - { Platform.isWeb && ( <> + + { ! isContentLocked && ( + { + setShowCaption( ! showCaption ); + if ( showCaption && caption ) { + setAttributes( { caption: undefined } ); + } + } } + icon={ captionIcon } + isPressed={ showCaption } + label={ + showCaption + ? __( 'Remove caption' ) + : __( 'Add caption' ) + } + /> + ) } + Date: Thu, 27 Jul 2023 17:25:18 +1000 Subject: [PATCH 2/2] Update CHANGELOG --- packages/react-native-editor/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index b13b21a698a8e..952818e2411cb 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,6 +11,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased - [*] Remove visual gap in mobile toolbar when a Gallery block is selected [#52966] +- [*] Remove Gallery caption button on mobile [#53010] ## 1.100.1 - [**] Add WP hook for registering non-core blocks [#52791]