Support editing custom posts#25208
Support editing custom posts#25208crazytonyli wants to merge 4 commits intoprototype-custom-post-typesfrom
Conversation
Generated by 🚫 Danger |
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
dcalhoun
left a comment
There was a problem hiding this comment.
I perceive the draft status and current code to mean this is not ready for formal review. Regardless, I left a few thoughts for consideration from an initial review and testing.
Overall, things seem to operate relatively well. I noted one preexisting bug: CMM-1214
To elaborate on my original request for an integration PR, I primarily wanted to ensure an integration would merge relatively quickly after we merge the GutenbergKit (GBK) PR to avoid breaking changes in the GBK library blocking other GBK work. Sorry if I did not communicate that clearly enough previously. Thank you for beginning this work nonetheless.
| .package(url: "https://github.com/wordpress-mobile/NSURL-IDN", revision: "b34794c9a3f32312e1593d4a3d120572afa0d010"), | ||
| .package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"), | ||
| .package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.13.1"), | ||
| .package(url: "https://github.com/wordpress-mobile/GutenbergKit", revision: "7a48d8756f33e3d25daa1fff5843d5cd6fdda887"), |
There was a problem hiding this comment.
When we are ready, we can integrate a GBK prerelease. We'll publish the prerelease via make release VERSION_TYPE=preminor DRY_RUN=true on GBK's trunk branch.
| let configuration = EditorConfigurationBuilder( | ||
| content: initialContent ?? "", | ||
| postType: "comment", | ||
| postType: .init(postType: "comment", restBase: "comments"), // FIXME: "comment" is not a post type. |
There was a problem hiding this comment.
If we feel compelled to "fix" the post type, we might also consider fixing the site URL and API root. GBK currently requires all of these, but effectively discards them when "offline mode" is enabled.
For context, this comment editor is currently unused.
| // otherwise pass nil and GutenbergKit will fetch them (shows progress bar) | ||
| let cachedDependencies = EditorDependencyManager.shared.dependencies(for: blog) | ||
| var cachedDependencies: EditorDependencies? = nil | ||
| if postType == .post || postType == .page { |
There was a problem hiding this comment.
Attempting to understand this. My perception is that we do not preload specifically for Pages at this time. If true, why might it be OK to apply the cache for Pages, but not other custom post types?
There was a problem hiding this comment.
why might it be OK to apply the cache for Pages, but not other custom post types?
That's true. I'll remove the if check.
Absolutely. I will not merge the GBK PR until this PR is ready. |
|



Description
Testing instructions