unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.81k stars 707 forks source link

WASM: ProgressRing not working? #8264

Closed baskren closed 2 years ago

baskren commented 2 years ago

Current behavior

ProgressRing does not work in

Per the instructions on StackOverflow, the Uno.UI.Lottie NuGet package was added to the minimal demo app. I can't attest for the other two instances.

FWIW, tested in the following Browsers:

Expected behavior

ProgressRing works on WASM

How to reproduce it (as minimally and precisely as possible)

Workaround

Would like to know

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

    <PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
    <PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.0.1" />
    <PackageReference Include="Uno.UI.Lottie" Version="4.0.13" />
    <PackageReference Include="Uno.UI.WebAssembly" Version="4.0.11" />
    <PackageReference Include="Uno.UI.RemoteControl" Version="4.0.11" Condition="'$(Configuration)'=='Debug'" />
    <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.11" />
    <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.11" />
    <PackageReference Include="Uno.Wasm.Bootstrap" Version="3.1.2" />
    <PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="3.1.2" />

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

Version 17.1.0

Relevant plugins

I can't think of any ... but, just in case:

Microsoft Visual Studio Enterprise 2022
Version 17.1.0
VisualStudio.17.Release/17.1.0+32210.238
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00476-80000-00000-AA914
Microsoft Architecture Diagrams and Analysis Tools

Visual C++ 2022   00476-80000-00000-AA914
Microsoft Visual C++ 2022

.NET Core Debugging with WSL   1.0
.NET Core Debugging with WSL

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools 2019   17.1.358.51495
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   17.1.358.51495
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   17.1.358.51495
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.1.358.51495
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.1.0-5.22109.6+0c82c4114a4e4b8b723b915eee3b13261db6717f
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

CleanBinAndObjCommand Extension   1.2.58
CleanBinAndObjCommand Visual Studio Extension Detailed Info

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

IncrediBuild Build Acceleration   1.6.0.2
IncrediBuild effectively reduces compilation and development times by up to 90%.

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   17.0
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   2.1.161+abc97ecc7d.RR
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.2
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   17.1.10 (65f98f5)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   6.1.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Office Developer Tools for Visual Studio   17.0.32009.00
Microsoft Office Developer Tools for Visual Studio

Razor (ASP.NET Core)   17.0.0.2206201+62a2c1d6162f828801565a7ca26d9d48b810a05b
Provides languages services for ASP.NET Core Razor.

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   17.0.62201.12090
Microsoft SQL Server Data Tools

Syntax Visualizer   1.0
An extension for visualizing Roslyn SyntaxTrees.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.1229.2001
TypeScript Tools for Microsoft Visual Studio

UnoPlatformPackage Extension   1.0
UnoPlatformPackage Visual Studio Extension Detailed Info

Visual Basic Tools   4.1.0-5.22109.6+0c82c4114a4e4b8b723b915eee3b13261db6717f
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (iOS)   17.0.32113.165
Visual C++ for Cross Platform Mobile Development (iOS)

Visual F# Tools   17.1.0-beta.21610.4+07b5673e4f2fa7630e78abe37f16b372353a7242
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions   1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Foo   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   17.1.0.309 (d17-1@3f96c58)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.1.0.87 (remotes/origin/main@d50fb5635)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   17.1.8 (590388a)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   12.2.0.4 (d17-1/19b97b7)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: a5d1934
    Java.Interop: xamarin/java.interop/d17-1@7ac33610
    ProGuard: Guardsquare/proguard/v7.0.1@912d149
    SQLite: xamarin/sqlite/3.37.1@0893b3b
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-1@db125a7

Xamarin.iOS and Xamarin.Mac SDK   15.6.0.3 (caa899d24)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Anything else we need to know?

You guys are doing a fantastic job. Thanks for all the hard work!

jeromelaban commented 2 years ago

The Windows.UI.Xaml.Controls.ProgressRing control is not implemented for all platforms, but Microsoft.UI.Xaml.Controls.ProgressRing is.

