Skip to content

Commit

Permalink
[Mobile] Renames Gallery v2 Flag to __unstableGalleryWithImageBlocks (#…
Browse files Browse the repository at this point in the history
…33816)

* Renames __experimentalGalleryRefactor to __unstableGalleryWithImageBlocks

* Fixes lint formatting issue

* Fixes lint issue
  • Loading branch information
Antonis Lilis authored Aug 2, 2021
1 parent b3460a6 commit 7e48195
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
12 changes: 8 additions & 4 deletions packages/editor/src/components/provider/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ 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 ),
} );

Expand Down Expand Up @@ -142,8 +146,8 @@ class NativeEditorProvider extends Component {
( editorSettings ) => {
updateSettings( {
...{
__experimentalGalleryRefactor:
editorSettings.galleryRefactor,
__unstableGalleryWithImageBlocks:
editorSettings.galleryWithImageBlocks,
},
...this.getThemeColors( editorSettings ),
} );
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-bridge/ios/Gutenberg.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const setupInitHooks = () => {
gradients,
rawStyles,
rawFeatures,
galleryRefactor,
galleryWithImageBlocks,
} = props;

if ( initialData === undefined && __DEV__ ) {
Expand Down Expand Up @@ -111,7 +111,7 @@ const setupInitHooks = () => {
gradients,
rawStyles,
rawFeatures,
galleryRefactor,
galleryWithImageBlocks,
};
}
);
Expand Down

0 comments on commit 7e48195

Please sign in to comment.