Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Uno.Toolkit dependency #2999

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions e2e/Uno/.vscode/launch.json → .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,15 +19,15 @@
"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": {
"runtimeExecutable": "dotnet",
"program": "run",
"outputCapture": "std",
"timeout": 30000,
"cwd": "${workspaceFolder}/HelloWorld.Wasm"
"cwd": "${workspaceFolder}/e2e/Uno/HelloWorld.Wasm"
}
},
{
Expand All @@ -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
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
File renamed without changes.
7 changes: 0 additions & 7 deletions e2e/Uno/.vscode/settings.json

This file was deleted.

38 changes: 0 additions & 38 deletions e2e/Uno/.vsconfig

This file was deleted.

2 changes: 2 additions & 0 deletions e2e/Uno/HelloWorld.Mobile/HelloWorld.Mobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<AndroidManifest>Android\AndroidManifest.xml</AndroidManifest>

<!-- Debugger workaround https://github.com/dotnet/maui-samples/blob/8aa6b8780b12e97b157514c3bdc54bb4a13001cd/HelloMacCatalyst/HelloMacCatalyst.csproj#L7 -->
<!-- <MtouchExtraArgs Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">$(MtouchExtraArgs) -setenv:MONO_THREADS_SUSPEND=preemptive</MtouchExtraArgs> -->
<!-- Required for C# Hot Reload -->
Expand Down
11 changes: 8 additions & 3 deletions e2e/Uno/HelloWorld/Views/Shell.xaml.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ namespace HelloWorld.Views;
/// </summary>
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;
}
}
6 changes: 2 additions & 4 deletions src/Uno/Prism.Uno/ILoadableShell.cs
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using Uno.Toolkit;

namespace Prism;
namespace Prism;

#nullable enable
public interface ILoadableShell
{
ILoadable Source { get; set; }
void FinishLoading();
}
1 change: 0 additions & 1 deletion src/Uno/Prism.Uno/Prism.Uno.WinUI.csproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Uno.Toolkit.WinUI" />
<PackageReference Include="Uno.WinUI" />
<PackageReference Include="Uno.Extensions.Hosting.WinUI" />
</ItemGroup>
Expand Down
9 changes: 2 additions & 7 deletions src/Uno/Prism.Uno/PrismApplicationBase.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -144,7 +138,8 @@ void FinalizeInitialization()
_host = builder.Build();
InitializeModules();
OnInitialized();
loadable.FinishLoading();
if (shell is ILoadableShell loadableShell)
loadableShell.FinishLoading();
MvvmHelpers.ViewAndViewModelAction<IActiveAware>(shell, x => x.IsActive = true);
}

Expand Down
20 changes: 0 additions & 20 deletions src/Uno/Prism.Uno/PrismShellLoadable.cs

This file was deleted.

Loading