-
Notifications
You must be signed in to change notification settings - Fork 772
556 compatibility inquiry avaloniaui #851
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
Conversation
…indowmanager Expose ShowDialogAsync in IWindowManager.
Handle application lifetime events.
…a_11 Update to Avalonia 11.0.0-preview5.
5.0.31-beta # Conflicts: # src/Caliburn.Micro.Platform/Caliburn.Micro.Platform.csproj
rolled back some changes in viewmodellocator add NameFormat validation to viewLocator
Added logging statements to various methods in `Screen.cs`, `ActionMessage.cs`, `NavigationFrame.cs`, and `View.cs` to log lifecycle events, execution context, content changes, layout updates, and errors. Moved `elementToUse` assignment in `ActionMessage.cs` for correct usage. Changed `NavigationFrame` to inherit from `ContentControl` instead of `TransitioningContentControl`. Updated `ExecuteOnLoad` method in `View.cs` to use `Loaded` event for Avalonia. Modified equality checks in `OnModelChanged` and `OnContextChanged` methods in `View.cs` to use `==` instead of `.Equals`. Refactored `SetContentPropertyCore` method in `View.cs` for readability and added exception logging. Added new method `GetContentPropertyName` in `View.cs` for retrieving content property name with improved formatting.
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs
Fixed
Show fixed
Hide fixed
Updated Avalonia-related package references in `Caliburn.Micro.Avalonia.csproj` from version `11.2.0` to `11.2.2`. Removed unnecessary `using` directives for `Avalonia` and `Avalonia.Controls` in `NavigationFrame.cs`. Simplified the condition in `NavigationFrame_TransitionCompleted` method to use `object.ReferenceEquals(e.To, e.From)`.
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs
Fixed
Show fixed
Hide fixed
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.
Copilot reviewed 150 out of 165 changed files in this pull request and generated 2 comments.
Files not reviewed (15)
- samples/features/Features.Avalonia/App.axaml: Language not supported
- samples/features/Features.Avalonia/Features.Avalonia.csproj: Language not supported
- samples/features/Features.Avalonia/Views/ActionsView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/BindingsView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/BubblingView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/ConductorView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/ConductorView.axaml.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Views/BubblingView.axaml.cs: Evaluated as low risk
- samples/features/Features.Avalonia/TaskHelper.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Lipsum.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Bootstrapper.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Views/BindingsView.axaml.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Results/ResultBase.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Results/VisualStateResult.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Views/ActionsView.axaml.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
samples/features/Features.Avalonia/Program.cs:10
- [nitpick] The comment on line 10 is informal and unclear. Consider rephrasing it to: 'Initialization code. Avoid using Avalonia, third-party APIs, or any SynchronizationContext-reliant code before AppMain is called, as things aren't initialized yet and may break.'
// Initialization code. Don't use any Avalonia, third-party APIs or any
samples/features/Features.Avalonia/Results/MessageDialogResult.cs
Outdated
Show resolved
Hide resolved
samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs
Outdated
Show resolved
Hide resolved
Enhanced null safety in NavigationFrame.cs by using the null-conditional operator for DataContext access. Simplified type casting in View.cs by directly checking the IsLoaded property of FrameworkElement.
Modified `MessageDialogResult.cs` to use variables `title` and `content` instead of hardcoded strings in `GetMessageBoxStandard` method. Renamed `OnInitializeAsync` to `OnInitializedAsync` in `ShellViewModel.cs` and updated the base method call accordingly. Changed instance retrieval in `GoHome` method of `ShellViewModel.cs` to use `_container.GetInstance<MenuViewModel>()` instead of `IoC.GetInstance`.
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.
Copilot reviewed 150 out of 165 changed files in this pull request and generated no comments.
Files not reviewed (15)
- samples/features/Features.Avalonia/App.axaml: Language not supported
- samples/features/Features.Avalonia/Features.Avalonia.csproj: Language not supported
- samples/features/Features.Avalonia/Views/ActionsView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/BindingsView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/BubblingView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/ConductorView.axaml: Language not supported
- samples/features/Features.Avalonia/App.axaml.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Bootstrapper.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Lipsum.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Messages/SimpleMessage.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Program.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Results/MessageDialogResult.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Results/ResultBase.cs: Evaluated as low risk
- samples/features/Features.Avalonia/Results/VisualStateResult.cs: Evaluated as low risk
- samples/features/Features.Avalonia/TaskHelper.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)
samples/features/Features.Avalonia/Views/ActionsView.axaml.cs:0
- Ensure that the new behavior introduced by the ActionsView class is covered by tests.
namespace Features.CrossPlatform.Views
samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs:43
- The cast to INavigationService should be checked for null to avoid potential runtime errors. Consider adding a null check after the cast.
_navigationService = frame as INavigationService;
samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs:32
- Ensure that the GoHome method is covered by tests, as it contains logic that navigates to a view model.
public void GoHome()
Add Avalonia ui support