microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.72k stars 462 forks source link

Use CommunityToolkit.Mvvm Instead of Microsoft.Toolkit.Mvvm #4525

Closed Varorbc closed 2 years ago

Varorbc commented 2 years ago

Is your feature request related to a problem? Please describe.

https://github.com/CommunityToolkit/WindowsCommunityToolkit/discussions/4486

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Applies to the following platforms:

mrlacey commented 2 years ago

The title of this refers to the MVVM Toolkit but the link is to the Windows Community Toolkit

Given the v8.0 of the community toolkit is not due until the end of this year, making a change now would be tricky and inadvisable until a more detailed estimate for the release is available.

The Community toolkit guidance has previously been to keep using the Microsoft.* versions for UWP and the CommunityToolkit.* versions for WinUI3. I'm not sure of the official guidance for WPF.

Mixing the CommunityToolkit.* for the MVVM library and the Microsoft.* for other UWP-specific functionality could become confusing.

I'm not sure what, the benefit of making the suggested change to use a different package (and namespace) brings. What's the justification for making this change? Other than breaking compatibility issues for Template Studio.

When switching to the v8 version of the MVVM Toolkit there are a lot of opportunities to make use of the considerable changes there. We'd not do that while it's in preview. Making the change will also likely need extensive modification throughout the templates currently in use. It would be a MAJOR breaking change and require significant time and planning. Making the proposed change now would suggest that a change to v8 would be coming quickly when this cannot be assumed without a significant commitment of time and resources to making the required changes. A lot of community time and resources would need to be committed or some other way (funding?) would need to be found to enable this.

michael-hawker commented 2 years ago

Adding @Sergio0694. The CommunityToolkit.Mvvm package is the correct one to use in all cases moving forward as of 7.1.2. It can be used safely on whichever .NET platform is being leveraged by the UX framework. (No other toolkit packages take a dependency on it in the current release.)

8.0.0 will be its first independent release and when we mark the 7.1.2 release of Microsoft.Toolkit.Mvvm as deprecated pointing to the new CommunityToolkit.Mvvm package id.

But yes, otherwise the current guidance for the Windows Community Toolkit packages under Microsoft.Toolkit.Uwp should be to use those on UWP and CommunityToolkit.WinUI.* for WinUI 3. This will change with the separate 8.0 release of the Windows Community Toolkit where we change packages and namespaces later this year.

Sergio0694 commented 2 years ago

Yeah, the Template Studio should just point to CommunityToolkit.Mvvm as soon as it's out in stable. I agree it's confusing especially when mixing namespaces with the Windows Community Toolkit for now. But alas, that's where we are 🥲