Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gutenberg] Enable reusable block only in WP.com sites #14623

Merged
merged 19 commits into from
May 26, 2021
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: 2 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

17.5
-----
* [***] Block Editor: New Block: Reusable block. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3490]
* [***] Block Editor: Add reusable blocks to the block inserter menu. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3054]

17.3.2
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2290,6 +2290,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
boolean unsupportedBlockEditorSwitch = !mIsJetpackSsoEnabled && "gutenberg".equals(mSite.getWebEditor());

boolean isFreeWPCom = mSite.isWPCom() && SiteUtils.onFreePlan(mSite);
boolean isWPComSite = mSite.isWPCom() || mSite.isWPComAtomic();

boolean canViewEditorOnboarding = (
mAccountStore.getAccount().getUserId() % 100 >= (100 - EDITOR_ONBOARDING_PHASE_PERCENTAGE)
Expand All @@ -2303,6 +2304,9 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
isUnsupportedBlockEditorEnabled,
unsupportedBlockEditorSwitch,
!isFreeWPCom, // Disable audio block until it's usable on free sites via "Insert from URL" capability
// Only enable reusable block in WP.com sites until the issue
// (https://github.com/wordpress-mobile/gutenberg-mobile/issues/3457) in self-hosted sites is fixed
isWPComSite,
wpcomLocaleSlug,
postType,
featuredImageId,
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
ext.kotlin_ktx_version = '1.2.0'
ext.wordPressUtilsVersion = '1.40.0'
ext.detektVersion = '1.15.0'
ext.gutenbergMobileVersion = 'v1.53.1'
ext.gutenbergMobileVersion = 'develop-c55652b5fabf0e4edd08b79da4b78418aa886410'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reference is pointing to the commit that introduced the fix for the Android crash referenced in this comment.


repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data class GutenbergPropsBuilder(
private val enableUnsupportedBlockEditor: Boolean,
private val unsupportedBlockEditorSwitch: Boolean,
private val enableAudioBlock: Boolean,
private val enableReusableBlock: Boolean,
private val localeSlug: String,
private val postType: String,
private val featuredImageId: Int,
Expand All @@ -29,6 +30,7 @@ data class GutenbergPropsBuilder(
enableUnsupportedBlockEditor = enableUnsupportedBlockEditor,
canEnableUnsupportedBlockEditor = unsupportedBlockEditorSwitch,
enableAudioBlock = enableAudioBlock,
enableReusableBlock = enableReusableBlock,
localeSlug = localeSlug,
postType = postType,
featuredImageId = featuredImageId,
Expand Down