From ddc84ceb86769ec6d30880df592193809a3e780a Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Mon, 7 Aug 2023 11:45:31 +1000 Subject: [PATCH 1/4] Add outline around selected Social Link block --- .../src/components/block-list/block-outline.native.js | 4 ++-- packages/react-native-editor/CHANGELOG.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-list/block-outline.native.js b/packages/block-editor/src/components/block-list/block-outline.native.js index 8f0c0015fa35c..753b16f94a755 100644 --- a/packages/block-editor/src/components/block-list/block-outline.native.js +++ b/packages/block-editor/src/components/block-list/block-outline.native.js @@ -13,7 +13,7 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose'; */ import styles from './block.scss'; -const TEXT_BLOCKS_WITH_OUTLINE = [ 'core/missing' ]; +const BLOCKS_WITH_OUTLINE = [ 'core/social-link', 'core/missing' ]; function BlockOutline( { blockCategory, @@ -22,7 +22,7 @@ function BlockOutline( { isSelected, name, } ) { - const textBlockWithOutline = TEXT_BLOCKS_WITH_OUTLINE.includes( name ); + const textBlockWithOutline = BLOCKS_WITH_OUTLINE.includes( name ); const hasBlockTextCategory = blockCategory === 'text' && ! textBlockWithOutline; const hasBlockMediaCategory = diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 0b483873048df..366c425025646 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 - [*] Display custom color value in mobile Cover Block color picker [#51414] +- [**] Display outline around selected Social Link block [#51414] ## 1.101.0 - [*] Remove visual gap in mobile toolbar when a Gallery block is selected [#52966] From 1a85bfa4211e47865749d21960087aac29e2a769 Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Mon, 7 Aug 2023 12:43:32 +1000 Subject: [PATCH 2/4] Update spacing around Social Link icon container --- packages/block-library/src/social-link/edit.native.js | 2 +- packages/block-library/src/social-link/editor.native.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/social-link/edit.native.js b/packages/block-library/src/social-link/edit.native.js index bc3d2e47db961..3a9f19756c894 100644 --- a/packages/block-library/src/social-link/edit.native.js +++ b/packages/block-library/src/social-link/edit.native.js @@ -157,7 +157,7 @@ const SocialLinkEdit = ( { ); return ( - + { isSelected && ( <> diff --git a/packages/block-library/src/social-link/editor.native.scss b/packages/block-library/src/social-link/editor.native.scss index be0919d2c33fb..f54d3aa484775 100644 --- a/packages/block-library/src/social-link/editor.native.scss +++ b/packages/block-library/src/social-link/editor.native.scss @@ -1,5 +1,9 @@ @import "./socials-with-bg.scss"; +.container { + margin: $block-selected-margin; +} + .linkSettingsPanel { padding-left: 0; padding-right: 0; From 8eafc6f56733fbaedf88f408626fa22c61199352 Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Mon, 7 Aug 2023 12:49:06 +1000 Subject: [PATCH 3/4] Add useNativeDriver param to Social Link --- packages/block-library/src/social-link/edit.native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-library/src/social-link/edit.native.js b/packages/block-library/src/social-link/edit.native.js index 3a9f19756c894..856c6aa704a4e 100644 --- a/packages/block-library/src/social-link/edit.native.js +++ b/packages/block-library/src/social-link/edit.native.js @@ -119,6 +119,7 @@ const SocialLinkEdit = ( { toValue: 1, duration: ANIMATION_DURATION, easing: Easing.circle, + useNativeDriver: false, } ), ] ).start( () => setHasUrl( true ) ); } From 372b6dbc7f96fac8a6b36b401d925bab070ed1c0 Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Mon, 7 Aug 2023 12:56:23 +1000 Subject: [PATCH 4/4] Update Social Links footer appender styles --- packages/block-library/src/social-links/edit.native.js | 2 +- packages/block-library/src/social-links/editor.native.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/social-links/edit.native.js b/packages/block-library/src/social-links/edit.native.js index 9a3b1bdc8694b..8236eef081477 100644 --- a/packages/block-library/src/social-links/edit.native.js +++ b/packages/block-library/src/social-links/edit.native.js @@ -57,7 +57,7 @@ function SocialLinksEdit( { }, [ shouldRenderFooterAppender ] ); const renderFooterAppender = useRef( () => ( - + ) ); diff --git a/packages/block-library/src/social-links/editor.native.scss b/packages/block-library/src/social-links/editor.native.scss index cfba35769c719..23030419f8891 100644 --- a/packages/block-library/src/social-links/editor.native.scss +++ b/packages/block-library/src/social-links/editor.native.scss @@ -19,3 +19,7 @@ flex-direction: row; flex-wrap: wrap; } + +.footerAppenderContainer { + margin: $block-selected-margin 0; +}