From 86940b64c4285dee0690ab9f239f3ac1536e4dcf Mon Sep 17 00:00:00 2001 From: Amanda Riu Date: Tue, 19 Jan 2021 19:31:37 -0500 Subject: [PATCH 1/3] Add support for `"multiple": false` block types If the `block.json` configuration for a block specifies `"multiple":false`, then only a single instance of that block should be allowed in a post. If the block already exists in the post, the option to add that block again will be disabled. --- .../components/src/mobile/inserter-button/index.native.js | 8 ++++++-- .../src/mobile/inserter-button/style.native.scss | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/components/src/mobile/inserter-button/index.native.js b/packages/components/src/mobile/inserter-button/index.native.js index bbb7ad0b9100dd..4b640f77661a06 100644 --- a/packages/components/src/mobile/inserter-button/index.native.js +++ b/packages/components/src/mobile/inserter-button/index.native.js @@ -59,12 +59,16 @@ class MenuItem extends Component { return ( Date: Tue, 19 Jan 2021 20:18:29 -0500 Subject: [PATCH 2/3] Fix formatting forced on me by VS Code --- packages/components/src/mobile/inserter-button/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/mobile/inserter-button/index.native.js b/packages/components/src/mobile/inserter-button/index.native.js index 4b640f77661a06..013266a4b3d3d1 100644 --- a/packages/components/src/mobile/inserter-button/index.native.js +++ b/packages/components/src/mobile/inserter-button/index.native.js @@ -66,7 +66,7 @@ class MenuItem extends Component { underlayColor="transparent" activeOpacity={ 0.5 } accessibilityRole="button" - accessibilityLabel={ `${item.title} block` } + accessibilityLabel={ `${ item.title } block` } onPress={ this.onPress } disabled={ item.isDisabled } > From c4b9a37135476aa40bd2b3cc0f8133ee59a57835 Mon Sep 17 00:00:00 2001 From: Amanda Riu Date: Fri, 22 Jan 2021 13:14:18 -0500 Subject: [PATCH 3/3] Add note to Changelog for single use block processing --- packages/react-native-editor/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index e652e648607447..bcb57ea88180b2 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,6 +11,9 @@ For each user feature we should also add a importance categorization label to i ## Unreleased +#### Bug Fix +* Add proper handling for single use blocks such as the more block [#28339] + ## 1.44.1 * [**] Fix crash in mobile paragraph blocks with custom font size [#28121] * [**] Add move to top bottom when long pressing block movers [#27554]