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] Tiled Gallery: Remove "link to" settings and references #21884

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TiledGalleryEdit = props => {
noticeUI,
onFocus,
setAttributes,
attributes: { columns, images: attributeImages, linkTo, roundedCorners },
attributes: { columns, images: attributeImages, roundedCorners },
} = props;

const { replaceInnerBlocks, updateBlockAttributes } = useDispatch( blockEditorStore );
Expand Down Expand Up @@ -173,7 +173,6 @@ const TiledGalleryEdit = props => {
{ resizeObserver }
<TiledGallerySettings
setAttributes={ props.setAttributes }
linkTo={ linkTo }
columns={ columns }
roundedCorners={ roundedCorners }
clientId={ clientId }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default function TiledGallerySave( { attributes, innerBlocks } ) {
align,
className,
columns = defaultColumnsNumber( images ),
linkTo,
roundedCorners,
columnWidths,
ids,
Expand All @@ -43,7 +42,6 @@ export default function TiledGallerySave( { attributes, innerBlocks } ) {
images={ images }
isSave
layoutStyle={ layoutStyle }
linkTo={ linkTo }
roundedCorners={ roundedCorners }
columnWidths={ columnWidths }
ids={ ids }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import { InspectorControls } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';
import { useEffect, useState } from '@wordpress/element';
import {
LinkSettingsNavigation,
PanelBody,
RangeControl,
UnitControl,
} from '@wordpress/components';
import { PanelBody, RangeControl, UnitControl } from '@wordpress/components';
import { usePreferredColorSchemeStyle } from '@wordpress/compose';

/**
Expand All @@ -33,7 +28,7 @@ const TiledGallerySettings = props => {
styles.horizontalBorderDark
);

const { setAttributes, linkTo, columns, roundedCorners, clientId, className } = props;
const { setAttributes, columns, roundedCorners, clientId, className } = props;
const [ columnNumber, setColumnNumber ] = useState( columns ?? DEFAULT_COLUMNS );
useEffect( () => {
setColumnNumber( columns );
Expand All @@ -42,16 +37,6 @@ const TiledGallerySettings = props => {
const [ roundedCornerRadius, setRoundedCornerRadius ] = useState(
roundedCorners ?? DEFAULT_ROUNDED_CORNERS
);
const [ linkToURL, setLinkToURL ] = useState( linkTo ?? '' );

const linkSettingsOptions = {
url: {
label: __( 'Link URL', 'jetpack' ),
placeholder: __( 'Add URL', 'jetpack' ),
autoFocus: true,
autoFill: true,
},
};

const layoutStyle = getActiveStyleName( LAYOUT_STYLES, className );

Expand Down Expand Up @@ -88,18 +73,6 @@ const TiledGallerySettings = props => {
/>
</PanelBody>
) }
<PanelBody>
<LinkSettingsNavigation
url={ linkToURL }
setAttributes={ value => {
setLinkToURL( value.url );
} }
withBottomSheet={ false }
hasPicker
options={ linkSettingsOptions }
showIcon={ false }
/>
</PanelBody>
</InspectorControls>
);
};
Expand Down