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.56.0-alpha1'
gutenberg :tag => 'v1.56.0-alpha3'

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

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions WordPress/Classes/Models/Blog.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ typedef NS_ENUM(NSUInteger, BlogFeature) {
BlogFeatureStories,
/// Does the blog support Jetpack contact info block?
BlogFeatureContactInfo,
/// Does the blog support the Layout grid block?
BlogFeatureLayoutGrid,
};

typedef NS_ENUM(NSInteger, SiteVisibility) {
Expand Down
10 changes: 10 additions & 0 deletions WordPress/Classes/Models/Blog.m
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ - (BOOL)supports:(BlogFeature)feature
return [self supportsStories];
case BlogFeatureContactInfo:
return [self supportsContactInfo];
case BlogFeatureLayoutGrid:
return [self supportsLayoutGrid];
}
}

Expand Down Expand Up @@ -657,6 +659,14 @@ - (BOOL)supportsContactInfo
return [self hasRequiredJetpackVersion:@"8.5"] || self.isHostedAtWPcom;
}

- (BOOL)supportsLayoutGrid
{
if (![Feature enabled:FeatureFlagLayoutGrid]) {
return false;
}
return self.isHostedAtWPcom || self.isAtomic;
}

- (BOOL)accountIsDefaultAccount
{
AccountService *accountService = [[AccountService alloc] initWithManagedObjectContext:self.managedObjectContext];
Expand Down
5 changes: 5 additions & 0 deletions WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
case unifiedPrologueCarousel
case stories
case contactInfo
case layoutGrid
case siteCreationHomePagePicker
case todayWidget
case milestoneNotifications
Expand Down Expand Up @@ -47,6 +48,8 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
return true
case .contactInfo:
return true
case .layoutGrid:
return BuildConfiguration.current ~= [.localDeveloper, .a8cBranchTest]
case .siteCreationHomePagePicker:
return true
case .todayWidget:
Expand Down Expand Up @@ -107,6 +110,8 @@ extension FeatureFlag {
return "Stories"
case .contactInfo:
return "Contact Info"
case .layoutGrid:
return "Layout Grid"
case .siteCreationHomePagePicker:
return "Site Creation: Home Page Picker"
case .todayWidget:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ extension GutenbergViewController: GutenbergBridgeDataSource {
.mentions: FeatureFlag.gutenbergMentions.enabled && SuggestionService.shared.shouldShowSuggestions(for: post.blog),
.xposts: FeatureFlag.gutenbergXposts.enabled && SiteSuggestionService.shared.shouldShowSuggestions(for: post.blog),
.contactInfoBlock: post.blog.supports(.contactInfo) && FeatureFlag.contactInfo.enabled,
.layoutGridBlock: post.blog.supports(.layoutGrid),
.unsupportedBlockEditor: isUnsupportedBlockEditorEnabled,
.canEnableUnsupportedBlockEditor: post.blog.jetpack?.isConnected ?? false,
.isAudioBlockMediaUploadEnabled: !isFreeWPCom,
Expand Down