From 61e15045ef92724c8827483e3a8f548f80906f51 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Sat, 21 Jun 2025 21:12:01 +0200 Subject: [PATCH] feat: Add `WebView` feature --- .../content/unoapp/.template.config/TemplateWizard.json | 8 +++++++- .../content/unoapp/.template.config/dotnetcli.host.json | 4 ++++ .../content/unoapp/.template.config/template.json | 7 +++++++ .../unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj | 3 +++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json b/src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json index ac5f08d77..6da877afb 100644 --- a/src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json +++ b/src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json @@ -90,6 +90,7 @@ "localization": "false", "logging": "none", "markup": "xaml", + "webview": "false", "mediaElement": "false", "navigation": "blank", "platforms": "android|ios|wasm|desktop", @@ -132,6 +133,7 @@ "localization": "true", "logging": "default", "markup": "xaml", + "webview": "false", "mediaElement": "false", "navigation": "regions", "platforms": "android|ios|wasm|desktop", @@ -231,7 +233,7 @@ // and we recently removed .NET 8 option from the template (see PR #1373). // This feature will be re-enabled once multi-threading becomes available again. //"SymbolIds": [ "toolkit", "mauiEmbedding", "server", "wasmMultiThreading", "wasmPwaManifest", "vscode", "enableDeveloperMode", "mediaElement" ] - "SymbolIds": [ "toolkit", "mauiEmbedding", "server", "wasmPwaManifest", "vscode", "enableDeveloperMode", "mediaElement" ] + "SymbolIds": [ "toolkit", "mauiEmbedding", "server", "wasmPwaManifest", "vscode", "enableDeveloperMode", "webview", "mediaElement" ] } , { @@ -681,6 +683,9 @@ "vscode": { "Icon": "/Assets/Features.VSCode.svg" }, + "webview": { + "Icon": "/Assets/Features.WebView.svg" + }, "mediaElement": { "Icon": "/Assets/Features.MediaElement.svg" }, @@ -777,6 +782,7 @@ "themeService", "continuousIntegration", "isCustomized", + "webview", "mediaElement", "renderer" ], diff --git a/src/Uno.Templates/content/unoapp/.template.config/dotnetcli.host.json b/src/Uno.Templates/content/unoapp/.template.config/dotnetcli.host.json index fdfd02825..fa7c3d02d 100644 --- a/src/Uno.Templates/content/unoapp/.template.config/dotnetcli.host.json +++ b/src/Uno.Templates/content/unoapp/.template.config/dotnetcli.host.json @@ -97,6 +97,10 @@ "longName": "maui-embedding", "shortName": "maui" }, + "webview": { + "longName": "webview", + "shortName": "webview" + }, "mediaElement": { "longName": "media-element", "shortName": "media" diff --git a/src/Uno.Templates/content/unoapp/.template.config/template.json b/src/Uno.Templates/content/unoapp/.template.config/template.json index e73f5b1e9..11f902995 100644 --- a/src/Uno.Templates/content/unoapp/.template.config/template.json +++ b/src/Uno.Templates/content/unoapp/.template.config/template.json @@ -777,6 +777,13 @@ // "datatype": "bool", // "defaultValue": "false" // }, + "webview": { + "displayName": "WebView", + "description": "Configures application to bundle native assets required for the WebView2 control.", + "type": "parameter", + "datatype": "bool", + "defaultValue": "false" + }, "mediaElement": { "displayName": "Media Element", "description": "Configures application to bundle native assets required for the MediaElement", diff --git a/src/Uno.Templates/content/unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj b/src/Uno.Templates/content/unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj index de2d2f0aa..19451ea9a 100644 --- a/src/Uno.Templates/content/unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj +++ b/src/Uno.Templates/content/unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj @@ -49,6 +49,9 @@ Lottie; + + WebView; + MediaElement;