Skip to content

Commit

Permalink
Merge branch 'main' into tests/diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe authored Oct 3, 2024
2 parents 294457b + 5fd59df commit b588832
Show file tree
Hide file tree
Showing 35 changed files with 54 additions and 42 deletions.
7 changes: 2 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile

# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
# See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:8.0

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the main or release branches
push:
branches: [ main, 'rel/*' ]
branches: [ main, 'rel/*', 'dev/*' ]
pull_request:
branches: [ main ]
branches: [ main, 'dev/*' ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -269,9 +269,19 @@ jobs:
with:
vs-version: '[17.9,)'

- name: Define excluded MultiTargets (WinUI 2)
if: ${{ matrix.winui == '2' }}
run: |
echo "EXCLUDED_MULTITARGETS=wasdk" >> $env:GITHUB_ENV
- name: Define excluded MultiTargets (WinUI 3)
if: ${{ matrix.winui == '3' }}
run: |
echo "EXCLUDED_MULTITARGETS=uwp" >> $env:GITHUB_ENV
# Build and pack component nupkg
- name: Build and pack component packages
run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release
run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release

# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config)
- name: Push Pull Request Packages (if not fork)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class BooleanNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class BooleanNode : ExpressionNode
public sealed partial class BooleanNode : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="BooleanNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class ColorNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class ColorNode : ExpressionNode
public sealed partial class ColorNode : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="ColorNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class Matrix3x2Node. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class Matrix3x2Node : ExpressionNode
public sealed partial class Matrix3x2Node : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="Matrix3x2Node"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class QuaternionNode. This class cannot be inherited.
/// </summary>
/// <seealso cref=CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class QuaternionNode : ExpressionNode
public sealed partial class QuaternionNode : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="QuaternionNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class ScalarNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class ScalarNode : ExpressionNode
public sealed partial class ScalarNode : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="ScalarNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class Vector2Node. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class Vector2Node : ExpressionNode
public sealed partial class Vector2Node : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="Vector2Node"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class Vector3Node. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class Vector3Node : ExpressionNode
public sealed partial class Vector3Node : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="Vector3Node"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class Vector4Node. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ExpressionNode" />
public sealed class Vector4Node : ExpressionNode
public sealed partial class Vector4Node : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="Vector4Node"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class AmbientLightReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="ReferenceNode" />
public sealed class AmbientLightReferenceNode : ReferenceNode
public sealed partial class AmbientLightReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="AmbientLightReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class ColorBrushReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class ColorBrushReferenceNode : ReferenceNode
public sealed partial class ColorBrushReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="ColorBrushReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class DistantLightReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class DistantLightReferenceNode : ReferenceNode
public sealed partial class DistantLightReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="DistantLightReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class DropShadowReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class DropShadowReferenceNode : ReferenceNode
public sealed partial class DropShadowReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="DropShadowReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class InsetClipReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class InsetClipReferenceNode : ReferenceNode
public sealed partial class InsetClipReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="InsetClipReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class InteractionTrackerReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class InteractionTrackerReferenceNode : ReferenceNode
public sealed partial class InteractionTrackerReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="InteractionTrackerReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class ManipulationPropertySetReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.PropertySetReferenceNode" />
public sealed class ManipulationPropertySetReferenceNode : PropertySetReferenceNode
public sealed partial class ManipulationPropertySetReferenceNode : PropertySetReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="ManipulationPropertySetReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class NineGridBrushReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class NineGridBrushReferenceNode : ReferenceNode
public sealed partial class NineGridBrushReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="NineGridBrushReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class PointLightReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class PointLightReferenceNode : ReferenceNode
public sealed partial class PointLightReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="PointLightReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class PointerPositionPropertySetReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.PropertySetReferenceNode" />
public sealed class PointerPositionPropertySetReferenceNode : PropertySetReferenceNode
public sealed partial class PointerPositionPropertySetReferenceNode : PropertySetReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="PointerPositionPropertySetReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class PropertySetReferenceNode.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public class PropertySetReferenceNode : ReferenceNode
public partial class PropertySetReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="PropertySetReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class SpotLightReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class SpotLightReferenceNode : ReferenceNode
public sealed partial class SpotLightReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="SpotLightReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class SurfaceBrushReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class SurfaceBrushReferenceNode : ReferenceNode
public sealed partial class SurfaceBrushReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="SurfaceBrushReferenceNode"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Animations.Expressions;
/// Class VisualReferenceNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="CommunityToolkit.WinUI.Animations.Expressions.ReferenceNode" />
public sealed class VisualReferenceNode : ReferenceNode
public sealed partial class VisualReferenceNode : ReferenceNode
{
/// <summary>
/// Initializes a new instance of the <see cref="VisualReferenceNode" /> class.
Expand Down
2 changes: 1 addition & 1 deletion components/Behaviors/src/FocusTargetList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ namespace CommunityToolkit.WinUI.Behaviors;
/// <summary>
/// A collection of <see cref="FocusTarget"/>.
/// </summary>
public sealed class FocusTargetList : List<FocusTarget>
public sealed partial class FocusTargetList : List<FocusTarget>
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public IDisposable DeferRefresh()
/// Notification deferrer helper class
/// </summary>
#pragma warning disable CA1063 // Implement IDisposable Correctly
public class NotificationDeferrer : IDisposable
public partial class NotificationDeferrer : IDisposable
#pragma warning restore CA1063 // Implement IDisposable Correctly
{
private readonly AdvancedCollectionView _acvs;
Expand Down
2 changes: 1 addition & 1 deletion components/Helpers/src/CameraHelper/CameraHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Helpers;
/// Make sure you have the capability webcam enabled for your app to access the device's camera.
/// </summary>
#pragma warning disable CA1063 // Implement IDisposable Correctly
public class CameraHelper : IDisposable
public partial class CameraHelper : IDisposable
{
private static IReadOnlyList<MediaFrameSourceGroup>? _frameSourceGroups;
#pragma warning disable CA2213 // Disposable fields should be disposed
Expand Down
2 changes: 1 addition & 1 deletion components/Helpers/src/ThemeListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace CommunityToolkit.WinUI.Helpers;
/// and Signals an Event when they occur.
/// </summary>
[AllowForWeb]
public sealed class ThemeListener : IDisposable
public sealed partial class ThemeListener : IDisposable
{
/// <summary>
/// Gets the Name of the Current Theme.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ namespace CommunityToolkit.WinUI.Media;
/// An <see langword="async"/> <see cref="AsyncMutex"/> implementation that can be easily used inside a <see langword="using"/> block
/// </summary>
#pragma warning disable CA1001 // Types that own disposable fields should be disposable
#pragma warning disable CsWinRT1028 // Partial not required for types never passed to native WinRT method.
internal sealed class AsyncMutex
#pragma warning restore CsWinRT1028
#pragma warning restore CA1001 // Types that own disposable fields should be disposable
{
/// <summary>
Expand All @@ -32,7 +34,9 @@ public async Task<IDisposable> LockAsync()
/// <summary>
/// Private class that implements the automatic release of the semaphore
/// </summary>
#pragma warning disable CsWinRT1028 // Partial not required for types never passed to native WinRT method.
private sealed class Lock : IDisposable
#pragma warning restore CsWinRT1028
{
/// <summary>
/// The <see cref="SemaphoreSlim"/> instance of the parent class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace CommunityToolkit.WinUI.Controls;

[DebuggerDisplay("Count = {Count}, Height = {Height}")]
internal class StaggeredColumnLayout : List<StaggeredItem>
internal partial class StaggeredColumnLayout : List<StaggeredItem>
{
public double Height { get; private set; }

Expand Down
7 changes: 4 additions & 3 deletions components/RangeSelector/src/RangeSelector.Input.Drag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private double DragThumb(Thumb? thumb, double min, double max, double nextPos)

Canvas.SetLeft(thumb, nextPos);

if (_toolTipText != null && _toolTip != null && thumb != null)
if (_toolTip != null && thumb != null)
{
var thumbCenter = nextPos + (thumb.Width / 2);
_toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
Expand All @@ -99,15 +99,16 @@ private void Thumb_DragStarted(Thumb thumb)
Canvas.SetZIndex(otherThumb, 0);
_oldValue = RangeStart;

if (_toolTipText != null && _toolTip != null)
if (_toolTip != null)
{
_toolTip.Visibility = Visibility.Visible;
var thumbCenter = _absolutePosition + (thumb.Width / 2);
_toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
var ttWidth = _toolTip.ActualWidth / 2;
Canvas.SetLeft(_toolTip, thumbCenter - ttWidth);

UpdateToolTipText(this, _toolTipText, useMin ? RangeStart : RangeEnd);
if (_toolTipText != null)
UpdateToolTipText(this, _toolTipText, useMin ? RangeStart : RangeEnd);
}

VisualStateManager.GoToState(this, useMin ? MinPressedState : MaxPressedState, true);
Expand Down
2 changes: 1 addition & 1 deletion components/RichSuggestBox/src/RichSuggestToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Controls;
/// <summary>
/// RichSuggestToken describes a suggestion token in the document.
/// </summary>
public class RichSuggestToken : INotifyPropertyChanged
public partial class RichSuggestToken : INotifyPropertyChanged
{
/// <inheritdoc/>
public event PropertyChangedEventHandler? PropertyChanged;
Expand Down
2 changes: 1 addition & 1 deletion components/SettingsControls/src/Helpers/StyleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI.Controls;
public static partial class StyleExtensions
{
// Used to distinct normal ResourceDictionary and the one we add.
private sealed class StyleExtensionResourceDictionary : ResourceDictionary
private sealed partial class StyleExtensionResourceDictionary : ResourceDictionary
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Controls;
#pragma warning disable CS8622
#pragma warning disable CS8603
#pragma warning disable CS8714
internal class InterspersedObservableCollection : IList, IEnumerable<object>, INotifyCollectionChanged
internal partial class InterspersedObservableCollection : IList, IEnumerable<object>, INotifyCollectionChanged
{
public IList ItemsSource { get; private set; }

Expand Down

0 comments on commit b588832

Please sign in to comment.