-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Handle remote editor load failure #27
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
Conversation
Empower the user to continue editing with the default, local editor capable of editing core blocks and notify them of the load failure.
Empower users to resolve issues themselves.
Increase the utility of the message.
Simplify hook usage.
6e827cb to
cfc1273
Compare
|
👋🏻 @kean. When you have time, I would appreciate your review and testing of this pull request and its sibling, wordpress-mobile/WordPress-iOS#23624. I recommend using the Coblocks plugin as a test for third-party block support, as it appears the Jetpack plugin may have changed and broken support for it. Thanks! |
|
@kean thank you for taking time to review this. I apologize for not providing additional context sooner that might've better set the expectations for this PR. These changes slightly improve the "remote" editor experience to avoid a blank white page if the editor fails to load. The remote editor is very much a prototype with a lot of rough edges—performance, stability, usability, etc. The remote editor is less of a priority while I figure out how we support it from the API (pbArwn-6Fz-p2), but I wanted to avoid letting these proposed changes become stale in the meantime. I hoped to merge this work in the name of iterative progress. I agree with your comments, there is a lot of room for improvement. Let me know what you think about merging this rudimentary error handling as-is for the time being. Thanks! 🙇🏻
I'm uncertain if by "they" you mean the post content or the site. Regardless, yes, this prototype remote editor loads all the editor assets regardless if custom blocks are present.
Yes, the request for the remote editor must resolve before one can interact with the editor. I agree there is room to improve the performance, my initial thoughts go to strategic caching. There could be a fundamentally different loading approach that might avoid blocking editor interactivity, but it may prove very complicated to achieve near instant interactivity while also avoiding/resolving version conflicts with editor/block assets fetched from a remote site.
Understandable. The former is a core editor message regarding an unsupported block, the latter is the error handling proposed in these changes. I'll spend time pondering how we might avoid such a state, but my initial thoughts are that it is unavoidable due to the nature of the problem at hand—the remote editor, and thus the support for the custom block, failed to load. Hence, the two notices. I suppose we could display an editor load failure message that requires acknowledgement to progress to the fallback editor with unsupported custom blocks.
Yes, a very blatant omission for this prototype. I agree we need to communicate the activity to the user.
Interesting, thank you for sharing. For reasons unknown to me at this time, it appears the Google Maps URL found run the DOM block markup includes Full block validation error
|
I was also thinking something along these lines, yes. It doesn't help that the root cause of the first error (site does not include support for block) is explained in the second error message. |
Agreed. For better or worse, the second error message is provided by core and more universal. We could simply rely solely on the second error message, but I questioned if it provides enough pointed information in this context (editor load failed) to be helpful (allow the user to attempt recovery themselves). |
|
@kean thank you for the approval. Are you comfortable approving the sibling integration PR? wordpress-mobile/WordPress-iOS#23624 |


Description
Gracefully handle failed attempts to load a site's remote editor by falling back
to the local, default editor and displaying a notice to the user. The notice
includes both "retry" and "dismiss" actions to empower the user. In the future,
we could further expand error handling to better surface was exactly occurred --
e.g., no network connection, problematic plugin.
Related:
Screen recording
ScreenRecording_09-24-2024.13-03-56_1.MP4
Testing Instructions
Tip
Use the WordPress-iOS prototype build for testing.
Important
You must test the following flows with a self-hosted site that is connected via an application password and has the
block-editor-assets-endpointplugin activated.Important
It appears a change to the Jetpack plugin may have broken support for Jetpack blocks. Testing third-party block support with Coblocks is known to work at this time.
1 - Fallback to local editor
2 - Dismiss the notice
3 - Auto-dismiss the notice
4 - Retry loading the remote editor