-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Gutenberg] Support POST requests #20428
Conversation
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
a432c7b
to
b0704da
Compare
b0704da
to
3499d14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the review I left on the Android PR, I'm approving this code based on the following:
- I went through the test plan outlined in [Gutenberg][TEST] Test POST requests #20430 and verified I could go through all of the steps successfully using the installable build.
- I reviewed the code in this PR, Add POST requests helper in
WordPressOrgRestApi
WordPressKit-iOS#589, and the iOS-specific code in [RNMobile] Support POST requests WordPress/gutenberg#49371. I verified the code follows the logic I'd expect, matching the same patterns as those previously defined for GET requests.
👏 👏 🚀
# Conflicts: # Podfile # Podfile.lock
Notice that the `Podfile` requirement has been updated instead of using `pod update` because the code now depends on a method introduced in version 7.1.0.
I just shipped WordPressKit 7.1.0 and updated the Enabling auto-merge as this PR has already been approved to get ahead with the work for the 22.2 code freeze. |
@fluiddot @SiobhyB sorry for the spam folks. For some reason, I convinced myself 22.2 was the next release, while it's actually 22.1. I did all the work to get this ready to merge into trunk from a dependencies point of view, but didn't account for changes in what the code would have to do after updating to the latest Gutenberg: The method Xcode suggests to insert is func gutenbergDidRequestFetch(path: String, completion: @escaping (Result<Any, NSError>) -> Void) But I'm not sure what to write into it. However, given this PR was intended for 22.2, I think it's fine for me to wait for your input on how to get this to compile and merge. Thanks! |
No worries, I set this PR for the next release because I wasn't sure that we could merge it on time for
Thanks @mokagio for working on the PR to have it ready 🙇 . This PR depends on the following Gutenberg changes:
We'd need first to merge those in order to solve the build failures. Once they are merged, we'll bump the Gutenberg Mobile reference and we could consider this PR ready to merge.
Yep, we can wait, especially as the Gutenberg PRs aren't approved yet. I hope to have them approved by this week to include them in |
🤦♂️ ... It was written in the description. Thanks! @fluiddot |
Yep, although I think I could have been more explicit in saying that this PR depends on those ones 😅 . |
# Conflicts: # Podfile.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # Podfile.lock
Related PRs:
WordPressOrgRestApi
WordPressKit-iOS#589Description
This PR adds support for POST requests coming from the editor.
To test
The editor doesn't make POST requests yet, hence this change can only be tested with a test PR: #20430
Alternatively, we can also follow testing instructions from Automattic/jetpack#29756 to test a POST request in the VideoPress block.
Regression Notes
Potential unintended areas of impact
This change shouldn't impact any unintended area. The only area that could be impacted is the network logic used in the editor.
What I did to test those areas of impact (or what existing automated tests I relied on)
I tested that GET requests coming from the editor work as expected.
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.