diff --git a/e2e/Uno/.vscode/launch.json b/.vscode/launch.json similarity index 75% rename from e2e/Uno/.vscode/launch.json rename to .vscode/launch.json index aad778608b..25171d3c83 100644 --- a/e2e/Uno/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,13 @@ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md "version": "0.2.0", "configurations": [ + { + "name": "Uno Platform Mobile", + "type": "Uno", + "request": "launch", + // any Uno* task will do, this is simply to satisfy vscode requirement when a launch.json is present + "preLaunchTask": "Uno: android | Debug | android-x64" + }, { // Use IntelliSense to find out which attributes exist for C# debugging // Use hover for the description of the existing attributes @@ -12,7 +19,7 @@ "type": "chrome", "request": "launch", "url": "http://localhost:5000", - "webRoot": "${workspaceFolder}/HelloWorld.Wasm", + "webRoot": "${workspaceFolder}/e2e/Uno/HelloWorld.Wasm", "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", "timeout": 30000, "server": { @@ -20,7 +27,7 @@ "program": "run", "outputCapture": "std", "timeout": 30000, - "cwd": "${workspaceFolder}/HelloWorld.Wasm" + "cwd": "${workspaceFolder}/e2e/Uno/HelloWorld.Wasm" } }, { @@ -32,12 +39,12 @@ "request": "launch", "preLaunchTask": "build-skia-gtk", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/HelloWorld.Skia.Gtk/bin/Debug/net7.0/HelloWorld.Skia.Gtk.dll", + "program": "${workspaceFolder}/e2e/Uno/HelloWorld.Skia.Gtk/bin/Debug/net7.0/HelloWorld.Skia.Gtk.dll", "args": [], "env": { "DOTNET_MODIFIABLE_ASSEMBLIES": "debug" }, - "cwd": "${workspaceFolder}/HelloWorld.Skia.Gtk", + "cwd": "${workspaceFolder}/e2e/Uno/HelloWorld.Skia.Gtk", // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console "console": "internalConsole", "stopAtEntry": false diff --git a/.vscode/settings.json b/.vscode/settings.json index 88550de96f..78672046a6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,15 @@ { + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.expand": false, + "explorer.fileNesting.patterns": { + "*.xaml": "$(capture).xaml.cs", + "*.ts": "${capture}.js", + "*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts", + "*.jsx": "${capture}.js", + "*.tsx": "${capture}.ts", + "tsconfig.json": "tsconfig.*.json", + "package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml" + }, "[azure-pipelines]": { "editor.insertSpaces": true, "editor.tabSize": 2, diff --git a/e2e/Uno/.vscode/tasks.json b/.vscode/tasks.json similarity index 100% rename from e2e/Uno/.vscode/tasks.json rename to .vscode/tasks.json diff --git a/e2e/Uno/.vscode/settings.json b/e2e/Uno/.vscode/settings.json deleted file mode 100644 index 23133fc7c8..0000000000 --- a/e2e/Uno/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "explorer.fileNesting.enabled": true, - "explorer.fileNesting.expand": false, - "explorer.fileNesting.patterns": { - "*.xaml": "$(capture).xaml.cs" - } -} diff --git a/e2e/Uno/.vsconfig b/e2e/Uno/.vsconfig deleted file mode 100644 index 1c9c22808d..0000000000 --- a/e2e/Uno/.vsconfig +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": "1.0", - "components": [ - "Microsoft.VisualStudio.Component.CoreEditor", - "Microsoft.VisualStudio.Workload.CoreEditor", - "Microsoft.NetCore.Component.SDK", - "Microsoft.NetCore.Component.DevelopmentTools", - "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", - "Microsoft.NetCore.Component.Web", - "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", - "Microsoft.VisualStudio.Component.TextTemplating", - "Microsoft.VisualStudio.Component.IISExpress", - "Component.Microsoft.Web.LibraryManager", - "Microsoft.VisualStudio.ComponentGroup.Web", - "Microsoft.VisualStudio.Component.Web", - "Microsoft.VisualStudio.ComponentGroup.Web.Client", - "Microsoft.VisualStudio.Workload.NetWeb", - "Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites", - "Microsoft.VisualStudio.Workload.Azure", - "Microsoft.VisualStudio.Component.Windows10SDK.19041", - "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", - "Microsoft.VisualStudio.Component.Debugger.JustInTime", - "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", - "Microsoft.VisualStudio.Workload.ManagedDesktop", - "Microsoft.Component.NetFX.Native", - "Microsoft.VisualStudio.Component.Graphics", - "Component.OpenJDK", - "Microsoft.VisualStudio.Component.MonoDebugger", - "Microsoft.VisualStudio.Component.Merq", - "Component.Xamarin.RemotedSimulator", - "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine", - "Component.Xamarin", - "Component.Android.SDK32", - "Microsoft.VisualStudio.Workload.NetCrossPlat", - "Microsoft.VisualStudio.Workload.NetCoreTools", - "Microsoft.VisualStudio.ComponentGroup.Maui.All" - ] -} diff --git a/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj b/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj index 20572744c2..060b086567 100644 --- a/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj +++ b/e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj @@ -12,6 +12,8 @@ 1.0 1 + Android\AndroidManifest.xml + diff --git a/e2e/Uno/HelloWorld/Views/Shell.xaml.cs b/e2e/Uno/HelloWorld/Views/Shell.xaml.cs old mode 100644 new mode 100755 index 5f2acc762c..e475101ae3 --- a/e2e/Uno/HelloWorld/Views/Shell.xaml.cs +++ b/e2e/Uno/HelloWorld/Views/Shell.xaml.cs @@ -7,14 +7,19 @@ namespace HelloWorld.Views; /// public sealed partial class Shell : Page, ILoadableShell { + private readonly CompositeLoadableSource _loadable; public Shell() { this.InitializeComponent(); + _loadable = new () + { + IsExecuting = true + }; + Splash.Source = _loadable; } - public ILoadable Source + public void FinishLoading() { - get => Splash.Source; - set => Splash.Source = value; + _loadable.IsExecuting = false; } } diff --git a/src/Uno/Prism.Uno/ILoadableShell.cs b/src/Uno/Prism.Uno/ILoadableShell.cs old mode 100644 new mode 100755 index dff93e2a7e..21a0fb32e7 --- a/src/Uno/Prism.Uno/ILoadableShell.cs +++ b/src/Uno/Prism.Uno/ILoadableShell.cs @@ -1,9 +1,7 @@ -using Uno.Toolkit; - -namespace Prism; +namespace Prism; #nullable enable public interface ILoadableShell { - ILoadable Source { get; set; } + void FinishLoading(); } diff --git a/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj b/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj old mode 100644 new mode 100755 index cc9b4695f0..926f1dbacf --- a/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj +++ b/src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj @@ -20,7 +20,6 @@ - diff --git a/src/Uno/Prism.Uno/PrismApplicationBase.cs b/src/Uno/Prism.Uno/PrismApplicationBase.cs old mode 100644 new mode 100755 index 505874f264..7330abd959 --- a/src/Uno/Prism.Uno/PrismApplicationBase.cs +++ b/src/Uno/Prism.Uno/PrismApplicationBase.cs @@ -123,16 +123,10 @@ protected virtual void Initialize(IApplicationBuilder builder) RegisterFrameworkExceptionTypes(); - var loadable = new PrismShellLoadable(); var shell = CreateShell(); if (shell != null) { - if (shell is ILoadableShell loadableShell) - { - loadableShell.Source = loadable; - } - MvvmHelpers.AutowireViewModel(shell); builder.Window.Content = shell; builder.Window.Activate(); @@ -144,7 +138,8 @@ void FinalizeInitialization() _host = builder.Build(); InitializeModules(); OnInitialized(); - loadable.FinishLoading(); + if (shell is ILoadableShell loadableShell) + loadableShell.FinishLoading(); MvvmHelpers.ViewAndViewModelAction(shell, x => x.IsActive = true); } diff --git a/src/Uno/Prism.Uno/PrismShellLoadable.cs b/src/Uno/Prism.Uno/PrismShellLoadable.cs deleted file mode 100644 index 6c15fc239a..0000000000 --- a/src/Uno/Prism.Uno/PrismShellLoadable.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Prism; - -#nullable enable -internal sealed class PrismShellLoadable : Uno.ILoadable, Uno.Toolkit.ILoadable -{ - public bool IsExecuting { get; private set; } = true; - - public bool IsLoaded { get; private set; } - - public event EventHandler? IsExecutingChanged; - public event EventHandler? Loaded; - - public void FinishLoading() - { - IsExecuting = false; - IsLoaded = true; - IsExecutingChanged?.Invoke(this, EventArgs.Empty); - Loaded?.Invoke(this, EventArgs.Empty); - } -}