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 Mobile] Enable the native editor to receive a host app's namespace #16935

Merged
merged 6 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
import org.wordpress.android.util.AutolinkUtils;
import org.wordpress.android.util.BuildConfigWrapper;
import org.wordpress.android.util.DateTimeUtilsWrapper;
import org.wordpress.android.util.DisplayUtils;
import org.wordpress.android.util.FluxCUtils;
Expand Down Expand Up @@ -395,6 +396,7 @@ enum RestartEditorOptions {
@Inject EditorTracker mEditorTracker;
@Inject UploadUtilsWrapper mUploadUtilsWrapper;
@Inject EditorActionsProvider mEditorActionsProvider;
@Inject BuildConfigWrapper mBuildConfigWrapper;
@Inject DateTimeUtilsWrapper mDateTimeUtils;
@Inject ViewModelProvider.Factory mViewModelFactory;
@Inject ReaderUtilsWrapper mReaderUtilsWrapper;
Expand Down Expand Up @@ -2341,6 +2343,8 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
boolean isWPComSite = mSite.isWPCom() || mSite.isWPComAtomic();
boolean shouldUseFastImage = !mSite.isPrivate() && !mSite.isPrivateWPComAtomic();

String hostAppNamespace = mBuildConfigWrapper.isJetpackApp() ? "Jetpack" : "WordPress";

return new GutenbergPropsBuilder(
SiteUtils.supportsContactInfoFeature(mSite),
SiteUtils.supportsLayoutGridFeature(mSite),
Expand All @@ -2359,6 +2363,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
isWPComSite,
wpcomLocaleSlug,
postType,
hostAppNamespace,
featuredImageId,
themeBundle
);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
ext {
wordPressUtilsVersion = 'trunk-68e2995962a5134770e6f9e5b9f258a339e123b2'
wordPressLoginVersion = '0.15.0'
gutenbergMobileVersion = 'v1.80.0'
gutenbergMobileVersion = '5040-6094df206c82b139b14634c05ec5b963ddba3f97'
Copy link
Member

Choose a reason for hiding this comment

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

Friendly reminder: we'll need to update this reference to a newly created alpha tag before merging.

storiesVersion = '1.4.0'
aboutAutomatticVersion = '0.0.6'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ data class GutenbergPropsBuilder(
private val enableReusableBlock: Boolean,
private val localeSlug: String,
private val postType: String,
private val hostAppNamespace: String,
private val featuredImageId: Int,
private val editorTheme: Bundle?
) : Parcelable {
Expand All @@ -48,6 +49,7 @@ data class GutenbergPropsBuilder(
enableReusableBlock = enableReusableBlock,
localeSlug = localeSlug,
postType = postType,
hostAppNamespace = hostAppNamespace,
featuredImageId = featuredImageId,
editorTheme = editorTheme,
translations = GutenbergUtils.getTranslations(activity),
Expand Down