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
Original file line number Diff line number Diff line change
Expand Up @@ -3301,7 +3301,9 @@ private void onEditorFinalTouchesBeforeShowing() {
((GutenbergEditorFragment) mEditorFragment).resetUploadingMediaToFailed(mediaIds);
}
} else if (mShowAztecEditor && mEditorFragment instanceof AztecEditorFragment) {
mPostEditorAnalyticsSession.start(null, canViewEditorOnboarding());
EditorTheme editorTheme = mEditorThemeStore.getEditorThemeForSite(mSite);
Boolean supportsGalleryWithImageBlocks = editorTheme.getThemeSupport().getGalleryWithImageBlocks();
mPostEditorAnalyticsSession.start(null, canViewEditorOnboarding(), supportsGalleryWithImageBlocks);
}
}

Expand All @@ -3314,7 +3316,15 @@ public void onEditorFragmentContentReady(
// It assumes this is being called when the editor has finished loading
// If you need to refactor this, please ensure that the startup_time_ms property
// is still reflecting the actual startup time of the editor
mPostEditorAnalyticsSession.start(unsupportedBlocksList, canViewEditorOnboarding());
EditorTheme editorTheme = mEditorThemeStore.getEditorThemeForSite(mSite);
Boolean supportsGalleryWithImageBlocks = null;
if (editorTheme != null) {
// Note that if the editor theme has not been initialized (usually on the first app run) the
// `unstableGalleryWithImageBlocks` analytics property will not be reported
supportsGalleryWithImageBlocks = editorTheme.getThemeSupport().getGalleryWithImageBlocks();
}
mPostEditorAnalyticsSession
.start(unsupportedBlocksList, canViewEditorOnboarding(), supportsGalleryWithImageBlocks);
presentNewPageNoticeIfNeeded();

// don't start listening for Story events just now if we're waiting for a block to be replaced,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class PostEditorAnalyticsSession implements Serializable {
private static final String KEY_HAS_UNSUPPORTED_BLOCKS = "has_unsupported_blocks";
private static final String KEY_UNSUPPORTED_BLOCKS = "unsupported_blocks";
private static final String KEY_CAN_VIEW_EDITOR_ONBOARDING = "can_view_editor_onboarding";
private static final String KEY_GALLERY_WITH_IMAGE_BLOCKS = "unstableGalleryWithImageBlocks";
private static final String KEY_POST_TYPE = "post_type";
private static final String KEY_OUTCOME = "outcome";
private static final String KEY_SESSION_ID = "session_id";
Expand Down Expand Up @@ -97,7 +98,9 @@ public static PostEditorAnalyticsSession getNewPostEditorAnalyticsSession(
return new PostEditorAnalyticsSession(editor, post, site, isNewPost);
}

public void start(ArrayList<Object> unsupportedBlocksList, Boolean canViewEditorOnboarding) {
public void start(ArrayList<Object> unsupportedBlocksList,
Boolean canViewEditorOnboarding,
Boolean galleryWithImageBlocks) {
if (!mStarted) {
mHasUnsupportedBlocks = unsupportedBlocksList != null && unsupportedBlocksList.size() > 0;
Map<String, Object> properties = getCommonProperties();
Expand All @@ -106,6 +109,9 @@ public void start(ArrayList<Object> unsupportedBlocksList, Boolean canViewEditor
if (canViewEditorOnboarding != null) {
properties.put(KEY_CAN_VIEW_EDITOR_ONBOARDING, canViewEditorOnboarding);
}
if (galleryWithImageBlocks != null) {
properties.put(KEY_GALLERY_WITH_IMAGE_BLOCKS, galleryWithImageBlocks);
}
// Note that start time only counts when the analytics session was created and not when the editor
// activity started. We are mostly interested in measuring the loading times for the block editor,
// where the main bottleneck seems to be initializing React Native and doing the initial load of Gutenberg.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class StoryComposerViewModel @Inject constructor(
editPostRepository.getPost(),
site
)
this.postEditorAnalyticsSession?.start(null, null)
this.postEditorAnalyticsSession?.start(null, null, null)
}

private fun createPostEditorAnalyticsSessionTracker(
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
ext.wordPressUtilsVersion = 'develop-f98c841225fbc61031f32426aaef4e347b34f717'
ext.wordPressLoginVersion = '0.0.4'
ext.detektVersion = '1.15.0'
ext.gutenbergMobileVersion = 'v1.60.1'
ext.gutenbergMobileVersion = 'v1.61.0-alpha1'

repositories {
maven {
Expand Down Expand Up @@ -133,7 +133,7 @@ ext {
androidxWorkVersion = "2.4.0"

daggerVersion = '2.29.1'
fluxCVersion = '1.24.0'
fluxCVersion = 'develop-a471f6245ea15181c3463a1892a3a586ac546c83'

appCompatVersion = '1.0.2'
coreVersion = '1.3.2'
Expand Down