From e6d22aae9224ca4c4fee62d8d3256f738b80b8ae Mon Sep 17 00:00:00 2001 From: Alexander Marek Date: Fri, 17 Jan 2025 14:28:16 +0100 Subject: [PATCH 1/3] #69 - fixed NullReferenceException in Page.OnLoaded to support avalonia previewers (Visual Studio and Rider) --- src/AvaloniaInside.Shell/Page.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AvaloniaInside.Shell/Page.cs b/src/AvaloniaInside.Shell/Page.cs index 682f3d9..117961f 100644 --- a/src/AvaloniaInside.Shell/Page.cs +++ b/src/AvaloniaInside.Shell/Page.cs @@ -307,6 +307,10 @@ protected override void OnLoaded(RoutedEventArgs e) this[!ApplyLeftSafePaddingProperty] = this[!ShellView.EnableSafeAreaForLeftProperty]; this[!ApplyRightSafePaddingProperty] = this[!ShellView.ApplyRightSafePaddingProperty]; + // allow previewer to display page-based views + if (Design.IsDesignMode && Chain is null) + return; + IsModal = Chain.Type == NavigateType.Modal; } From 995752badb6eb415d6c57e4d15102bc6ece1a552 Mon Sep 17 00:00:00 2001 From: Alexander Marek Date: Sat, 8 Mar 2025 17:34:32 +0100 Subject: [PATCH 2/3] - NavigateResult is now testable (#72) Co-authored-by: alexander.marek --- src/AvaloniaInside.Shell/NavigateResult.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/AvaloniaInside.Shell/NavigateResult.cs b/src/AvaloniaInside.Shell/NavigateResult.cs index 886ae9c..8f55fec 100644 --- a/src/AvaloniaInside.Shell/NavigateResult.cs +++ b/src/AvaloniaInside.Shell/NavigateResult.cs @@ -12,4 +12,10 @@ internal NavigateResult(bool hasArgument, object? argument) public object? Argument { get; } public T? As() => HasArgument && Argument is T argument ? argument : default; + + public static NavigateResult FromResult(T argument) => new(true, argument); + + public static readonly NavigateResult Completed = new NavigateResult(false, null); } + + From d33d2f31bc42c90bd6d300c09ebddbcd8e8a5093 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Sat, 8 Mar 2025 17:55:47 +0100 Subject: [PATCH 3/3] prepare release 1.3.1 (#73) --- .github/workflows/dotnet.yml | 11 ++++++++++- src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj | 4 ++-- src/AvaloniaInside.Shell/NavigateResult.cs | 6 ++---- src/Directory.Build.props | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1b33977..2e2092d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 9.0.x #- name: Install workloads # run: dotnet workload install android ios maccatalyst tvos macos maui wasm-tools - name: Restore dependencies @@ -30,3 +30,12 @@ jobs: working-directory: src/AvaloniaInside.Shell #- name: Test # run: dotnet test --no-build --verbosity normal + + # push nugget package to github if push to main branch + - name: Push NuGet package + if: github.ref == 'refs/heads/main' + uses: softprops/action-gh-release@v1 + with: + files: src/AvaloniaInside.Shell/bin/Release/AvaloniaInside.Shell.*.nupkg + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj b/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj index ffb01a1..2750b60 100644 --- a/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj +++ b/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj @@ -1,9 +1,9 @@ - net6.0;net8.0 + net8.0;net9.0 enable latest - 1.3.0 + 1.3.1 Shell view for Avalonia Shell reduces the complexity of mobile/desktop application development by providing the fundamental features that most applications require AvaloniaInside diff --git a/src/AvaloniaInside.Shell/NavigateResult.cs b/src/AvaloniaInside.Shell/NavigateResult.cs index 8f55fec..316d98a 100644 --- a/src/AvaloniaInside.Shell/NavigateResult.cs +++ b/src/AvaloniaInside.Shell/NavigateResult.cs @@ -12,10 +12,8 @@ internal NavigateResult(bool hasArgument, object? argument) public object? Argument { get; } public T? As() => HasArgument && Argument is T argument ? argument : default; - - public static NavigateResult FromResult(T argument) => new(true, argument); + + public static NavigateResult FromResult(T argument) => new(true, argument); public static readonly NavigateResult Completed = new NavigateResult(false, null); } - - diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 139f166..56f6c64 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,5 +1,5 @@ - 11.2.3 + 11.2.5