-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show release notes after installing update #137
Conversation
WalkthroughThis pull request enhances the application’s update process by integrating a new release notes feature. On startup, the application checks for a “--isUpdated” flag and, if present, retrieves the current release notes via a locator, displaying them in a new dialog. The changes introduce additional dependency injection registrations, a factory method for creating the dialog, modifications to the profile view for interactivity, and an updated updater process. A new markdown rendering package is also added to support markdown display in the dialog. Changes
Sequence Diagram(s)sequenceDiagram
participant ClientUpdater
participant App
participant WindowFactory
participant Dialog as ReleaseNotesDialog
participant VM as ReleaseNotesDialogViewModel
participant User
ClientUpdater->>App: Restart with "--isUpdated"
App->>WindowFactory: CreateReleaseNotesDialog()
WindowFactory->>Dialog: Instantiate with VM
Dialog->>VM: Bind release notes (via VelopackLocator)
Dialog->>User: Display release notes dialog
User-->>Dialog: Close dialog event
sequenceDiagram
participant User
participant ProfileDialog as ProfileListDialog
participant PLViewModel as ProfileListViewModel
participant WindowFactory
participant Dialog as ReleaseNotesDialog
participant VM as ReleaseNotesDialogViewModel
User->>ProfileDialog: Click version text
ProfileDialog->>PLViewModel: Trigger OpenReleaseNotesCommand
PLViewModel->>WindowFactory: CreateReleaseNotesDialog()
WindowFactory->>Dialog: Instantiate with VM
Dialog->>User: Display release notes dialog
User-->>Dialog: Close dialog event
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (5)
vATIS.Desktop/Ui/ViewModels/ReleaseNotesDialogViewModel.cs (2)
1-1
: Add file header with copyright information.Add the standard copyright header to maintain consistency with other files in the codebase.
+// <copyright file="ReleaseNotesDialogViewModel.cs" company="Justin Shannon"> +// Copyright (c) Justin Shannon. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// </copyright> + using ReactiveUI;🧰 Tools
🪛 GitHub Check: Analyze (cpp)
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)🪛 GitHub Check: Analyze (csharp)
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
16-18
: Consider initializing ReleaseNotes in constructor.The empty constructor might benefit from initializing the
ReleaseNotes
property, especially if there's a default or placeholder text to show while loading.vATIS.Desktop/Ui/Dialogs/ReleaseNotesDialog.axaml (1)
11-14
: Consider making the window resizable.The fixed window size (600x500) might not accommodate all release notes content effectively. Long release notes might be difficult to read in a fixed viewport.
- Width="600" Height="500" - CanResize="False" + Width="600" Height="500" + MinWidth="400" MinHeight="300" + CanResize="True"vATIS.Desktop/Updates/ClientUpdater.cs (1)
68-69
: Extract "--isUpdated" flag as a constant.Consider extracting the "--isUpdated" flag as a constant to maintain consistency and ease future updates.
+ private const string IsUpdatedFlag = "--isUpdated"; + public async Task<bool> Run() { // ... existing code ... await _updateManager.WaitExitThenApplyUpdatesAsync(_updateInfo, silent: true, - restartArgs: ["--isUpdated"]); + restartArgs: [IsUpdatedFlag]);vATIS.Desktop/Ui/Profiles/ProfileListDialog.axaml (1)
75-81
: Consider adding a tooltip for better UX.The interactive version text block is well-implemented. Consider adding a tooltip to indicate that clicking will show release notes.
-<TextBlock Name="Version" Foreground="White" Text="{Binding ClientVersion, DataType=vm:ProfileListViewModel}" Margin="5,3" TextAlignment="Center" VerticalAlignment="Center" Cursor="Hand"> +<TextBlock Name="Version" Foreground="White" Text="{Binding ClientVersion, DataType=vm:ProfileListViewModel}" Margin="5,3" TextAlignment="Center" VerticalAlignment="Center" Cursor="Hand" ToolTip="Click to view release notes">
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
vATIS.Desktop/App.axaml.cs
(3 hunks)vATIS.Desktop/Container/Factory/WindowFactory.cs
(1 hunks)vATIS.Desktop/Container/ServiceProvider.cs
(2 hunks)vATIS.Desktop/Ui/Dialogs/ReleaseNotesDialog.axaml
(1 hunks)vATIS.Desktop/Ui/Dialogs/ReleaseNotesDialog.axaml.cs
(1 hunks)vATIS.Desktop/Ui/IWindowFactory.cs
(1 hunks)vATIS.Desktop/Ui/Profiles/ProfileListDialog.axaml
(1 hunks)vATIS.Desktop/Ui/ViewModels/ProfileListViewModel.cs
(7 hunks)vATIS.Desktop/Ui/ViewModels/ReleaseNotesDialogViewModel.cs
(1 hunks)vATIS.Desktop/Updates/ClientUpdater.cs
(1 hunks)vATIS.Desktop/vATIS.Desktop.csproj
(1 hunks)
🧰 Additional context used
🪛 GitHub Check: Analyze (cpp)
vATIS.Desktop/Ui/ViewModels/ReleaseNotesDialogViewModel.cs
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
🪛 GitHub Check: Analyze (csharp)
vATIS.Desktop/Ui/ViewModels/ReleaseNotesDialogViewModel.cs
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
[warning] 1-1:
A source file is missing a required header. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0073)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: build (macos-latest)
- GitHub Check: build (windows-latest)
- GitHub Check: Analyze (cpp)
- GitHub Check: Analyze (csharp)
- GitHub Check: build (ubuntu-latest)
🔇 Additional comments (13)
vATIS.Desktop/Ui/Dialogs/ReleaseNotesDialog.axaml.cs (1)
15-25
: LGTM! Clean implementation of the release notes dialog.The dialog implementation follows best practices with proper initialization and view model binding.
vATIS.Desktop/Ui/IWindowFactory.cs (1)
101-105
: LGTM!The new method follows the established pattern and is well-documented.
vATIS.Desktop/Container/ServiceProvider.cs (1)
75-75
: LGTM!The new services are correctly registered as transient and follow the established pattern.
Also applies to: 100-100
vATIS.Desktop/Container/Factory/WindowFactory.cs (1)
200-208
: LGTM!The implementation follows the established factory pattern and correctly initializes the dialog with its view model.
vATIS.Desktop/App.axaml.cs (2)
21-21
: LGTM!The new using directives are correctly added to support the release notes functionality.
Also applies to: 33-33, 39-39
21-21
: LGTM!The new using directives are correctly added for the required functionality.
Also applies to: 33-33
vATIS.Desktop/Ui/ViewModels/ProfileListViewModel.cs (5)
22-22
: LGTM!The new using directives are correctly added to support the release notes functionality.
Also applies to: 32-32
142-145
: LGTM!The command property is well-documented and properly exposed.
220-220
: LGTM!The new command is properly disposed.
22-22
: LGTM!The new using directives are correctly added for the required functionality.
Also applies to: 32-32
142-145
: LGTM!The command is properly documented and follows the established pattern.
vATIS.Desktop/vATIS.Desktop.csproj (2)
64-64
:❓ Verification inconclusive
Verify the stability of the alpha version package.
The package reference uses an alpha version (11.0.3-a1). Please verify if this version is stable enough for production use or if a stable version is available.
🌐 Web query:
What is the latest stable version of Markdown.Avalonia?
💡 Result:
The latest stable version of Markdown.Avalonia is 11.0.2, released on September 3, 2023[2][4]. This version supports .NET frameworks including .NETCoreApp 2.0, .NETFramework 4.6.1, .NETStandard 2.0, and net6.0[2][4].
While newer prerelease versions like 11.0.3-a1 exist (released March 17, 2024)[5][7], these are marked as development builds and not considered stable releases[2][4][7]. The compatibility table shows that version 11.0.x aligns with Avalonia UI 11.x series[1], which itself follows a quarterly release cycle[6].
Citations:
- 1: https://github.com/whistyun/Markdown.Avalonia
- 2: https://www.nuget.org/packages/Markdown.Avalonia.Tight/
- 3: https://github.com/AvaloniaUI/Avalonia/releases
- 4: https://www.nuget.org/packages/Markdown.Avalonia/
- 5: https://nugetprodusnc-northcentralus-01.regional.azure-api.net/packages/Markdown.Avalonia.Svg/11.0.3-a1
- 6: https://docs.avaloniaui.net/docs/stay-up-to-date/release-notes
- 7: https://github.com/whistyun/Markdown.Avalonia/releases
- 8: https://docs.avaloniaui.net/docs/welcome
- 9: https://www.nuget.org/packages/Markdown.Avalonia/0.10.2
- 10: https://debricked.com/select/package/nuget-MessageBox.Avalonia.Markdown
Stability of Markdown.Avalonia Package
- The project currently references the alpha release version 11.0.3-a1.
- A web query confirms that the latest stable version is 11.0.2 (released September 3, 2023).
- Please verify if the alpha release is intentionally used for testing new features or if production stability is paramount. If stability is required, consider updating the package reference in vATIS.Desktop/vATIS.Desktop.csproj (line 64) to version 11.0.2.
64-64
:❓ Verification inconclusive
Verify the stability of the alpha version package.
The package
Markdown.Avalonia
is using an alpha version (11.0.3-a1). While this version may work, it could have stability issues.
🌐 Web query:
What is the latest stable version of Markdown.Avalonia?
💡 Result:
The latest stable version of Markdown.Avalonia is 11.0.2, released on September 3, 2023[2][4]. This version remains the most recent non-prerelease package as of February 2025, with subsequent updates like 11.0.3-a1 (March 2024) being prerelease candidates[7].
Key details:
Compatible with .NET 6+ and Avalonia UI 11.x[1][4]
Available as two NuGet packages:
Package Features Version Markdown.Avalonia
Includes syntax highlighting via AvaloniaEdit 11.0.2[4] Markdown.Avalonia.Tight
Lightweight version without syntax highlighting 11.0.2[2] Developers should use these packages unless specifically needing experimental features from prerelease versions like 11.0.3-a1[7].
Citations:
- 1: https://github.com/whistyun/Markdown.Avalonia
- 2: https://www.nuget.org/packages/Markdown.Avalonia.Tight/
- 3: https://github.com/AvaloniaUI/Avalonia/releases
- 4: https://www.nuget.org/packages/Markdown.Avalonia/
- 5: https://nugetprodusnc-northcentralus-01.regional.azure-api.net/packages/Markdown.Avalonia.Svg/11.0.3-a1
- 6: https://docs.avaloniaui.net/docs/stay-up-to-date/release-notes
- 7: https://github.com/whistyun/Markdown.Avalonia/releases
- 8: https://debricked.com/select/package/nuget-MessageBox.Avalonia.Markdown
- 9: https://www.nuget.org/packages/Markdown.Avalonia/0.10.2
- 10: https://avaloniaui.net
Subject: Evaluate Markdown.Avalonia Package Version Stability
- File:
vATIS.Desktop/vATIS.Desktop.csproj
(Line 64)- Current Reference:
<PackageReference Include="Markdown.Avalonia" Version="11.0.3-a1" />- Context: The alpha version (11.0.3-a1) is currently in use, but the latest stable version available is 11.0.2 (released on September 3, 2023). Alpha releases may introduce instability.
- Action: Please verify if any experimental features in the alpha version are necessary. If stable behavior is preferred, consider switching to 11.0.2 to ensure reliability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
vATIS.Desktop/Ui/Profiles/ProfileListDialog.axaml (1)
75-81
: LGTM! Consider enhancing keyboard accessibility.The implementation follows UI/UX best practices with clear visual feedback (hand cursor) and user guidance (tooltip). The MVVM pattern is properly followed with the command binding.
Consider adding keyboard accessibility by:
- Making the TextBlock focusable
- Adding keyboard event handling
<TextBlock Name="Version" Foreground="White" Text="{Binding ClientVersion, DataType=vm:ProfileListViewModel}" Margin="5,3" TextAlignment="Center" VerticalAlignment="Center" Cursor="Hand" + Focusable="True" + KeyboardNavigation.TabIndex="0" ToolTip.Tip="Click to view release notes"> <Interaction.Behaviors> <RoutedEventTriggerBehavior RoutedEvent="{x:Static InputElement.PointerPressedEvent}" SourceInteractive="Version"> <InvokeCommandAction Command="{Binding OpenReleaseNotesCommand, DataType=vm:ProfileListViewModel}"/> </RoutedEventTriggerBehavior> + <RoutedEventTriggerBehavior RoutedEvent="{x:Static InputElement.KeyDownEvent}" SourceInteractive="Version"> + <InvokeCommandAction Command="{Binding OpenReleaseNotesCommand, DataType=vm:ProfileListViewModel}"> + <InvokeCommandAction.EventArgsConverter> + <KeyEventArgsConverter Key="Enter,Space"/> + </InvokeCommandAction.EventArgsConverter> + </InvokeCommandAction> + </RoutedEventTriggerBehavior> </Interaction.Behaviors> </TextBlock>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
vATIS.Desktop/App.axaml.cs
(3 hunks)vATIS.Desktop/Ui/Profiles/ProfileListDialog.axaml
(1 hunks)vATIS.Desktop/Ui/ViewModels/ProfileListViewModel.cs
(7 hunks)vATIS.Desktop/Ui/ViewModels/ReleaseNotesDialogViewModel.cs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- vATIS.Desktop/App.axaml.cs
- vATIS.Desktop/Ui/ViewModels/ReleaseNotesDialogViewModel.cs
- vATIS.Desktop/Ui/ViewModels/ProfileListViewModel.cs
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: build (macos-latest)
- GitHub Check: build (windows-latest)
- GitHub Check: build (ubuntu-latest)
- GitHub Check: Analyze (cpp)
- GitHub Check: Analyze (csharp)
- GitHub Check: Analyze (cpp)
- GitHub Check: Analyze (csharp)
Summary by CodeRabbit