diff --git a/Modules/Package.swift b/Modules/Package.swift index 784600c6d15e..44b198b83e04 100644 --- a/Modules/Package.swift +++ b/Modules/Package.swift @@ -48,7 +48,7 @@ let package = Package( .package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"), // We can't use wordpress-rs branches nor commits here. Only tags work. .package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20241116"), - .package(url: "https://github.com/wordpress-mobile/GutenbergKit", revision: "v0.0.3"), + .package(url: "https://github.com/wordpress-mobile/GutenbergKit", revision: "4476d597b271778d001a26c50d74e527b54ebfef"), .package(url: "https://github.com/Automattic/color-studio", branch: "trunk"), ], targets: XcodeSupport.targets + [ diff --git a/WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved b/WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved index 4888e01b33f6..9fee9ed67fe6 100644 --- a/WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "e67326cf4e0b967f85976c160b6e3742a401276eabf3e18b25fce8bb219e1350", + "originHash" : "8a87409582dec4bc7c7f6ee5d6a6761cead545bd116f82237fc9e6a881e7c3fb", "pins" : [ { "identity" : "alamofire", @@ -150,8 +150,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/wordpress-mobile/GutenbergKit", "state" : { - "branch" : "v0.0.3", - "revision" : "84edec43cc8639d5d8a66a07758902e33f0d2d94" + "revision" : "4476d597b271778d001a26c50d74e527b54ebfef" } }, { diff --git a/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift b/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift index e55b31d38e84..94cd4a8f72c0 100644 --- a/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift @@ -127,7 +127,7 @@ class NewGutenbergViewController: UIViewController, PostEditor, PublishingEditor self.post = post self.replaceEditor = replaceEditor - self.editorSession = PostEditorAnalyticsSession(editor: .gutenberg, post: post) + self.editorSession = PostEditorAnalyticsSession(editor: .gutenbergKit, post: post) self.navigationBarManager = navigationBarManager ?? PostEditorNavigationBarManager() let networkClient = NewGutenbergNetworkClient(blog: post.blog) @@ -315,6 +315,16 @@ class NewGutenbergViewController: UIViewController, PostEditor, PublishingEditor } extension NewGutenbergViewController: GutenbergKit.EditorViewControllerDelegate { + func editorDidLoad(_ viewContoller: GutenbergKit.EditorViewController) { + if !editorSession.started { + // Note that this method is also used to track startup performance + // 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 + editorSession.start() + } + } + func editor(_ viewContoller: GutenbergKit.EditorViewController, didDisplayInitialContent content: String) { // Do nothing } diff --git a/WordPress/Classes/ViewRelated/Post/PostEditorAnalyticsSession.swift b/WordPress/Classes/ViewRelated/Post/PostEditorAnalyticsSession.swift index b131fc17831d..2166db473ee8 100644 --- a/WordPress/Classes/ViewRelated/Post/PostEditorAnalyticsSession.swift +++ b/WordPress/Classes/ViewRelated/Post/PostEditorAnalyticsSession.swift @@ -97,6 +97,7 @@ private extension PostEditorAnalyticsSession { extension PostEditorAnalyticsSession { enum Editor: String { case gutenberg + case gutenbergKit = "gutenberg_kit" case classic case html }