Skip to content

feat: Add Flag for native developer tools for WebView2 - #23154

Merged
morning4coffe-dev merged 5 commits into
masterfrom
dev/doti/enabledevtools-wv2-flag
May 9, 2026
Merged

morning4coffe-dev merged 5 commits into
masterfrom
dev/doti/enabledevtools-wv2-flag

Conversation

@morning4coffe-dev

Copy link
Copy Markdown
Member

GitHub Issue: closes https://github.com/unoplatform/uno-private/issues/1833

PR Type:

  • ✨ Feature

What is the current behavior? 🤔

What is the new behavior? 🚀

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Copilot AI review requested due to automatic review settings April 28, 2026 20:44
@github-actions github-actions Bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/automation Categorizes an issue or PR as relevant to project automation platform/wpf 🪟 Categorizes an issue or PR as relevant to WPF kind/documentation labels Apr 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new cross-platform feature flag to toggle platform-native developer tools for WebView2, and wires it through the various platform-specific native WebView implementations with accompanying docs/sample updates.

Changes:

  • Introduce Uno.UI.FeatureConfiguration.WebView2.EnableDevTools (default true in DEBUG, false in RELEASE) and obsolete IsInspectable as an alias.
  • Apply the flag to enable/disable dev tools across Android, iOS/UIKit, Skia Win32/WPF, X11 (Linux), and Skia macOS native WebView implementations.
  • Update documentation and add a new SamplesApp page demonstrating the flag.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Uno.UI/UI/Xaml/Controls/WebView/Native/iOSmacOS/UnoWKWebView.iOS.cs Uses the new EnableDevTools flag for WKWebView.Inspectable on Apple UIKit targets (iOS 16.4+).
src/Uno.UI/UI/Xaml/Controls/WebView/Native/Android/NativeWebViewWrapper.Android.cs Toggles Android WebView remote debugging via SetWebContentsDebuggingEnabled.
src/Uno.UI/FeatureConfiguration.cs Adds EnableDevTools and obsoletes IsInspectable as an alias.
src/Uno.UI.Runtime.Skia.Wpf/Extensions/WpfNativeWebView.cs Applies the flag to WebView2 AreDevToolsEnabled (WPF).
src/Uno.UI.Runtime.Skia.Win32/UI/Xaml/Controls/WebView/Win32NativeWebView.cs Replaces DEBUG-only enabling with the new flag (Win32 Skia).
src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOWebView.m Adds a native helper to set WKWebView.inspectable (macOS 13.3+).
src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOWebView.h Declares the new native helper function.
src/Uno.UI.Runtime.Skia.MacOS/UI/Xaml/Controls/WebView/MacOSNativeWebView.cs Calls the new native helper using the flag.
src/Uno.UI.Runtime.Skia.MacOS/Native/NativeUno.cs Adds P/Invoke for the new native helper.
src/SamplesApp/UITests.Shared/UITests.Shared.projitems Registers the new sample page files.
src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/WebView2Tests/WebView2_EnableDevTools.xaml(.cs) Adds a sample page demonstrating the flag.
src/AddIns/Uno.UI.WebView.Skia.X11/X11NativeWebView.cs Toggles WebKit developer extras using the flag (X11).
doc/articles/feature-flags.md Documents the new flag and points to WebView2 docs section.
doc/articles/controls/WebView.md Adds a dedicated “Enabling native developer tools” section and per-platform instructions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Uno.UI/FeatureConfiguration.cs Resolved
Comment thread src/Uno.UI/FeatureConfiguration.cs Resolved
@unoplatform unoplatform deleted a comment from unodevops May 9, 2026
@unoplatform unoplatform deleted a comment from unodevops May 9, 2026
Copilot AI review requested due to automatic review settings May 9, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Comment thread src/Uno.UI/FeatureConfiguration.cs Resolved
@unodevops

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings May 9, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 211776 found UI Test snapshots differences: skia-linux-screenshots: 52, skia-windows-screenshots: 67, wasm: 19

Details
  • skia-linux-screenshots: 52 changed over 2344

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DropDownButtonPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • Image_Stretch_None.png-dark
    • Image_Stretch_None.png
    • ClipboardTests.png-dark
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
  • skia-windows-screenshots: 67 changed over 2346

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Examples.png-dark
    • Examples.png
    • Buttons.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Image_Stretch_Alignment_Bigger.png-dark
    • Image_Stretch_Alignment_Bigger.png
    • DisplayInformation.png-dark
  • wasm: 19 changed over 1075

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUXControlsTestApp.NavigationViewTopNavPage
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewLarge
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Shared.Windows_UI_Xaml_Controls.ImageTests.Image_Stretch_Algmnt_Inf_Horizontal
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Windows_UI_Xaml_Shapes.Offscreen_Shapes
    • initial_state
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Windows_UI_Xaml.Performance.Performance_1000ButtonsContinuousRendering
    • UITests.Shared.Windows_UI_Input.GestureRecognizer.PointersEvents
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • Uno.UI.Samples.Samples.Shared.Content.UITests.ImageBrushInList
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • Uno.UI.Samples.Content.UITests.TextBoxControl.TextBox_DeleteButton
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • Uno.UI.Samples.UITests.ImageBrushTestControl.DoubleImageBrushInList

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 211776 has failed on Uno.UI - CI.

@morning4coffe-dev
morning4coffe-dev merged commit 59276b8 into master May 9, 2026
78 checks passed
@morning4coffe-dev
morning4coffe-dev deleted the dev/doti/enabledevtools-wv2-flag branch May 9, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/documentation platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform platform/wpf 🪟 Categorizes an issue or PR as relevant to WPF

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants