From c6e4bd7acf179c2504b2cd5552de19a7ba279e15 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 2 Aug 2021 15:47:17 +0300 Subject: [PATCH 1/3] Renames __experimentalGalleryRefactor to __unstableGalleryWithImageBlocks --- packages/editor/src/components/provider/index.native.js | 8 ++++---- packages/react-native-bridge/ios/Gutenberg.swift | 2 +- .../ios/GutenbergBridgeDataSource.swift | 2 +- packages/react-native-editor/src/index.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/editor/src/components/provider/index.native.js b/packages/editor/src/components/provider/index.native.js index 766fbc38d618bb..fa12b05d1642d4 100644 --- a/packages/editor/src/components/provider/index.native.js +++ b/packages/editor/src/components/provider/index.native.js @@ -86,11 +86,11 @@ class NativeEditorProvider extends Component { } componentDidMount() { - const { capabilities, updateSettings, galleryRefactor } = this.props; + const { capabilities, updateSettings, galleryWithImageBlocks } = this.props; updateSettings( { ...capabilities, - ...{ __experimentalGalleryRefactor: galleryRefactor }, + ...{ __unstableGalleryWithImageBlocks: galleryWithImageBlocks }, ...this.getThemeColors( this.props ), } ); @@ -142,8 +142,8 @@ class NativeEditorProvider extends Component { ( editorSettings ) => { updateSettings( { ...{ - __experimentalGalleryRefactor: - editorSettings.galleryRefactor, + __unstableGalleryWithImageBlocks: + editorSettings.galleryWithImageBlocks, }, ...this.getThemeColors( editorSettings ), } ); diff --git a/packages/react-native-bridge/ios/Gutenberg.swift b/packages/react-native-bridge/ios/Gutenberg.swift index 26a17e17dc9b0d..e8b39be69da20a 100644 --- a/packages/react-native-bridge/ios/Gutenberg.swift +++ b/packages/react-native-bridge/ios/Gutenberg.swift @@ -193,7 +193,7 @@ public class Gutenberg: NSObject { private func properties(from editorSettings: GutenbergEditorSettings?) -> [String : Any] { var settingsUpdates = [String : Any]() settingsUpdates["isFSETheme"] = editorSettings?.isFSETheme ?? false - settingsUpdates["galleryRefactor"] = editorSettings?.galleryRefactor ?? false + settingsUpdates["galleryWithImageBlocks"] = editorSettings?.galleryWithImageBlocks ?? false if let rawStyles = editorSettings?.rawStyles { settingsUpdates["rawStyles"] = rawStyles diff --git a/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift b/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift index 921454b0d192a4..561784bd6b035f 100644 --- a/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift +++ b/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift @@ -72,7 +72,7 @@ public extension GutenbergBridgeDataSource { public protocol GutenbergEditorSettings { var isFSETheme: Bool { get } - var galleryRefactor: Bool { get } + var galleryWithImageBlocks: Bool { get } var rawStyles: String? { get } var rawFeatures: String? { get } var colors: [[String: String]]? { get } diff --git a/packages/react-native-editor/src/index.js b/packages/react-native-editor/src/index.js index 8399b8eaf085cd..3fd18a16746487 100644 --- a/packages/react-native-editor/src/index.js +++ b/packages/react-native-editor/src/index.js @@ -83,7 +83,7 @@ const setupInitHooks = () => { gradients, rawStyles, rawFeatures, - galleryRefactor, + galleryWithImageBlocks, } = props; if ( initialData === undefined && __DEV__ ) { @@ -111,7 +111,7 @@ const setupInitHooks = () => { gradients, rawStyles, rawFeatures, - galleryRefactor, + galleryWithImageBlocks, }; } ); From b763f4f075fbc010f589051ede91a0d52e18f473 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 2 Aug 2021 16:11:38 +0300 Subject: [PATCH 2/3] Fixes lint formatting issue --- packages/editor/src/components/provider/index.native.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/provider/index.native.js b/packages/editor/src/components/provider/index.native.js index fa12b05d1642d4..4e9b15b4396cd4 100644 --- a/packages/editor/src/components/provider/index.native.js +++ b/packages/editor/src/components/provider/index.native.js @@ -86,7 +86,11 @@ class NativeEditorProvider extends Component { } componentDidMount() { - const { capabilities, updateSettings, galleryWithImageBlocks } = this.props; + const { + capabilities, + updateSettings, + galleryWithImageBlocks + } = this.props; updateSettings( { ...capabilities, From 61fecc08f4e313530050fd3c5a3735bc5d2cb303 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 2 Aug 2021 16:30:47 +0300 Subject: [PATCH 3/3] Fixes lint issue --- packages/editor/src/components/provider/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/provider/index.native.js b/packages/editor/src/components/provider/index.native.js index 4e9b15b4396cd4..bc1bf93cb07456 100644 --- a/packages/editor/src/components/provider/index.native.js +++ b/packages/editor/src/components/provider/index.native.js @@ -89,7 +89,7 @@ class NativeEditorProvider extends Component { const { capabilities, updateSettings, - galleryWithImageBlocks + galleryWithImageBlocks, } = this.props; updateSettings( {