From 44621277a68ae4dc7e2609328b19b91a5affdaea Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 3 Aug 2023 13:58:31 -0500 Subject: [PATCH 01/22] Fixed build errors caused by .NET 7 upgrade --- components/Extensions/src/Shadows/AttachedShadowBase.cs | 2 +- components/Helpers/samples/CameraHelperSample.xaml.cs | 5 +++-- global.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/Extensions/src/Shadows/AttachedShadowBase.cs b/components/Extensions/src/Shadows/AttachedShadowBase.cs index 26583602..90145fe1 100644 --- a/components/Extensions/src/Shadows/AttachedShadowBase.cs +++ b/components/Extensions/src/Shadows/AttachedShadowBase.cs @@ -27,7 +27,7 @@ public abstract partial class AttachedShadowBase : DependencyObject, IAttachedSh /// /// Gets a value indicating whether or not Composition's VisualSurface is supported. /// - protected static readonly bool SupportsCompositionVisualSurface = ApiInformation.IsTypePresent(typeof(CompositionVisualSurface).FullName); + protected static readonly bool SupportsCompositionVisualSurface = typeof(CompositionVisualSurface).FullName is string str && ApiInformation.IsTypePresent(str); #endif /// diff --git a/components/Helpers/samples/CameraHelperSample.xaml.cs b/components/Helpers/samples/CameraHelperSample.xaml.cs index f4ece300..1f2038f9 100644 --- a/components/Helpers/samples/CameraHelperSample.xaml.cs +++ b/components/Helpers/samples/CameraHelperSample.xaml.cs @@ -7,6 +7,7 @@ using Windows.Media; using Windows.Media.Capture.Frames; using Windows.ApplicationModel; + #if WINAPPSDK using Microsoft.UI.Xaml.Media.Imaging; #else @@ -62,7 +63,7 @@ private void Setup() #endif } - private async void Application_Suspending(object sender, SuspendingEventArgs e) + private async void Application_Suspending(object? sender, SuspendingEventArgs e) { if (IsLoaded) { @@ -72,7 +73,7 @@ private async void Application_Suspending(object sender, SuspendingEventArgs e) } } - private async void Application_Resuming(object sender, object e) + private async void Application_Resuming(object? sender, object e) { await InitializeAsync(); } diff --git a/global.json b/global.json index 1ad7848c..99d28b9c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.405", + "version": "7.0.306", "rollForward": "latestFeature" }, "msbuild-sdks": From 7c09f83626db05048bbaebde6ad1cabbab09a4b0 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 3 Aug 2023 13:58:42 -0500 Subject: [PATCH 02/22] Updated tooling pointer Update tooling to latest upgrade/net7 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 4c90e49f..026ca8c7 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 4c90e49f544a46cace6e188f7cd509f56e968a2d +Subproject commit 026ca8c7cf80f61c443c1a55a17419e88a256e8e From 89ae4623df795d5a720fa92b1d8f599d574a139e Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 11 Aug 2023 17:23:33 -0500 Subject: [PATCH 03/22] Bump uno-check --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 98537666..78a89568 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "uno.check": { - "version": "1.10.0", + "version": "1.13.0", "commands": [ "uno-check" ] From 7b287205ab98fc25c7db2405c0096173bda7241f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 11 Aug 2023 18:22:00 -0500 Subject: [PATCH 04/22] Skip vswinworkloads --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7079d4c..32a7971a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,7 +104,7 @@ jobs: run: dotnet tool restore - name: Run Uno Check to Install Dependencies - run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --verbose + run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --skip vswinworkloads --verbose - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.3.1 From 9134bf88849484edee05c322f51fbb2cb3e5c1e2 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Fri, 11 Aug 2023 14:23:28 -0700 Subject: [PATCH 05/22] Update Build Script to support Pull Request Packages Again Cleaned up some logic for diagnostic builds as well so we have a single build command --- .github/workflows/build.yml | 19 +++++++++---------- Directory.Build.props | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32a7971a..f0febc7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,7 @@ on: env: DOTNET_VERSION: ${{ '7.0.x' }} ENABLE_DIAGNOSTICS: true + MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log MULTI_TARGET_DIRECTORY: tooling/MultiTarget @@ -122,13 +123,8 @@ jobs: run: powershell -version 5.1 -command "./UseUnoWinUI.ps1 3" -ErrorAction Stop if: ${{ matrix.platform == 'WinUI3' }} - - name: MSBuild (With diagnostics) - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} - run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m /bl -v:diag - - name: MSBuild - if: ${{ env.ENABLE_DIAGNOSTICS == 'false' }} - run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m + run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m ${{ github.ref == 'refs/heads/main' && '' || format('-p:PreviewVersion="pull-{0}+build.{1}"', github.event.number, github.run_number) }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }} # Build All Packages - name: pack experiments @@ -136,13 +132,16 @@ jobs: run: ./PackEachExperiment.ps1 all # Push Packages to our DevOps Artifacts Feed (see nuget.config) - - name: Add source + - name: Add source (main) if: ${{ github.ref == 'refs/heads/main' }} run: dotnet nuget update source MainLatest --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }} + - name: Add source (pull requests) + if: ${{ github.ref != 'refs/heads/main' }} + run: dotnet nuget add source https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-PullRequests/nuget/v3/index.json --name PullRequests --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }} + - name: Push packages - if: ${{ github.ref == 'refs/heads/main' }} - run: dotnet nuget push "**/*.nupkg" --api-key dummy --source MainLatest --skip-duplicate + run: dotnet nuget push "**/*.nupkg" --api-key dummy --source ${{ github.ref == 'refs/heads/main' && 'MainLatest' || 'PullRequests' }} --skip-duplicate # Run tests - name: Setup VSTest Path @@ -241,7 +240,7 @@ jobs: # See launch.json configuration file for analogous command we're emulating here to build LINK: ../../.vscode/launch.json:CommunityToolkit.App.Wasm.csproj - name: dotnet build working-directory: ./${{ env.HEADS_DIRECTORY }}/AllComponents/Wasm/ - run: dotnet build /r /bl + run: dotnet build /r /bl -v:${{ env.MSBUILD_VERBOSITY }} # TODO: Do we want to run tests here? Can we do that on linux easily? diff --git a/Directory.Build.props b/Directory.Build.props index 43b79255..e262c054 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ 8 0 - preview + preview CommunityToolkit $([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)')) From df2bf9f3fbfefff1d4c8d7dec3581c8b3483cada Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 08:21:50 -0500 Subject: [PATCH 06/22] Update tooling to use maccatalyst --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 026ca8c7..0e3e4c4c 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 026ca8c7cf80f61c443c1a55a17419e88a256e8e +Subproject commit 0e3e4c4c549016efd1d85152e4309390d427f540 From 73a1d00ae78c6112a58acb39d69efd5c39238760 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 09:03:23 -0500 Subject: [PATCH 07/22] Fix for net7.0-maccatalyst, use dotnet 7.0.100 --- .github/workflows/build.yml | 2 +- global.json | 2 +- tooling | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0febc7b..22f670c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ on: merge_group: env: - DOTNET_VERSION: ${{ '7.0.x' }} + DOTNET_VERSION: ${{ '7.0.100' }} ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 diff --git a/global.json b/global.json index 99d28b9c..852dfb6d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.306", + "version": "7.0.100", "rollForward": "latestFeature" }, "msbuild-sdks": diff --git a/tooling b/tooling index 0e3e4c4c..989cebd5 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 0e3e4c4c549016efd1d85152e4309390d427f540 +Subproject commit 989cebd57bf41c9155af6d69f85ed2f3896eddb6 From 6fe3e9cefa50c0c30b44cc0c13996f27d2cfd5c4 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 12:23:48 -0500 Subject: [PATCH 08/22] Update tooling, additional net7-mobile error suppression --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 989cebd5..2f8caf55 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 989cebd57bf41c9155af6d69f85ed2f3896eddb6 +Subproject commit 2f8caf55e9a7ce274dfe223d4fd03ccff1c35abe From 1efcb485ced6be10c85a3922b604bdbf22f03f00 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 14:00:22 -0500 Subject: [PATCH 09/22] Update tooling: More error suppression for net7 mobile --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 2f8caf55..9f18b055 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 2f8caf55e9a7ce274dfe223d4fd03ccff1c35abe +Subproject commit 9f18b055af7e42284196eac35b66cfa0021d033f From 26d294a5aaf5ed6646185d055ef37718dcc3852e Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 14:00:32 -0500 Subject: [PATCH 10/22] Fixed invalid symbol references in comments --- components/Converters/src/FileSizeToFriendlyStringConverter.cs | 2 +- components/Extensions/src/Shadows/IAttachedShadow.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Converters/src/FileSizeToFriendlyStringConverter.cs b/components/Converters/src/FileSizeToFriendlyStringConverter.cs index e6f35d02..29e6f485 100644 --- a/components/Converters/src/FileSizeToFriendlyStringConverter.cs +++ b/components/Converters/src/FileSizeToFriendlyStringConverter.cs @@ -5,7 +5,7 @@ namespace CommunityToolkit.WinUI.Converters; /// -/// Converts a file size in bytes to a more human-readable friendly format using +/// Converts a file size in bytes to a more human-readable friendly format using /// public class FileSizeToFriendlyStringConverter : IValueConverter { diff --git a/components/Extensions/src/Shadows/IAttachedShadow.cs b/components/Extensions/src/Shadows/IAttachedShadow.cs index 9f8ac37a..56e412d5 100644 --- a/components/Extensions/src/Shadows/IAttachedShadow.cs +++ b/components/Extensions/src/Shadows/IAttachedShadow.cs @@ -22,7 +22,7 @@ public interface IAttachedShadow double Opacity { get; set; } /// - /// Gets or sets the offset of the shadow as a string representation of a . + /// Gets or sets the offset of the shadow as a string representation of a . /// string Offset { get; set; } From 0724bef625123aba159c1626412cea1655871abd Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 18:59:32 -0500 Subject: [PATCH 11/22] Update editorconfig --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 21a44161..34bc74fa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -435,3 +435,6 @@ dotnet_diagnostic.IDE0073.severity = warning # Uno platform exposes IDisposable on Storyboard publicly when it should be internal. Ignore this. dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard + +# XML comment has cref attribute that could not be resolved (temp, remove XML generated docs get used) +dotnet_diagnostic.CS1574.severity = none \ No newline at end of file From 44f957da12568e2c99b3e7a5309fa6880af8ce1d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 14 Aug 2023 19:45:49 -0500 Subject: [PATCH 12/22] Update editorconfig --- .editorconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 34bc74fa..b453dd32 100644 --- a/.editorconfig +++ b/.editorconfig @@ -437,4 +437,5 @@ dotnet_diagnostic.IDE0073.severity = warning dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard # XML comment has cref attribute that could not be resolved (temp, remove XML generated docs get used) -dotnet_diagnostic.CS1574.severity = none \ No newline at end of file +dotnet_diagnostic.CS1574.severity = none +dotnet_diagnostic.CS1587.severity = none \ No newline at end of file From de0098b1e1d37cc682bd57438c1580d6c311d7a9 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Tue, 15 Aug 2023 10:16:57 -0700 Subject: [PATCH 13/22] Update logic for Versioning of Build and ensure to pass to Packing Script --- .github/workflows/build.yml | 5 +++-- Directory.Build.props | 2 +- tooling | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22f670c4..58b4b300 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,6 +66,7 @@ jobs: # faux-ternary expression to select which platforms to build for each platform vs. duplicating step below. TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all' || 'all-uwp' }} TEST_PLATFORM: ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }} + VERSION_PROPERTY: ${{ github.ref == 'refs/heads/main' && format('-p:PreviewVersion=build.{0}', github.run_number) || format('-p:PreviewVersion=pull-{0}.{1}', github.event.number, github.run_number) }} # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -124,12 +125,12 @@ jobs: if: ${{ matrix.platform == 'WinUI3' }} - name: MSBuild - run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m ${{ github.ref == 'refs/heads/main' && '' || format('-p:PreviewVersion="pull-{0}+build.{1}"', github.event.number, github.run_number) }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }} + run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m ${{ env.VERSION_PROPERTY }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }} # Build All Packages - name: pack experiments working-directory: ./tooling/Scripts/ - run: ./PackEachExperiment.ps1 all + run: ./PackEachExperiment.ps1 -extraBuildProperties "${{ env.VERSION_PROPERTY }}" # Push Packages to our DevOps Artifacts Feed (see nuget.config) - name: Add source (main) diff --git a/Directory.Build.props b/Directory.Build.props index e262c054..43b79255 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ 8 0 - preview + preview CommunityToolkit $([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)')) diff --git a/tooling b/tooling index 9f18b055..0a36c629 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 9f18b055af7e42284196eac35b66cfa0021d033f +Subproject commit 0a36c629af1c4846761be6c299b4bf73ade9e05d From 7db369a7d56053be0a968cb0a953b32ee79f1590 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 16 Aug 2023 13:43:02 -0500 Subject: [PATCH 14/22] Use net7.0-android33.0 instead of net7.0-android --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 0a36c629..faeaab9d 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 0a36c629af1c4846761be6c299b4bf73ade9e05d +Subproject commit faeaab9dff14b1f63d694c0bb58894a20207491c From 663499777b477333f5c5707c2c4d384681a29d5b Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 16 Aug 2023 16:57:41 -0500 Subject: [PATCH 15/22] Fix and un-suppress CS1574 errors --- .editorconfig | 1 - .../Animations/src/ConnectedAnimations/Connected.cs | 10 +++++----- components/Animations/src/Enums/FrameworkLayer.cs | 10 +++++++++- components/Animations/src/Enums/VisualProperty.cs | 6 ++++++ .../ReferenceNodes/AmbientLightReferenceNode.cs | 2 +- components/Animations/src/Xaml/AnimationSet.cs | 8 +++++++- .../samples/AdvancedCollectionViewSample.xaml.cs | 2 +- .../samples/IncrementalLoadingCollectionSample.xaml.cs | 6 +++--- .../src/FileSizeToFriendlyStringConverter.cs | 2 +- components/Sizers/src/SizerBase.cs | 2 +- 10 files changed, 34 insertions(+), 15 deletions(-) diff --git a/.editorconfig b/.editorconfig index b453dd32..1a0bca3e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -437,5 +437,4 @@ dotnet_diagnostic.IDE0073.severity = warning dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard # XML comment has cref attribute that could not be resolved (temp, remove XML generated docs get used) -dotnet_diagnostic.CS1574.severity = none dotnet_diagnostic.CS1587.severity = none \ No newline at end of file diff --git a/components/Animations/src/ConnectedAnimations/Connected.cs b/components/Animations/src/ConnectedAnimations/Connected.cs index 8075233c..903c116c 100644 --- a/components/Animations/src/ConnectedAnimations/Connected.cs +++ b/components/Animations/src/ConnectedAnimations/Connected.cs @@ -53,7 +53,7 @@ public static void SetAnchorElement(DependencyObject obj, UIElement value) /// /// Gets the connected animation key associated with the ListViewBase item being animated /// - /// The + /// The /// The connected animation key public static string GetListItemKey(DependencyObject obj) { @@ -61,9 +61,9 @@ public static string GetListItemKey(DependencyObject obj) } /// - /// Sets the connected animation key for the item being animated + /// Sets the connected animation key for the item being animated /// - /// The + /// The /// The connected animation key public static void SetListItemKey(DependencyObject obj, string value) { @@ -73,7 +73,7 @@ public static void SetListItemKey(DependencyObject obj, string value) /// /// Gets the name of the element in the that is animated /// - /// The + /// The /// The name of the element being animated public static string GetListItemElementName(DependencyObject obj) { @@ -83,7 +83,7 @@ public static string GetListItemElementName(DependencyObject obj) /// /// Sets the name of the element in the that is animated /// - /// The + /// The /// The name of the element to animate public static void SetListItemElementName(DependencyObject obj, string value) { diff --git a/components/Animations/src/Enums/FrameworkLayer.cs b/components/Animations/src/Enums/FrameworkLayer.cs index 44af3d43..0740b03a 100644 --- a/components/Animations/src/Enums/FrameworkLayer.cs +++ b/components/Animations/src/Enums/FrameworkLayer.cs @@ -10,12 +10,20 @@ namespace CommunityToolkit.WinUI.Animations; public enum FrameworkLayer { /// +#if WINUI2 /// Indicates the APIs. +#elif WINUI3 + /// Indicates the APIs. +#endif /// Composition, - + /// +#if WINUI2 /// Indicates the APIs. +#elif WINUI3 + /// Indicates the APIs. +#endif /// Xaml } diff --git a/components/Animations/src/Enums/VisualProperty.cs b/components/Animations/src/Enums/VisualProperty.cs index 47c53753..b7273a25 100644 --- a/components/Animations/src/Enums/VisualProperty.cs +++ b/components/Animations/src/Enums/VisualProperty.cs @@ -4,6 +4,12 @@ namespace CommunityToolkit.WinUI.Animations; +#if WINUI2 +using Windows.UI.Composition; +#else +using Microsoft.UI.Composition; +#endif + /// /// Indicates a property of a object. /// diff --git a/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs b/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs index 4481c925..57d8b193 100644 --- a/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs +++ b/components/Animations/src/Expressions/ReferenceNodes/AmbientLightReferenceNode.cs @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions; /// /// Class AmbientLightReferenceNode. This class cannot be inherited. /// -/// +/// public sealed class AmbientLightReferenceNode : ReferenceNode { /// diff --git a/components/Animations/src/Xaml/AnimationSet.cs b/components/Animations/src/Xaml/AnimationSet.cs index 0c1035ed..1c717ca2 100644 --- a/components/Animations/src/Xaml/AnimationSet.cs +++ b/components/Animations/src/Xaml/AnimationSet.cs @@ -5,11 +5,17 @@ using System.Diagnostics.Contracts; using System.Runtime.CompilerServices; +#if WINUI2 +using Windows.UI.Xaml.Media.Animation; +#else +using Microsoft.UI.Xaml.Media.Animation; +#endif + namespace CommunityToolkit.WinUI.Animations; /// /// A collection of animations that can be grouped together. This type represents a composite animation -/// (such as ) that can be executed on a given element. +/// (such as ) that can be executed on a given element. /// public sealed class AnimationSet : DependencyObjectCollection { diff --git a/components/Collections/samples/AdvancedCollectionViewSample.xaml.cs b/components/Collections/samples/AdvancedCollectionViewSample.xaml.cs index 58be8d94..118531cd 100644 --- a/components/Collections/samples/AdvancedCollectionViewSample.xaml.cs +++ b/components/Collections/samples/AdvancedCollectionViewSample.xaml.cs @@ -61,7 +61,7 @@ private void Add_Click(object sender, RoutedEventArgs e) } /// - /// A sample class used to show how to use the interface. + /// A sample class used to show how to use the interface. /// public class Person { diff --git a/components/Collections/samples/IncrementalLoadingCollectionSample.xaml.cs b/components/Collections/samples/IncrementalLoadingCollectionSample.xaml.cs index be392d7d..3366f461 100644 --- a/components/Collections/samples/IncrementalLoadingCollectionSample.xaml.cs +++ b/components/Collections/samples/IncrementalLoadingCollectionSample.xaml.cs @@ -32,9 +32,9 @@ private async void RefreshCollection(object sender, RoutedEventArgs e) } /// -/// A sample implementation of the interface. +/// A sample implementation of the interface. /// -/// +/// public class PeopleSource : IIncrementalSource { private readonly List _people; @@ -92,7 +92,7 @@ public PeopleSource() } /// -/// A sample class used to show how to use the interface. +/// A sample class used to show how to use the interface. /// public class Person { diff --git a/components/Converters/src/FileSizeToFriendlyStringConverter.cs b/components/Converters/src/FileSizeToFriendlyStringConverter.cs index 29e6f485..93db3317 100644 --- a/components/Converters/src/FileSizeToFriendlyStringConverter.cs +++ b/components/Converters/src/FileSizeToFriendlyStringConverter.cs @@ -5,7 +5,7 @@ namespace CommunityToolkit.WinUI.Converters; /// -/// Converts a file size in bytes to a more human-readable friendly format using +/// Converts a file size in bytes to a more human-readable friendly format using /// public class FileSizeToFriendlyStringConverter : IValueConverter { diff --git a/components/Sizers/src/SizerBase.cs b/components/Sizers/src/SizerBase.cs index 4c925054..16d10492 100644 --- a/components/Sizers/src/SizerBase.cs +++ b/components/Sizers/src/SizerBase.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// -/// Base class for splitting/resizing type controls like and . Acts similar to an enlarged type control, but with keyboard support. Subclasses should override the various abstract methods here to implement their behavior. +/// Base class for splitting/resizing type controls like and . Acts similar to an enlarged type control, but with keyboard support. Subclasses should override the various abstract methods here to implement their behavior. /// [TemplateVisualState(Name = NormalState, GroupName = CommonStates)] From e3bfa212589eba107231e30db0fb2d4cc1da6a07 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 16 Aug 2023 17:44:01 -0500 Subject: [PATCH 16/22] Remove suppression of CS1587 --- .editorconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index 1a0bca3e..d0c059e1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -434,7 +434,4 @@ csharp_style_prefer_extended_property_pattern = true:suggestion dotnet_diagnostic.IDE0073.severity = warning # Uno platform exposes IDisposable on Storyboard publicly when it should be internal. Ignore this. -dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard - -# XML comment has cref attribute that could not be resolved (temp, remove XML generated docs get used) -dotnet_diagnostic.CS1587.severity = none \ No newline at end of file +dotnet_code_quality.CA1001.excluded_type_names_with_derived_types = T:Windows.UI.Xaml.Media.Animation.Storyboard \ No newline at end of file From f89d21f01b295be9b73a9739bc6820bb03deb655 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 16 Aug 2023 19:00:13 -0500 Subject: [PATCH 17/22] Update tooling pointer --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index faeaab9d..fc7bd951 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit faeaab9dff14b1f63d694c0bb58894a20207491c +Subproject commit fc7bd95174890c8abfe70f7da68542a14ddf2980 From 0dfb3d039c2ec5491474c63c39644f5a2c14fca1 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 17 Aug 2023 12:09:38 -0500 Subject: [PATCH 18/22] Fixed remaining build errors --- .../src/Element/FrameworkElementExtensions.ActualSize.cs | 4 ++-- .../src/Element/FrameworkElementExtensions.Mouse.cs | 6 +++--- components/Extensions/src/Element/UIElementExtensions.cs | 2 +- components/Extensions/src/Markup/SymbolIconExtension.cs | 2 +- .../Extensions/src/Markup/SymbolIconSourceExtension.cs | 2 +- components/Primitives/src/WrapPanel/StretchChild.cs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/Extensions/src/Element/FrameworkElementExtensions.ActualSize.cs b/components/Extensions/src/Element/FrameworkElementExtensions.ActualSize.cs index 3d148a85..c5e0a36e 100644 --- a/components/Extensions/src/Element/FrameworkElementExtensions.ActualSize.cs +++ b/components/Extensions/src/Element/FrameworkElementExtensions.ActualSize.cs @@ -5,12 +5,12 @@ namespace CommunityToolkit.WinUI; /// -/// Provides attached dependency properties for the type. +/// Provides attached dependency properties for the type. /// public static partial class FrameworkElementExtensions { /// - /// Attached for enabling actual size binding on any . + /// Attached for enabling actual size binding on any . /// public static readonly DependencyProperty EnableActualSizeBindingProperty = DependencyProperty.RegisterAttached("EnableActualSizeBinding", typeof(bool), typeof(FrameworkElementExtensions), new PropertyMetadata(false, OnEnableActualSizeBindingPropertyChanged)); diff --git a/components/Extensions/src/Element/FrameworkElementExtensions.Mouse.cs b/components/Extensions/src/Element/FrameworkElementExtensions.Mouse.cs index 2866f666..d1bced06 100644 --- a/components/Extensions/src/Element/FrameworkElementExtensions.Mouse.cs +++ b/components/Extensions/src/Element/FrameworkElementExtensions.Mouse.cs @@ -32,14 +32,14 @@ public static partial class FrameworkElementExtensions new() { { CursorShape.Arrow, _defaultCursor } }; /// - /// Dependency property for specifying the target to be shown + /// Dependency property for specifying the target to be shown /// over the target . /// public static readonly DependencyProperty CursorProperty = DependencyProperty.RegisterAttached("Cursor", typeof(CursorShape), typeof(FrameworkElementExtensions), new PropertyMetadata(CursorShape.Arrow, CursorChanged)); /// - /// Set the target . + /// Set the target . /// /// Object where the selector cursor type should be shown. /// Target cursor type value. @@ -49,7 +49,7 @@ public static void SetCursor(FrameworkElement element, CursorShape value) } /// - /// Get the current . + /// Get the current . /// /// Object where the selector cursor type should be shown. /// Cursor type set on target element. diff --git a/components/Extensions/src/Element/UIElementExtensions.cs b/components/Extensions/src/Element/UIElementExtensions.cs index f4c07c70..f6625fc9 100644 --- a/components/Extensions/src/Element/UIElementExtensions.cs +++ b/components/Extensions/src/Element/UIElementExtensions.cs @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI; /// -/// Provides attached dependency properties for the +/// Provides attached dependency properties for the /// public static class UIElementExtensions { diff --git a/components/Extensions/src/Markup/SymbolIconExtension.cs b/components/Extensions/src/Markup/SymbolIconExtension.cs index 79d03b94..3a33e533 100644 --- a/components/Extensions/src/Markup/SymbolIconExtension.cs +++ b/components/Extensions/src/Markup/SymbolIconExtension.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI; public class SymbolIconExtension : TextIconExtension { /// - /// Gets or sets the value representing the icon to display. + /// Gets or sets the value representing the icon to display. /// public Symbol Symbol { get; set; } diff --git a/components/Extensions/src/Markup/SymbolIconSourceExtension.cs b/components/Extensions/src/Markup/SymbolIconSourceExtension.cs index e2aa99ba..555db096 100644 --- a/components/Extensions/src/Markup/SymbolIconSourceExtension.cs +++ b/components/Extensions/src/Markup/SymbolIconSourceExtension.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI; public class SymbolIconSourceExtension : TextIconExtension { /// - /// Gets or sets the value representing the icon to display. + /// Gets or sets the value representing the icon to display. /// public Symbol Symbol { get; set; } diff --git a/components/Primitives/src/WrapPanel/StretchChild.cs b/components/Primitives/src/WrapPanel/StretchChild.cs index 754fa2ba..d078aaab 100644 --- a/components/Primitives/src/WrapPanel/StretchChild.cs +++ b/components/Primitives/src/WrapPanel/StretchChild.cs @@ -5,7 +5,7 @@ namespace CommunityToolkit.WinUI.Controls; /// -/// Options for how to calculate the layout of items. +/// Options for how to calculate the layout of items. /// public enum StretchChild { From f4980574b0be33ccfc85912fb2334dedd250a453 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 17 Aug 2023 12:10:46 -0500 Subject: [PATCH 19/22] Update tooling to latest main --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index fc7bd951..3e4623ec 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit fc7bd95174890c8abfe70f7da68542a14ddf2980 +Subproject commit 3e4623ecc9575eb60a7535aae61ea538cde83059 From f2d46f6f9bf1277fc59863007400a70cfd580bc4 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 17 Aug 2023 14:19:19 -0500 Subject: [PATCH 20/22] Suppress CS1587 --- .../src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs b/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs index dde31d2b..201a8865 100644 --- a/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs +++ b/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs @@ -19,6 +19,9 @@ public abstract class CustomAnimation : ImplicitAnimation public string? Target { get; set; } + +// Suppression required for net7-android. The #if compilation conditionals are preventing the compiler from interpreting it correctly. +#pragma warning disable CS1587 // XML comment is not placed on a valid language element /// /// Gets or sets the target framework layer for the animation. This is only supported /// for a set of animation types (see the docs for more on this). Furthermore, this is @@ -31,6 +34,7 @@ public abstract class CustomAnimation : ImplicitAnimation. /// public FrameworkLayer Layer { get; set; } = FrameworkLayer.Xaml; +#pragma warning restore CS1587 // XML comment is not placed on a valid language element #endif /// From dacdaf73513bce29de8ea569c1dd1f8f9eb33524 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 17 Aug 2023 14:42:50 -0500 Subject: [PATCH 21/22] Move platfiorm conditionals to using statements --- .../Animations/src/Enums/FrameworkLayer.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/components/Animations/src/Enums/FrameworkLayer.cs b/components/Animations/src/Enums/FrameworkLayer.cs index 0740b03a..108c2aa0 100644 --- a/components/Animations/src/Enums/FrameworkLayer.cs +++ b/components/Animations/src/Enums/FrameworkLayer.cs @@ -2,6 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if WINUI2 +using Composition = Windows.UI.Composition; +using Animation = Windows.UI.Xaml.Media.Animation; +#elif WINUI3 +using Composition = Microsoft.UI.Composition; +using Animation = Microsoft.UI.Xaml.Media.Animation; +#endif + namespace CommunityToolkit.WinUI.Animations; /// @@ -10,20 +18,12 @@ namespace CommunityToolkit.WinUI.Animations; public enum FrameworkLayer { /// -#if WINUI2 - /// Indicates the APIs. -#elif WINUI3 - /// Indicates the APIs. -#endif + /// Indicates the APIs. /// Composition, /// -#if WINUI2 - /// Indicates the APIs. -#elif WINUI3 - /// Indicates the APIs. -#endif + /// Indicates the APIs. /// Xaml } From 7328b98f3179584e36886896d24cdacc10d80731 Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Thu, 17 Aug 2023 13:50:39 -0700 Subject: [PATCH 22/22] Fix issue with XML comment for StackedNotificationsBehavior 2023-08-17T20:08:53.7233918Z 5>D:\a\Windows\Windows\components\Behaviors\src\Notification\StackedNotificationsBehavior.cs(16,70): error CS1574: XML comment has cref attribute 'InfoBar' that could not be resolved --- .../Behaviors/src/Notification/StackedNotificationsBehavior.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Behaviors/src/Notification/StackedNotificationsBehavior.cs b/components/Behaviors/src/Notification/StackedNotificationsBehavior.cs index 8b18a399..34c92d39 100644 --- a/components/Behaviors/src/Notification/StackedNotificationsBehavior.cs +++ b/components/Behaviors/src/Notification/StackedNotificationsBehavior.cs @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Behaviors; /// -/// A behavior to add the stacked notification support to . +/// A behavior to add the stacked notification support to . /// public class StackedNotificationsBehavior : BehaviorBase {