Create a new router for presenting new post editor - #25838
Open
crazytonyli wants to merge 11 commits into
Open
Conversation
Collaborator
Generated by 🚫 Danger |
crazytonyli
commented
Jul 24, 2026
| rootViewPresenter.showPostEditor(animated: false) | ||
| rootViewPresenter.showNewPostEditor( | ||
| context: NewPostEditorContext( | ||
| analytics: .editorCreatedPost(source: "create_button", postType: "post"), |
Contributor
Author
There was a problem hiding this comment.
I kept the original analytic events, but open to update them if needed.
crazytonyli
marked this pull request as ready for review
July 24, 2026 06:00
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33448 | |
| Version | PR #25838 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 4e8a716 | |
| Installation URL | 6ods1nqj3p46g |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33448 | |
| Version | PR #25838 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 4e8a716 | |
| Installation URL | 766dnar2o07i0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
I recommend reviewing this PR commit by commit.
Description
Follow-up of #25830
This PR centralizes new post and page creation in
PostEditorRouter, which chooses the right editor, the Core REST editor (for editing wprs backed post) or the legacy editor (for editing AbstractPost), based on the site.NewPostEditorContextcarries prefilled content, tags, media, blogging prompts, page layouts, analytics attribution, and dismissal behavior across both editor paths. Existing-object editing remains on the legacy path.Testing instructions