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
2 changes: 1 addition & 1 deletion Modules/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 + [
Expand Down
5 changes: 2 additions & 3 deletions WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private extension PostEditorAnalyticsSession {
extension PostEditorAnalyticsSession {
enum Editor: String {
case gutenberg
case gutenbergKit = "gutenberg_kit"
case classic
case html
}
Expand Down