-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Migrating experimental navigation and widgets screen to bulk REST API #24907
Comments
Could we have Gutenberg polyfill the functionality added in Trac#50244 if it doesn't already exist? |
The plan is to polyfill as much of the functionality as possible, but it won't be able to support |
Blocked on #25096 |
The more I think about it the more I'm convinced that the widgets editor should address this in the same (or related) PR as the migration to #25958. |
This PR could affect batch processing: #26389 |
Just flagging a thought I had: If we implement previewing on this screen (and I think we should), we'll probably want to use a REST API for creating and publishing changesets instead of the batch processing API. |
Unassigning @adamziel as I know he's moved onto bigger and better things 😛 |
Re-sharing here for visibility.
|
@adamziel @TimothyBJacobs Can we close this ticket now that #34541 is merged? |
I believe so, I'd wait on Adam to confirm though. |
Thanks for staying on top of that! Yup, we're good here. There are a few follow-up items, but I believe we could track them separately. I'll create dedicated issues today. |
Thanks, @adamziel Maybe we should create separate tracking ticket for data-related issues. P.S. I think GitHub only expands ticket numbers when used with task list - |
Which ones specifically?
ah that's good to know, thank you! |
Both navigation and widget management screens are interacting with the API using suboptimal methods. One of them reuses the customizer endpoint, the other sends multiple requests every time the user hits the "Save" button. Fortunately, the support for bulk API requests is coming as discussed in https://core.trac.wordpress.org/ticket/50244.
One problem there is that there will be a period of time when both screens are going to be available via Gutenberg plugin, but the bulk API support is only going to be available in latest WordPress trunk. This means that some users attempting to test the feature won't be able to use the full power of bulk API (including pre-validation), and will potentially experience partial errors on save.
There are a few ways to address it, the consensus at the moment seems to be improve the validation and catch most errors client-side before issuing any request. For the experimental feature it doesn't sound too bad. Even with 100-200 requests required to save the navigation, we could catch most errors client-side during the validation. As long as the user don’t close their browser during the save, it should work fine 90%+ of the time. Slowly, true, but consistently for the most part. The transition period will not be too long either, and once WordPress 5.6 gets released everyone will have access to the bulk API.
Does that make sense? Does anyone think there's a better way?
CC @draganescu @TimothyBJacobs @noisysocks @talldan @mtias
The text was updated successfully, but these errors were encountered: