Skip to content

Commit

Permalink
[RNMobile] Remove non-functioning caption button from mobile block to…
Browse files Browse the repository at this point in the history
…olbar (#53010)

* Remove caption button from mobile block toolbar

* Update CHANGELOG
  • Loading branch information
derekblank authored Jul 27, 2023
1 parent 99ab7ed commit c9112ab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
38 changes: 19 additions & 19 deletions packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,27 +616,27 @@ function GalleryEdit( props ) {
) }
</PanelBody>
</InspectorControls>
<BlockControls group="block">
{ ! isContentLocked && (
<ToolbarButton
onClick={ () => {
setShowCaption( ! showCaption );
if ( showCaption && caption ) {
setAttributes( { caption: undefined } );
}
} }
icon={ captionIcon }
isPressed={ showCaption }
label={
showCaption
? __( 'Remove caption' )
: __( 'Add caption' )
}
/>
) }
</BlockControls>
{ Platform.isWeb && (
<>
<BlockControls group="block">
{ ! isContentLocked && (
<ToolbarButton
onClick={ () => {
setShowCaption( ! showCaption );
if ( showCaption && caption ) {
setAttributes( { caption: undefined } );
}
} }
icon={ captionIcon }
isPressed={ showCaption }
label={
showCaption
? __( 'Remove caption' )
: __( 'Add caption' )
}
/>
) }
</BlockControls>
<BlockControls group="other">
<MediaReplaceFlow
allowedTypes={ ALLOWED_MEDIA_TYPES }
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
- [**] Upgrade React Native to 0.71.11 [#51303]

## 1.100.1
Expand Down

0 comments on commit c9112ab

Please sign in to comment.