Skip to content

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jul 9, 2025

Description

Adopt the latest patterns for embracing immutable configuration introduced in wordpress-mobile/GutenbergKit#146.

Testing instructions

Smoke test editor functionality dependent upon configuration—theme styles, media uploads, remote editor (plugins), etc.

@dcalhoun dcalhoun added [Type] Task Gutenberg Editing and display of Gutenberg blocks. labels Jul 9, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Jul 9, 2025

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@dcalhoun dcalhoun force-pushed the refactor/use-gutenberg-kit-configuration-builder branch 2 times, most recently from 125229e to 518ebe3 Compare August 5, 2025 13:25
Copy link

sonarqubecloud bot commented Aug 5, 2025

@jkmassel jkmassel force-pushed the refactor/use-gutenberg-kit-configuration-builder branch 2 times, most recently from c69fd9d to 4a258ed Compare September 11, 2025 18:55
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 11, 2025

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number29037
VersionPR #24662
Bundle IDorg.wordpress.alpha
Commit629b028
Installation URL6bv21r72lunp8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 11, 2025

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number29037
VersionPR #24662
Bundle IDcom.jetpack.alpha
Commit629b028
Installation URL58ufb2tsqprq8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@jkmassel jkmassel force-pushed the refactor/use-gutenberg-kit-configuration-builder branch from 4a258ed to 49126f1 Compare September 11, 2025 19:07
@jkmassel jkmassel force-pushed the refactor/use-gutenberg-kit-configuration-builder branch from 49126f1 to cfc5d97 Compare September 11, 2025 19:33
@jkmassel jkmassel marked this pull request as ready for review September 11, 2025 19:34
Copy link
Member Author

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkmassel when testing the prototype build, I noted the theme styles were not loaded when I had the Experimental Block Editor Styles feature enabled. When I built this branch locally in Xcode 26 RC, I encountered a crash (image below) in the editor settings request logic. I imagine the crash/failed request explains the absence of theme styles (and rest of the editor settings).

Xcode crash Image

Do you encounter this? What might be occurring?

// We can't use wordpress-rs branches nor commits here. Only tags work.
.package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20250901"),
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.8.0"),
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", revision: "f3e64e4d7edc60a5c09b84e9421aa80516231414"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we merge this, we should merge the accompanying GBK PR, publish a GBK prerelease (e.g., v0.8.1-alpha.1), and integrate the version number here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears this now duplicates the extension found in the view controller. I believe we should consolidate these.

The extension in the view controller was relocated in 518ebe3 — an older commit now detached from this branch. At some point after that, a commit was forced pushed that reintroduced the extension in the view controller, likely during a conflict resolution.

However, the extension in the view controller appears more accurate and up-to-date, handling nuanced situations like preferring application passwords over OAuth tokens.

We should use the copy in the view controller. We can either leave it there and remove this file, or update this file and remove the copy in the view controller.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 60b848e – keeping the logic in a ViewController file can make it hard to find, so I've moved all the logic over to EditorConfiguration+Blog, and unified the calls to it.

@jkmassel jkmassel force-pushed the refactor/use-gutenberg-kit-configuration-builder branch from 0817212 to 45ba29d Compare September 17, 2025 16:30
@jkmassel
Copy link
Contributor

jkmassel commented Sep 17, 2025

The crash is addressed in 45ba29d – it mostly shouldn't happen in production, that's the Core Data thread sanitizer complaining that we're accessing a Core Data object on the wrong thread. I reworked the initialization of that service to resolve it.

The root cause is likely that I removed @MainActor from fetchSettingsFromAPI in cfc5d97. That annotation was keeping all access to self.blog on the main thread, at the cost of interrupting the main thread to dispatch the HTTP request (which isn't ideal).

I'd be a little bit surprised if this was the cause of the missing theme styles, but it's possible.

@jkmassel jkmassel assigned dcalhoun and unassigned dcalhoun Sep 17, 2025
Copy link

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] Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants