Skip to content

Commit

Permalink
[RNMobile] Tiled Gallery: Remove "link to" settings and references (#…
Browse files Browse the repository at this point in the history
…21884)

For the current phase of the Tiled Gallery block, we won't be shipping the block with "link to" settings. As such, this PR removes all references to those settings.
  • Loading branch information
Siobhan Bamber committed Nov 29, 2021
1 parent 653cbbe commit a65afa9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

.horizontalBorder {
border-top-width: $border-width;
border-bottom-width: $border-width;
border-color: $light-gray-400;
}

Expand Down

0 comments on commit a65afa9

Please sign in to comment.