This repository was archived by the owner on Nov 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
WIP: .NET 10 Updates #52
Draft
matt-goldman
wants to merge
26
commits into
main
Choose a base branch
from
net10
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Removed the Resolver and StartupExtensions classes from the Maui.Plugins.PageResolver namespace and integrated them into the Plugin.Maui.SmartNavigation namespace. - Introduced new attributes: IgnoreAttribute, NoAutoDependenciesAttribute, SingletonAttribute, and TransientAttribute for better dependency management. - Implemented MopupExtensions for enhanced popup navigation capabilities. - Added source generators for automatic dependency registration and view model mapping. - Created MarkupExtensions for resolving view models directly in XAML. - Enhanced NavigationExtensions to support both parameterless and parameterized navigation. - Established a new project structure with appropriate project files and dependencies. - Updated Directory.Build.props and Directory.Packages.props for centralized package management.
Updated `Plugin.Maui.SmartNavigation.MopupsExtensions.csproj` to: - Conditionally include `Plugin.Maui.SmartNavigation` package in `Release`. - Add `ProjectReference` to `Plugin.Maui.SmartNavigation.csproj` in `Debug`. - Add `PackageReference` for `Microsoft.Maui.Controls`. Updated `Plugin.Maui.SmartNavigation.csproj` to: - Add `PackageReference` for `Microsoft.Maui.Controls` to ensure explicit dependency.
Refactored the `AutoDependencies` source generator to use `IIncrementalGenerator` for improved performance and modern Roslyn practices. Introduced `UseAutoDependenciesAttribute` to replace `NoAutoDependenciesAttribute` for marking classes for auto-dependency registration. Updated `MauiProgram` to use the new attribute. Replaced the `_dependencies` field with a local `dependencies` dictionary, improving code clarity and reducing reliance on class-level state. Enhanced error handling and logging for better diagnostics. Updated source generation logic to use the new `dependencies` dictionary, supporting automatic registration of pages, view models, and services with appropriate lifetimes (`Singleton` or `Transient`). Removed redundant code, including `NoAutoDependenciesAttribute` and the old `Initialize` method. Improved attribute handling with null-safe checks and replaced hardcoded strings with robust logic. General code cleanup for better readability and maintainability.
The `Plugin.Maui.SmartNavigation` package version was downgraded from `2.5.4` to `0.0.1-preview1` in the `Directory.Packages.props` file. This change transitions the project to a preview version, possibly for testing or compatibility purposes.
- Enforced block-scoped namespaces in `.editorconfig`. - Added `LangVersion` preview for partial properties in `DemoProject.csproj`. - Refactored `BaseViewModel` and derived view models: - Introduced `partial` classes and nullable auto-properties. - Replaced `ICommand` with `[RelayCommand]` attributes. - Updated namespaces for consistency (`Plugin.Maui.SmartNavigation.Extensions`). - Added `INavigationManager` interface and `NavigationManager` class. - Refactored `Resolver` to use private fields and improve null safety. - Reformatted `Plugin.Maui.SmartNavigation.csproj` and added `SourceGenerators` DLL. - Updated solution structure in `Plugin.Maui.SmartNavigation.slnx`.
…0 milestone roadmap documentation
- Added `.vscode/settings.json` to `.gitignore` to exclude VS Code settings from version control. - Marked Issue #3 as completed in `net10-milestone.md` and updated its priority, estimate, and sprint plan. - Removed `SmartBackAsync` and `wrapInNav` parameter from `PushModalAsync` to simplify the API. - Added XML documentation to `INavigationManager.cs` for improved clarity. - Implemented priority-based navigation in `GoBackAsync` and enhanced exception handling in `GoToAsync`. - Streamlined the navigation API to align with project goals of simplicity, testability, and framework-agnostic design. - Improved code readability and maintainability across the navigation manager.
Removed `IRouteRegistry` interface, simplifying route management. Added `RouteKind` enum to categorize navigation routes. Enhanced `Route` record with improved `Build` methods: - Supports query strings and dictionary-based parameters. - Constructs URLs with optional query parameters. Added XML documentation for improved code clarity. Shifted to a more self-contained and extensible routing design.
…le, and error handling (#73) * Initial plan * Add comprehensive integration tests with 84 passing tests Co-authored-by: matt-goldman <[email protected]> * Add comprehensive test summary document Co-authored-by: matt-goldman <[email protected]> * Replace FluentAssertions with Shouldly in all tests Co-authored-by: matt-goldman <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: matt-goldman <[email protected]>
- Added `InternalsVisibleTo` for `IntegrationTests` in the project file. - Enhanced `IntegrationTestBase` with methods to initialize MAUI apps. - Introduced `TestMauiProgram` for test-specific MAUI app configuration. - Added `MockApplication` to support headless testing scenarios. - Documented testing patterns and limitations in `TESTING_PATTERN.md`. - Improved test cleanup documentation in `TEST_CLEANUP_SUMMARY.md`. - Refactored `ErrorHandlingTests`, `GoBackAsyncTests`, and `ShellNavigationTests`: - Removed invalid tests and mock-based setups. - Focused on testing navigation logic and route building. - Added `TestNavigation` to simulate `INavigation` behavior. - Ensured no production code changes were made to accommodate tests.
…me (#74) * Initial plan * Update README with SmartNavigation rename and new features Co-authored-by: matt-goldman <[email protected]> * Add NavigationManager and Lifecycle demo to showcase new features Co-authored-by: matt-goldman <[email protected]> * Update NuGet package description with new features Co-authored-by: matt-goldman <[email protected]> * Fix typo: aggreagate -> aggregate Co-authored-by: matt-goldman <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: matt-goldman <[email protected]>
Added `DemoProject.csproj` to the solution. Updated XAML files to improve data binding, remove redundancy, and enhance user experience. Refactored `NavigationManagerDemoPage` to include a warning label for Android users and updated its `BindingContext` initialization. Refactored `NavigationManagerDemoViewModel` to use constructor injection for dependencies, made properties public, and simplified navigation commands. Updated `MarkupViewModel` to make the `Name` property public. Replaced `UsePageResolver` with `UseSmartNavigation` in `AutoDependencies.cs`. Refactored `NavigationManager` to improve encapsulation, handle navigation stack edge cases, and support argument-based navigation. Improved code maintainability, dependency injection, and alignment with modern MVVM practices.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This release is a comprehensive update and includes some breaking changes. As mentioned previously, the minimum version will increase to .NET 10 in keeping with .NET LTS releases. Additionally two breaking changes are included:
Plugin.Maui.SmartNavigation. This is for a few reasons: it is aligned with plugin naming in the .NET MAUI ecosystem, and is more aligned with what the library actually does, providing better clarity and discoverability for users.Aside from that, there are QoL improvements, both to the code and to the library from a consumer perspective.
Routerecord typeINavigationManagerservice (but you can still do it yourself as in previous versions)