Skip to content
This repository was archived by the owner on Nov 8, 2025. It is now read-only.

Conversation

@matt-goldman
Copy link
Owner

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:

  1. The library is getting renamed to 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.
  2. The source generator is now opt-in rather than opt-out. This was probably a design decision that should have been taken earlier, but as this is a major version update, it's a good time to introduce breaking changes.

Aside from that, there are QoL improvements, both to the code and to the library from a consumer perspective.

  • Adds modular, type safe routing with a new Route record type
  • Includes a custom DI friendly INavigationManager service (but you can still do it yourself as in previous versions)
  • Adds async ViewModel initialization and base pages and ViewModels (completely optional)
  • Additional analysers to help enforce strong navigation

- 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`.
@matt-goldman matt-goldman added this to the .NET 10 milestone Nov 1, 2025
matt-goldman and others added 11 commits November 5, 2025 07:32
- 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.
Copilot AI and others added 5 commits November 7, 2025 16:28
…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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants