-
Notifications
You must be signed in to change notification settings - Fork 3
Enhances numeric input & upgrades to .NET 10 #112
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
base: develop
Are you sure you want to change the base?
Conversation
Updates the project to target .NET 10.0 and its corresponding platform-specific targets. Significant changes: * Upgrades target frameworks to .NET 10.0 in the test application and the main library project. * Bumps package versions for several dependencies including ReactiveUI, CommunityToolkit, and Microsoft.Maui.Controls. * Updates references to platform-specific keyboard handling. * Removes unused files. * Changes event arguments from `NullableDateChangedEventArgs` to `DateChangedEventArgs`. * Adds the SourceGen inflator for XAML.
Updates the .NET runtime version used in the NuGet build workflows. Significant changes: * Changed the DotnetVersion environment variable in the beta and prod workflows. * The updated version is 10.0.1.
Updates the .NET runtime version used in the NuGet build workflows for both beta and production releases. Significant changes: * Changed the DotnetVersion environment variable in the workflow files.
Introduces a powerful suite of numeric value converters and utilities to enhance input control functionality. * Establishes a robust base for numeric formatting, handling common type conversions, null values, and error management. * Provides specialized converters for diverse formatting needs, including culture-aware currency, percentage, decimal, and custom format string application. * Enables dynamic formatting for input fields through a dedicated behavior that applies formatting on unfocus, allowing raw input during editing. * Offers declarative numeric formatting for entry controls via attached properties, simplifying XAML configuration. * Includes a markup extension for streamlined instantiation of common numeric format converters directly in XAML. * Updates the test application with a dedicated page to showcase and validate all new numeric formatting features and their edge cases. * Adds a utility converter for double-to-float type conversions, supporting property editors in the test application.
Adds new test sections for numeric value converters and entry behaviors. * Introduces examples for real-time formatting with two-way data binding. * Showcases formatted entry fields using a numeric behavior with various constraints. * Improves the numeric entry behavior to correctly format initial text upon load.
* Introduces detailed control over decimal precision in numeric input. * Adds options for setting maximum and minimum fractional digits. * Implements various rounding modes for precise value manipulation. * Allows configuring whether decimal precision is enforced during input or on unfocus. * Expands the test application to showcase new decimal precision capabilities. * Updates documentation to reflect the new numeric value converters and behavior enhancements.
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.
Pull request overview
This PR introduces comprehensive numeric input formatting capabilities and attempts to upgrade to .NET 10. However, there are critical issues with the .NET 10 upgrade as that version doesn't exist yet (latest is .NET 9). The numeric value converter implementation appears well-designed and thoroughly documented.
Key Changes:
- Adds numeric value converters (Currency, Percent, Decimal, Custom, Precision) with culture-aware formatting
- Introduces
NumericEntryBehaviorfor live input validation and formatting - Attempts to upgrade to .NET 10 (does not exist - critical blocker)
- Refactors platform-specific effects for iOS and MacCatalyst
- Replaces
NullableDateChangedEventArgswith standardDateChangedEventArgs
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| global.json | CRITICAL: Updates SDK to non-existent "10.0.0" |
| AuroraControlsMaui/AuroraControls.Maui.csproj | CRITICAL: References non-existent net10.0 frameworks and packages |
| AuroraControls.TestApp/AuroraControls.TestApp.csproj | CRITICAL: References non-existent net10.0 and package versions |
| .github/workflows/*.yml | CRITICAL: References non-existent .NET 10.0.101 |
| Directory.build.props | Updates analyzer package versions (may not exist) |
| AuroraControlsMaui/Converters/*.cs | Adds well-structured numeric formatting converters |
| AuroraControlsMaui/Platforms/iOS/*.cs | Renames effect class to avoid naming conflicts |
| AuroraControlsMaui/Platforms/MacCatalyst/*.cs | Renames effect class to avoid naming conflicts |
| AuroraControlsMaui/CalendarPicker.cs | Updates event args to use standard DateChangedEventArgs |
| AuroraControls.TestApp/NumericConvertersTestPage.* | Adds comprehensive test page for numeric converters |
| README.md | Adds extensive documentation for numeric formatting features |
| docs/NUMERIC_VALUE_CONVERTERS_PLAN.md | Adds detailed implementation plan (has future date issue) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| foreach (var c in fractionPart) | ||
| { | ||
| if (char.IsDigit(c)) | ||
| { | ||
| fractionDigitCount++; | ||
| } | ||
| } |
Copilot
AI
Dec 22, 2025
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.
This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.
| if (!_currentValue.HasValue && !string.IsNullOrWhiteSpace(_entry.Text)) | ||
| { | ||
| if (TryParseValue(_entry.Text, out var parsedValue)) | ||
| { | ||
| _currentValue = ApplyConstraints(parsedValue); | ||
| } | ||
| } | ||
|
|
||
| // Now format if we have a value | ||
| if (_currentValue.HasValue) |
Copilot
AI
Dec 22, 2025
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.
These 'if' statements can be combined.
| if (!_currentValue.HasValue && !string.IsNullOrWhiteSpace(_entry.Text)) | |
| { | |
| if (TryParseValue(_entry.Text, out var parsedValue)) | |
| { | |
| _currentValue = ApplyConstraints(parsedValue); | |
| } | |
| } | |
| // Now format if we have a value | |
| if (_currentValue.HasValue) | |
| if (!_currentValue.HasValue && | |
| !string.IsNullOrWhiteSpace(_entry.Text) && | |
| TryParseValue(_entry.Text, out var parsedValue)) | |
| { | |
| _currentValue = ApplyConstraints(parsedValue); | |
| } | |
| // Now format if we have a value | |
| if (_currentValue.HasValue) | |
| if (_currentValue.HasValue) |
| string formattedValue; | ||
|
|
||
| if (string.IsNullOrEmpty(format)) | ||
| { | ||
| // Use general format | ||
| formattedValue = value.ToString(culture); | ||
| } | ||
| else | ||
| { | ||
| formattedValue = value.ToString(format, culture); | ||
| } | ||
|
|
Copilot
AI
Dec 22, 2025
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.
Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.
| string formattedValue; | |
| if (string.IsNullOrEmpty(format)) | |
| { | |
| // Use general format | |
| formattedValue = value.ToString(culture); | |
| } | |
| else | |
| { | |
| formattedValue = value.ToString(format, culture); | |
| } | |
| string formattedValue = string.IsNullOrEmpty(format) | |
| ? value.ToString(culture) // Use general format | |
| : value.ToString(format, culture); |
Introduces a comprehensive suite of numeric value converters for flexible, culture-aware formatting in .NET MAUI applications.
NumericEntryBehaviorandNumericFormattingattached properties for enhanced input fields with live validation, constraints, and rounding modes.Upgrades the project to .NET 10:
Adds a dedicated test page and extensive documentation for the new numeric formatting capabilities.
Refines
CalendarPickerevent arguments for consistency.