Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNMobile] Remove non-functioning caption button from mobile block toolbar #53010

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading