Skip to content

Commit

Permalink
Remove Gallery Block V1, List, and Quote V2 experimental flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo committed Jul 9, 2024
1 parent 80956df commit cc649ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2531,17 +2531,6 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
)
}

/**
* Checks if the theme supports the new gallery block with image blocks.
* Note that if the editor theme has not been initialized (usually on the first app run)
* the value returned is null and the `unstable_gallery_with_image_blocks` analytics property will not be reported.
* @return true if the the supports the new gallery block with image blocks or null if the theme is not initialized.
*/
private fun themeSupportsGalleryWithImageBlocks(): Boolean? {
val editorTheme = editorThemeStore.getEditorThemeForSite(siteModel) ?: return null
return editorTheme.themeSupport.galleryWithImageBlocks
}

private var mediaCapturePath: String? = ""
private fun getUploadErrorHtml(mediaId: String, path: String): String {
return String.format(
Expand Down Expand Up @@ -3508,7 +3497,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
if (showAztecEditor && editorFragment is AztecEditorFragment) {
val entryPoint =
intent.getSerializableExtra(EditPostActivityConstants.EXTRA_ENTRY_POINT) as PostUtils.EntryPoint?
postEditorAnalyticsSession?.start(null, themeSupportsGalleryWithImageBlocks(), entryPoint)
postEditorAnalyticsSession?.start(null, entryPoint)
}
}

Expand All @@ -3523,7 +3512,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
// 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
postEditorAnalyticsSession?.start(unsupportedBlocksList, themeSupportsGalleryWithImageBlocks(), entryPoint)
postEditorAnalyticsSession?.start(unsupportedBlocksList, entryPoint)
presentNewPageNoticeIfNeeded()

// Start VM, load prompt and populate Editor with content after edit IS ready.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class PostEditorAnalyticsSession implements Serializable {
private static final String KEY_EDITOR = "editor";
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_GALLERY_WITH_IMAGE_BLOCKS = "unstable_gallery_with_image_blocks";
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 @@ -115,16 +114,12 @@ public static PostEditorAnalyticsSession getNewPostEditorAnalyticsSession(
}

public void start(ArrayList<Object> unsupportedBlocksList,
Boolean galleryWithImageBlocks,
final EntryPoint entryPoint) {
if (!mStarted) {
mHasUnsupportedBlocks = unsupportedBlocksList != null && unsupportedBlocksList.size() > 0;
Map<String, Object> properties = getCommonProperties();
properties.put(KEY_UNSUPPORTED_BLOCKS,
unsupportedBlocksList != null ? unsupportedBlocksList : new ArrayList<>());
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

0 comments on commit cc649ab

Please sign in to comment.