Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ abstract_target 'Apps' do
## Gutenberg (React Native)
## =====================
##
gutenberg :tag => 'v1.63.0'
gutenberg :tag => 'v1.64.0-alpha2'

## Third party libraries
## =====================
Expand Down
186 changes: 93 additions & 93 deletions Podfile.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
18.5
-----
* [**] Block editor: Embed block: Include Jetpack embed variants. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4008]


18.4
Expand Down
9 changes: 9 additions & 0 deletions WordPress/Classes/Models/Blog.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ typedef NS_ENUM(NSUInteger, BlogFeature) {
BlogFeatureBlockEditorSettings,
/// Does the blog support the Layout grid block?
BlogFeatureLayoutGrid,
/// Does the blog support Facebook embed block?
BlogFeatureFacebookEmbed,
/// Does the blog support Instagram embed block?
BlogFeatureInstagramEmbed,
/// Does the blog support Loom embed block?
BlogFeatureLoomEmbed,
/// Does the blog support Smartframe embed block?
BlogFeatureSmartframeEmbed,

};

typedef NS_ENUM(NSInteger, SiteVisibility) {
Expand Down
13 changes: 13 additions & 0 deletions WordPress/Classes/Models/Blog.m
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,14 @@ - (BOOL)supports:(BlogFeature)feature
return [self supportsBlockEditorSettings];
case BlogFeatureLayoutGrid:
return [self supportsLayoutGrid];
case BlogFeatureFacebookEmbed:
return [self supportsEmbedVariation: @"9.0"];
case BlogFeatureInstagramEmbed:
return [self supportsEmbedVariation: @"9.0"];
case BlogFeatureLoomEmbed:
return [self supportsEmbedVariation: @"9.0"];
case BlogFeatureSmartframeEmbed:
return [self supportsEmbedVariation: @"10.2"];
}
}

Expand Down Expand Up @@ -680,6 +688,11 @@ - (BOOL)supportsLayoutGrid
return self.isHostedAtWPcom || self.isAtomic;
}

- (BOOL)supportsEmbedVariation:(NSString *)requiredJetpackVersion
{
return [self hasRequiredJetpackVersion:requiredJetpackVersion] || self.isHostedAtWPcom;
}

- (BOOL)accountIsDefaultAccount
{
AccountService *accountService = [[AccountService alloc] initWithManagedObjectContext:self.managedObjectContext];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,12 @@ extension GutenbergViewController: GutenbergBridgeDataSource {
// (https://github.com/wordpress-mobile/gutenberg-mobile/issues/3457) in self-hosted sites is fixed
.reusableBlock: isWPComSite,
.editorOnboarding: canViewEditorOnboarding(),
.firstGutenbergEditorSession: !gutenbergSettings.hasLaunchedGutenbergEditor
.firstGutenbergEditorSession: !gutenbergSettings.hasLaunchedGutenbergEditor,
// Jetpack embeds
.facebookEmbed: post.blog.supports(.facebookEmbed),
.instagramEmbed: post.blog.supports(.instagramEmbed),
.loomEmbed: post.blog.supports(.loomEmbed),
.smartframeEmbed: post.blog.supports(.smartframeEmbed)
]
}

Expand Down