CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.86k stars 1.38k forks source link

Shouln't AttachedCardShadow be in Microsoft.Toolkit.Uwp.UI? #4299

Open Sergio0694 opened 2 years ago

Sergio0694 commented 2 years ago

Overview

With respect to the ongoing effort to streamline the namespace structure in the Toolkit (see https://github.com/CommunityToolkit/WindowsCommunityToolkit/issues/3422), and also because this particular instance is technically breaking our established pattern of using the core namespace for additional "addon" features from other packages, shouldn't AttachedCardShadow be in Microsoft.Toolkit.Uwp.UI like all the other shadow APIs? The fact it's currently in Microsoft.Toolkit.Uwp.UI.Media makes it particularly clunky to use in XAML as users need to declare two separate XML namespaces to be able to use Effects.Shadow and then AttachedCardShadow inside of it. This similar issue has also come up before when working on the various animation APIs, and the decision there was to unify namespaces too.

âš  Issues

This would be a breaking change, which is unfortunate. If we did this and pushed out a new package, we'd both source-break customers referencing the package directly and using it, as well as we'd binary-break (at runtime, yikes) customers having a UWP lib referencing 7.1 that is then loaded up in a UWP app using a new version of the Toolkit, as the new binary would be resolved and that would throw a TypeLoadException (or similar) when trying to load AttachedCardShadow at runtime.

I wish I had spotted the incorrect namespace sooner 😥

NuGet Package(s): 7.1.0

ghost commented 2 years ago

Hello Sergio0694, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost commented 2 years ago

Hello Sergio0694, thank you for your interest in Windows Community Toolkit!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible.. Other community members may also answer the question and provide feedback 🙌