Skip to content

Upgrade GutenbergKit from v0.11.1 to v0.15.0#22764

Open
jkmassel wants to merge 1 commit intotrunkfrom
jkmassel/gutenbergkit-settings-refactor
Open

Upgrade GutenbergKit from v0.11.1 to v0.15.0#22764
jkmassel wants to merge 1 commit intotrunkfrom
jkmassel/gutenbergkit-settings-refactor

Conversation

@jkmassel
Copy link
Copy Markdown
Contributor

@jkmassel jkmassel commented Apr 3, 2026

Summary

Minimal upgrade of GutenbergKit from v0.11.1 to v0.15.0, adapting to breaking API changes without additional refactoring.

Breaking changes addressed:

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

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

The existing GutenbergKitSettingsBuilder with its config data classes is unchanged — refactoring that is a separate effort.

Test plan

  • Verify the GutenbergKit block editor opens correctly for new posts and existing posts
  • Verify editor loads for both WP.com and self-hosted sites with application passwords
  • Verify media insertion, undo/redo, and HTML mode toggle still work
  • Run ./gradlew :WordPress:testJetpackDebugUnitTest --tests "*GutenbergKit*" — all tests pass

@jkmassel jkmassel requested a review from a team as a code owner April 3, 2026 20:38
@jkmassel jkmassel requested review from adalpari and removed request for a team April 3, 2026 20:38
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented Apr 3, 2026

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Copy Markdown
Contributor

Project dependencies changes

list
+ New Dependencies
org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.7.3

! Upgraded Dependencies
org.wordpress.gutenbergkit:android:v0.15.0, (changed from v0.11.1)
tree
++--- androidx.navigation:navigation-compose:2.9.7
+|    \--- androidx.navigation:navigation-compose-android:2.9.7
+|         \--- androidx.activity:activity:1.8.0 -> 1.10.1
+|              \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 -> 2.10.0
+|                   \--- androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.10.0
+|                        \--- androidx.savedstate:savedstate:1.4.0
+|                             \--- androidx.savedstate:savedstate-android:1.4.0
+|                                  \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3
+|                                       \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3
+|                                            \--- org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3
+|                                                 +--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.7.3 (c)
+|                                                 \--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3 (c)
 +--- project :libs:editor
-|    \--- org.wordpress.gutenbergkit:android:v0.11.1
-|         +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.0.21 -> 2.3.20 (*)
-|         +--- androidx.core:core-ktx:1.13.1 -> 1.16.0 (*)
-|         +--- androidx.appcompat:appcompat:1.7.0 -> 1.7.1 (*)
-|         +--- com.google.android.material:material:1.12.0 (*)
-|         +--- androidx.webkit:webkit:1.11.0 -> 1.15.0 (*)
-|         +--- com.google.code.gson:gson:2.8.9 -> 2.13.2
-|         |    \--- com.google.errorprone:error_prone_annotations:2.41.0
-|         +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2 (*)
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 -> 2.3.20 (*)
+|    \--- org.wordpress.gutenbergkit:android:v0.15.0
+|         +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.1.21 -> 2.3.20 (*)
+|         +--- androidx.core:core-ktx:1.13.1 -> 1.16.0 (*)
+|         +--- androidx.appcompat:appcompat:1.7.0 -> 1.7.1 (*)
+|         +--- com.google.android.material:material:1.12.0 (*)
+|         +--- androidx.webkit:webkit:1.11.0 -> 1.15.0 (*)
+|         +--- com.google.code.gson:gson:2.8.9 -> 2.13.2
+|         |    \--- com.google.errorprone:error_prone_annotations:2.41.0
+|         +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2 (*)
+|         +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3
+|         |    \--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.7.3
+|         |         +--- org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3 (*)
+|         |         +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.20 -> 2.3.20 (*)
+|         |         \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3 (*)
+|         +--- org.jsoup:jsoup:1.18.1 -> 1.22.1
+|         +--- com.squareup.okhttp3:okhttp:4.12.0 -> 5.3.2 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.3.20 (*)
-\--- org.wordpress.gutenbergkit:android:v0.11.1 (*)
+\--- org.wordpress.gutenbergkit:android:v0.15.0 (*)

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Apr 3, 2026

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
Versionpr22764-6cfa2a2
Build Number1488
Application IDcom.jetpack.android.prealpha
Commit6cfa2a2
Installation URL3t6e3lpao2t2o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Apr 3, 2026

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
Versionpr22764-6cfa2a2
Build Number1488
Application IDorg.wordpress.android.prealpha
Commit6cfa2a2
Installation URL7hdo8ir5fbujo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@jkmassel jkmassel force-pushed the jkmassel/gutenbergkit-settings-refactor branch from d538543 to 865899d Compare April 3, 2026 21:25
@jkmassel jkmassel changed the title Refactor GutenbergKitSettingsBuilder and upgrade GutenbergKit to v0.15.0 Upgrade GutenbergKit from v0.11.1 to v0.15.0 Apr 3, 2026
@jkmassel jkmassel force-pushed the jkmassel/gutenbergkit-settings-refactor branch 3 times, most recently from e051e55 to f861ada Compare April 4, 2026 03:12
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.
@jkmassel jkmassel force-pushed the jkmassel/gutenbergkit-settings-refactor branch from f861ada to 6cfa2a2 Compare April 4, 2026 03:47
@jkmassel jkmassel added Gutenberg Editing and display of Gutenberg blocks. Posting/Editing [Type] Task labels Apr 4, 2026
@jkmassel jkmassel added this to the 26.8 milestone Apr 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 0% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.40%. Comparing base (8c0b6d4) to head (6cfa2a2).

Files with missing lines Patch % Lines
...ess/android/ui/posts/EditorConfigurationBuilder.kt 0.00% 35 Missing ⚠️
...press/android/ui/posts/GutenbergKitWarmupHelper.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #22764   +/-   ##
=======================================
  Coverage   37.40%   37.40%           
=======================================
  Files        2320     2320           
  Lines      123674   123654   -20     
  Branches    16791    16793    +2     
=======================================
  Hits        46256    46256           
+ Misses      73707    73687   -20     
  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.

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. Posting/Editing [Type] Task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants