Skip to content

build: Integrate GutenbergKit PostTypeDetails API changes#22784

Merged
dcalhoun merged 2 commits intojkmassel/gutenbergkit-settings-refactorfrom
build/integrate-gutenberg-kit-post-type-details
Apr 9, 2026
Merged

build: Integrate GutenbergKit PostTypeDetails API changes#22784
dcalhoun merged 2 commits intojkmassel/gutenbergkit-settings-refactorfrom
build/integrate-gutenberg-kit-post-type-details

Conversation

@dcalhoun
Copy link
Copy Markdown
Member

@dcalhoun dcalhoun commented Apr 9, 2026

Summary

Note

This builds atop of and targets #22764.

  • Bumps GutenbergKit to v0.15.2
  • Migrates postType from String to PostTypeDetails across GutenbergKitSettingsBuilder, EditorConfigurationBuilder, and tests

Test plan

  • Verify the project compiles successfully
  • Open a post and a page in the block editor and confirm editing works
  • Verifying inserting an @mention correctly appends the selected name without clearing existing block content

Update GutenbergKit to version 446-e44fddffa326f38a3551a5bde9529b060e667a2c
and migrate from String-based postType to PostTypeDetails, which
encapsulates REST API namespace and base path for different post types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Apr 9, 2026

Project dependencies changes

list
! Upgraded Dependencies
org.wordpress.gutenbergkit:android:v0.15.2, (changed from v0.15.1)
tree
 +--- project :libs:editor
-|    \--- org.wordpress.gutenbergkit:android:v0.15.1
+|    \--- org.wordpress.gutenbergkit:android:v0.15.2
-\--- org.wordpress.gutenbergkit:android:v0.15.1 (*)
+\--- org.wordpress.gutenbergkit:android:v0.15.2 (*)

Comment thread gradle/libs.versions.toml Outdated
@dcalhoun dcalhoun marked this pull request as ready for review April 9, 2026 17:51
@dcalhoun dcalhoun requested a review from a team as a code owner April 9, 2026 17:51
@dcalhoun dcalhoun requested review from adalpari and jkmassel and removed request for a team and adalpari April 9, 2026 17:51
@dcalhoun dcalhoun added [Type] Bug Gutenberg Editing and display of Gutenberg blocks. labels Apr 9, 2026
@wpmobilebot
Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr22784-3a055ab
Build Number1488
Application IDorg.wordpress.android.prealpha
Commit3a055ab
Installation URL29bjnc8cq0a6g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@dcalhoun dcalhoun merged commit 3713c83 into jkmassel/gutenbergkit-settings-refactor Apr 9, 2026
24 of 27 checks passed
@dcalhoun dcalhoun deleted the build/integrate-gutenberg-kit-post-type-details branch April 9, 2026 18:13
@wpmobilebot
Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr22784-3a055ab
Build Number1488
Application IDcom.jetpack.android.prealpha
Commit3a055ab
Installation URL5dm97jg8c2730
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.40%. Comparing base (9e043b6) to head (3a055ab).
⚠️ Report is 1 commits behind head on jkmassel/gutenbergkit-settings-refactor.

Files with missing lines Patch % Lines
...ess/android/ui/posts/EditorConfigurationBuilder.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           jkmassel/gutenbergkit-settings-refactor   #22784   +/-   ##
========================================================================
  Coverage                                    37.40%   37.40%           
========================================================================
  Files                                         2320     2320           
  Lines                                       123658   123661    +3     
  Branches                                     16795    16795           
========================================================================
+ Hits                                         46258    46260    +2     
- Misses                                       73689    73690    +1     
  Partials                                      3711     3711           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jkmassel added a commit that referenced this pull request Apr 9, 2026
* Upgrade GutenbergKit from v0.11.1 to v0.15.0

Adapt to breaking API changes in GutenbergKit v0.15.0:

- GutenbergView.createForEditor() removed: use GutenbergView
  constructor with configuration, dependencies, coroutineScope,
  and context parameters
- gutenbergView.start(config) removed: EditorConfiguration must
  be provided at construction time
- EditorConfiguration moved from org.wordpress.gutenberg to
  org.wordpress.gutenberg.model
- EditorConfiguration.Builder() replaced with
  EditorConfiguration.builder(siteURL, siteApiRoot, postType)
- setPostId(Int?) changed to setPostId(UInt?)
- GutenbergView.warmup() removed: warmup helper is now a no-op

The fragment's two-phase flow (create view now, start with editor
settings later) is replaced by providing the full
EditorConfiguration at fragment/view construction time.

* feat: Implement LatestContentProvider for WebView recovery (#22774)

* feat: Send GutenbergKit the latest content when requested

Allow GutenbergKit to retrieve the latest content persisted in the host
app as needed. This is important for allowing GutenbergKit to display
the latest content after the WebView reloads or re-initializes from
memory pressure or backgrounding.

* feat: Set GutenbergKit post status

* build: Update GutenbergKit version

Integrate an unrelated content loss fix that is necessary for testing
this branch's focus on content preservation.

* build: Update GutenbergKit version to v0.15.1

* build: Integrate GutenbergKit PostTypeDetails API changes (#22784)

* build: Integrate GutenbergKit PostTypeDetails API changes

Update GutenbergKit to version 446-e44fddffa326f38a3551a5bde9529b060e667a2c
and migrate from String-based postType to PostTypeDetails, which
encapsulates REST API namespace and base path for different post types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* build: Update GutenbergKit to v0.15.2

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* build: Restore comments removed during GutenbergKit v0.15.0 upgrade

Re-add section-organizing and explanatory comments that were
accidentally dropped in the API migration. Only comments whose
described code still exists are restored.

* build: Restore KDoc on EditorConfigurationBuilder.build()

Re-add the method documentation that was removed during the
GutenbergKit v0.15.0 upgrade, minus the stale @param editorSettings
that no longer exists.

* fix: Delegate getContent() to getTitleAndContent() in GutenbergKit editor

getContent() was returning an empty string after the v0.15.0 upgrade.
Delegate to getTitleAndContent() and return the content portion so
callers get the actual editor content.

---------

Co-authored-by: David Calhoun <github@davidcalhoun.me>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Editing and display of Gutenberg blocks. [Type] Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants