Repository navigation
build: update GutenbergKit to v0.20.0-alpha.1 - #26267
Merged
Merged
Conversation
Collaborator
Generated by 🚫 Danger |
dcalhoun
force-pushed
the
build/update-gutenberg-kit
branch
from
October 28, 2026 17:35
aa066c5 to
df52238
Compare
Pins the pr-build/839 snapshot, which has trunk's Swift sources and a prebuilt web bundle that trunk revisions lack, until a GutenbergKit prerelease is published.
GutenbergKit now requires delegates to implement editorDidBecomeUnavailable(_:), with no default, so a subclass override is never silently skipped.
GutenbergKit added strings for its editor crash notice and block inserter media errors, which otherwise appear in English.
After a crash, GutenbergKit refuses calls into the editor until it reloads, so undo, redo, the editor mode toggle, and custom post saving would silently do nothing.
GutenbergKit restarts a reloaded editor from the host's latest content, or from the content it opened with when there is none, which would discard drafts saved earlier in the session.
Closing read the content from the editor and gave up when it couldn't, so an editor that was still loading, failed to load, or crashed couldn't be closed.
…saving GutenbergKit now reports when saving is locked, e.g. during its media uploads, whose temporary URLs would otherwise be saved. Saves show the existing media-uploading alert, and closing keeps the changes in the local revision.
Custom posts save straight to the server, so saving during GutenbergKit's media uploads would persist their temporary URLs.
Separates the formatter's changes from the strings added next.
GutenbergKit's uploads run in the editor's web view and stop when it closes, so closing mid-upload loses the media. Unlike the app's own uploads, they can't finish in the background.
Replaces the temporary pr-build snapshot pin with the published prerelease.
Leaving kept the local revision without asking, so a later Update could publish abandoned edits. Refreshing first also covers an upload that finished while the alert was shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8
A plugin can hold a save lock for the whole session, e.g. Jetpack's Donations block when its Stripe fetch fails, which blocked updating published posts and custom posts. Asking keeps the user in control. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8
… saving Closing ends the editor's uploads, and replacing a block's media doesn't change the saved markup, so the close flow dismissed without a prompt. Posts and pages already ask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8
The Page editor showed "Your post isn't ready yet", unlike its other page-specific strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8
The titles already said page, but the messages still said post. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8
dcalhoun
force-pushed
the
build/update-gutenberg-kit
branch
from
October 29, 2026 18:36
de12e0b to
8bcbb4e
Compare
dcalhoun
marked this pull request as ready for review
October 29, 2026 18:47
crazytonyli
approved these changes
Oct 30, 2026
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.
Description
Close CMM-2554.
Updates GutenbergKit to 0.20.0-alpha.1 and adopts its breaking and new host APIs:
Media upload server setup is handled separately.
Known gaps (deferred):
blob:URL. Trunk saved these without asking.blob:URL, which a later save sends without asking. The fix likely belongs in GutenbergKit, which knows when a block's media is temporary.isPostSavingLocked(), returns a boolean, so GutenbergKit can't report why saving is locked. A plugin's lock (e.g. a Jetpack Donations block whose Stripe fetch failed) gets the same "like a media upload" confirmation.Testing instructions
Use the Jetpack app on a site with the block editor enabled. The editor's web view is inspectable in debug builds.
Steps that run JavaScript use Safari's Develop menu: choose the device or simulator, then the editor page, and run the snippet in the console.
To crash the editor:
Autofocus:
Editor crash and reload:
Save lock during media uploads:
To test without a real upload, run
wp.data.dispatch( 'core/editor' ).lockPostSaving( 'test' )before step 2, andunlockPostSaving( 'test' )before step 4.Closing during an upload:
Custom post types
lockPostSavingas above.AI-generated details
Integrates GutenbergKit v0.20.0-alpha.1 (previously
0.19.0). Setting up GutenbergKit's media upload server is out of scope and handled separately.Host changes
editorDidBecomeUnavailable(_:)(fix!: reset host readiness when the editor crashes GutenbergKit#638, feat: surface editor crashes natively and offer a reload GutenbergKit#642). Undo, redo and the editor mode toggle are disabled until the editor reloads, and custom posts can't be saved meanwhile.isUploadingMediaguards no longer apply to GBK, so Aztec and Gutenberg Mobile are unchanged. Closing asks too, because the editor's uploads stop when it closes. Leaving refreshes the content and runs the normal close flow, so published posts still offer only Discard Changes, as on trunk and in Gutenberg Mobile.donations/edit.jsx:147-149).Why the
blob:gaps are deferredWhile uploading, Image, Video, Audio and File blocks keep their
blob:URL in an attribute that isn't saved. Cover and Media & Text blocks do save it. Gutenberg Mobile avoids this because the host uploads media natively andPostCoordinatorwaits for uploads before syncing. GutenbergKit uploads in the web view, so the host can't wait for them.Two host-side fixes were considered and rejected:
blob:URL relies on matching URLs in the content, which is brittle.After a reload, the Cover block shows a spinner forever for a
blob:URL without a media ID. GutenbergKit could flag those blocks instead.Verified
PostGBKEditorViewControllerTests,CustomPostEditorServiceTestsandCustomPostSettingsViewModelTestssuites (33 tests) under theWordPressscheme. TheJetpackscheme has no test plan.lockPostSaving:🤖 Generated with Claude Code
https://claude.ai/code/session_017NCdQuHPbc49BP1ZshDSE8