Repository navigation
Fix plugin section links and dark mode - #26330
Merged
Merged
Conversation
jkmassel
added a commit
that referenced
this pull request
Nov 2, 2026
1 task done
Base automatically changed from
bugfix/cmm-2524-plugin-description-youtube-embeds
to
trunk
November 2, 2026 21:11
Embeds such as the YouTube player open links with window.open, which WebKit ignores without a UI delegate. The section text was black on a dark background because the page didn't opt in to dark mode. Also correct the referrer comment: WebKit sends the origin, not the plugin's page.
jkmassel
force-pushed
the
jkmassel/plugin-section-webview-fixes
branch
from
November 2, 2026 23:59
ab757a8 to
e7e0ceb
Compare
crazytonyli
approved these changes
Nov 3, 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
Follow-up to #26327, from reviewing it.
Fixes two bugs in the plugin section web view and corrects one comment:
window.open. This doesn't go through the navigation policy, and WebKit ignores it unless the web view has auiDelegate. The Coordinator now implementscreateWebViewWithand opens the URL in the browser. The other links in the embed that usewindow.openget the same fix.color-scheme: light darkfixes it for every section.baseURLcomment said WebKit sends the plugin's page as the referrer. It sends only the origin (https://wordpress.org/). Confirmed by loading httpbin in an iframe.What we left alone
#links. With the base URL from Fix YouTube embeds in plugin descriptions #26327, these now open in the browser. This is correct: real links like#faq-headerand#screenshotspoint at sections of the WordPress.org page, not at anything in the app's HTML. On trunk they did nothing.http://images and iframes. The HTTPS base URL blocks them as mixed content. None of the 2,500 plugins we scanned use them.wordpress.orgorigin. We trust the WordPress.org filtering, and the app's cookie store had nowordpress.orgcookies in our testing.What I ran
WordPressTest/PluginInfoSectionContentTests:Test run with 3 tests in 1 suite passedWithout the CSS change,
usesTheTextColorOfTheInterfaceStylefails withdark → "rgb(0, 0, 0)".The
uiDelegatechange has no unit test, because the Coordinator is private and the failure only shows up with a realwindow.openfrom the YouTube embed. It was checked in the app, below.Testing instructions
Checked in Jetpack on an iPhone 18 Pro simulator (iOS 27.0), signed in to a local self-hosted site, with Page Generator installed:
Not checked: Vimeo embeds, and iPad.