Add site settings for third-party blocks and theme style gating#22785
Draft
jkmassel wants to merge 4 commits intojkmassel/wpapiclient-wpcom-supportfrom
Draft
Add site settings for third-party blocks and theme style gating#22785jkmassel wants to merge 4 commits intojkmassel/wpapiclient-wpcom-supportfrom
jkmassel wants to merge 4 commits intojkmassel/wpapiclient-wpcom-supportfrom
Conversation
Add a new "Use Third-Party Blocks" toggle in Site Settings, gated behind GutenbergKit and editor assets support. Enhance the existing "Use Theme Styles" toggle with contextual warnings when the site lacks editor settings support or uses a non-block theme. Includes SiteSettingsProvider interface for injectable access to site settings from the local DB, replacing static SiteUtils calls for block editor default detection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
Gate the "Use Third-Party Blocks" toggle behind the remote gutenberg_kit_plugins feature flag in addition to the existing GutenbergKit and editor assets checks. Also simplify the summary string by removing "and styles" per reviewer feedback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion Add ThemeRepository to fetch the active theme via WP API and determine if it is a block theme. Add EditorSettingsRepository to discover editor settings and editor assets route support via manifest/API root queries. Wire SiteSettingsFragment to use EditorSettingsRepository for gating theme styles and third-party blocks toggles. Also adds manifest route fetching methods to WpApiClientProvider for discovering available REST routes on WP.com and self-hosted sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove fetchWpComManifestRoutes and fetchSiteManifestRoutes from
WpApiClientProvider. EditorSettingsRepository now uses the standard
WpApiClient.request { it.apiRoot().get() } for all site types,
which already handles WP.com vs self-hosted URL resolution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
|
Contributor
|
|
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.


Summary
Extracts the site settings changes from #22579 and layers them on top of #22765.
SiteSettingsModel,SiteSettingsInterface,WPComSiteSettings), and preference XMLSiteSettingsProviderinterface — injectable abstraction overSiteSettingsTablefor reading site settings and determining block editor default, replacing staticSiteUtilscalls (now@Deprecated)SITE_SUPPORTS_EDITOR_SETTINGS,SITE_SUPPORTS_EDITOR_ASSETS,SITE_THEME_IS_BLOCK_THEME) for caching editor capability discovery resultsTest plan