See https://playground.platform.uno/#33d53c95.

We're missing an update similar to https://github.com/unoplatform/uno/pull/7502 for WUX progressring, though. @MartinZikmund

baskren commented 2 years ago

Thanks! Didn't expect WUX obsolescence. Guess I have more refactoring to do.

MartinZikmund commented 2 years ago

Thanks! Didn't expect WUX obsolescence. Guess I have more refactoring to do.

@baskren Only for this control though, other controls like Windows.UI.Controls.Button work just fine 👍!

baskren commented 2 years ago

Sorry - I didn't mean this in a bad way. Just caught me off guard.

baskren commented 2 years ago

Again - you guys are doing a fantastic job. Having spent a bit over a year immersing myself in Uno, it's pretty clear that your team has dogfooded the platform. I'm constantly amazed at how stable it is relative to the other cross platform frameworks I work with.

MartinZikmund commented 2 years ago

Sorry - I didn't mean this in a bad way. Just caught me off guard.

@baskren I didn't mean it in bad way either, just wanted to clarify that it is only that some WinUI controls are unsupported (those which are superseded by MUX versions 😊)

MartinZikmund commented 2 years ago

@baskren Reopened this as the ProgressRing story is a bit more complicated than I originally thought. Made a PR with additional docs which may be helpful 😊

baskren commented 2 years ago

Super!

nikolayvpavlov commented 1 year ago

This will not work if you also reference the Community Toolkit - Uni.CommunityToolkit.winUI.UI.Controls. If you add both, you get an error during compilation that you cannot combine WinUI and Uno UI packages in one project.

MartinZikmund commented 1 year ago

@nikolayvpavlov You should be able to use the UWP version instead - https://www.nuget.org/packages/Uno.Microsoft.Toolkit.Uwp.UI.Controls

Uno.Microsoft.Toolkit.Uwp.UI.Controls 7.1.11
This library provides Controls, Panels, ItemsRepeater Layouts, and various other classes & helpers for XAML UI development with UWP. It is a part of the Windows Community Toolkit. This package is only an aggregate of its dependencies, meaning it's a meta-package and has no assemblies. You can find out how to optimize your app after development at https://aka.ms/wct/optimize
nikolayvpavlov commented 1 year ago

@nikolayvpavlov You should be able to use the UWP version instead - https://www.nuget.org/packages/Uno.Microsoft.Toolkit.Uwp.UI.Controls

Uno.Microsoft.Toolkit.Uwp.UI.Controls 7.1.11This library provides Controls, Panels, ItemsRepeater Layouts, and various other classes & helpers for XAML UI development with UWP. It is a part of the Windows Community Toolkit.

  This package is only an aggregate of its dependencies, meaning it's a meta-package and has no assemblies. You can find out how to optimize your app after development at https://aka.ms/wct/optimize</div></blockquote>

Does not work. I get "Cannot build with both Uno.WinUI and Uno.UI nuget packages referenced."

jeromelaban commented 1 year ago

@nikolayvpavlov make sure to follow the directions here: https://platform.uno/docs/articles/uno-community-toolkit.html

How to use Windows Community Toolkit
nikolayvpavlov commented 1 year ago

@jeromelaban , I did follow the directions in the link. If you try to use that, you get "Cannot build with both Uno.WinUI and Uno.UI nuget packages referenced." when compiling the project.

Community Toolkit can be used only with a pre-released version of another package: Uno.CommunityToolkit.WinUI.UI.Controls.

The documentation is outdated, and incorrect.

jeromelaban commented 1 year ago

Let's continue the discussion in https://github.com/unoplatform/uno/discussions/10211

GitHub
Using ProgressRing · Discussion #10211 · unoplatform/uno
From @nikolayvpavlov in #8264 (comment) @jeromelaban , I did follow the directions in the link. If you try to use that, you get "Cannot build with both Uno.WinUI and Uno.UI nuget packages refe...