Skip to content

Conversation

@PureWeen
Copy link
Member

@PureWeen PureWeen commented Sep 5, 2025

This pull request introduces several improvements and bug fixes across the controls, handlers, and platform gesture management code. The most significant changes include enhanced gesture event handling for Windows, improved CarouselView initialization logic, updates to navigation page stack management, and additional test cases for recent issues. There are also project configuration updates to improve compatibility with AOT and trimming.

Gesture Handling and Event Management (Windows):

  • Refactored gesture event handling in GesturePlatformManager.Windows.cs to use modern C# pattern matching (is not View view) and simplified finger tracking logic, ensuring fingers are cleared appropriately on pointer and manipulation events. This improves reliability and code clarity for touch/gesture interactions. [1] [2] [3] [4] [5] [6] [7] [8]
  • Fixed drag-and-drop event handling and improved pinch gesture state management by moving _isPinching = true to the correct event handler. [1] [2]

CarouselView and ItemsView Improvements:

  • Updated CarouselViewController2.cs so initial position is only set if the view is visible, preventing incorrect initialization when hidden.
  • Updated test case CarouselViewUpdatePosition.xaml to use the correct CarouselView control instead of a custom version, reflecting resolved issues and improved reliability.

Navigation and Modal Management:

  • Refactored navigation stack updates in NavigationPage.Legacy.cs to ensure the correct page appears after removal, improving stack consistency and event firing. [1] [2]
  • Simplified modal navigation back press handling on Android by removing complex event handler logic, preventing stack overflows and improving maintainability.

Project Configuration and Compatibility:

  • Added <IsAotCompatible>true</IsAotCompatible> and <AllowUnsafeBlocks>true</AllowUnsafeBlocks> to project files, improving support for AOT compilation and code trimming. [1] [2]

Test Cases and Issue Coverage:

Let me know if you want to dive deeper into any specific change or area!

kubaflo and others added 16 commits September 5, 2025 20:45
…28666)

* Fixed - 28414 : iOS] Popping a page includes in the NavigationStack when the OnAppearing method is called

* updated NavigationPage.Legacy.cs

* Updated NavigationPage.Legacy.cs
Corrects the color attribute assignment in AttributedStringExtensions for iOS to prevent crashes when setting CharacterSpacing on buttons. Adds new test cases and UI tests to verify the fix for issue #31238.
* Mark projects IsAotCompatible and AllowUnsafeBlocks

* Make Windows Platform classes partial

* Mark PlatformGraphicsView partial

* Mark SkiaGraphicsView partial
…ed returning false in a modally pushed page causes stack overflow - fix (#28812)

* Update ModalNavigationManager.Android.cs

[Android] ModalNavigationManager

* Update ModalNavigationManager.Android.cs

* Remove unused back propagation logic in Android modal manager

Eliminated the preventBackPropagation variable and related event handler code from ModalNavigationManager.Android.cs, simplifying the OnBackPressed lifecycle event handling.
Remove unnecessary guards in GesturePlatformManager

Fix Windows pan and pinch gesture completion

Fixes: #31033
… Visible in CV2 - fix (#29999)

* [iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix

* Update CarouselViewUpdatePosition.xaml

* Update CarouselViewUpdatePosition.xaml
Added a UI Test

Update Issue30597.cs

Update SearchBarExtensions.cs

Added snapshots
… theme change (#30603)

Added a UI Test

CR changes

Added snapshots
Updated Test Sample with different geometries

Updated SnapShots
…navigation (#28003)

Added UI the test case.

Added the outputs for android and iOS platform

Updated the fix and added the output images

Updated the code changes.

Updated the output image
Refactored fallback logic to use ObtainStyledAttributes and ColorStateList for determining the system default text color. This ensures correct color selection based on the enabled state of EditText, improving consistency with system themes.
Introduces an internal UpdateTextColor method to TimePickerExtensions for updating the text color of MauiTimePicker based on the ITimePicker's TextColor property.

Restore default text color in TimePicker on Android

Updates the UpdateTextColor method to restore the default theme primary text color when no custom color is set, instead of passing null. This ensures consistent appearance on Android API 23+.

Update src/Core/src/Platform/Android/TimePickerExtensions.cs
Copilot AI review requested due to automatic review settings September 5, 2025 21:39
@PureWeen PureWeen requested a review from a team as a code owner September 5, 2025 21:39
Copy link
Contributor

Copilot AI left a 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 pull request introduces multiple improvements across the .NET MAUI framework, focusing on platform compatibility, gesture handling, and bug fixes. The changes enhance AOT compatibility across multiple projects, improve Windows gesture management, and add comprehensive test coverage for recent issues.

  • Enhanced AOT compatibility by adding <IsAotCompatible>true</IsAotCompatible> to multiple project files
  • Refactored Windows gesture event handling with modern C# patterns and improved finger tracking
  • Fixed theme change handling and color restoration issues across platforms

Reviewed Changes

Copilot reviewed 58 out of 79 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Graphics projects Added AOT compatibility flags and made classes partial
Core platform files Updated iOS color handling and Windows class declarations to partial
TimePickerExtensions.cs Added text color update method for theme changes
EditTextExtensions.cs Enhanced text and placeholder color handling with fallback logic
PickerHandler.iOS.cs Improved modal presentation by finding current view controller
GesturePlatformManager.Windows.cs Refactored gesture handling with modern C# patterns and improved finger tracking
NavigationPage.Legacy.cs Fixed navigation stack updates to ensure correct page appears after removal
ModalNavigationManager.Android.cs Simplified back press handling to prevent stack overflow
InputView.cs Added theme change event handling for color updates
CarouselViewController2.cs Added visibility check before setting initial position
Application.cs Reordered property change notifications for theme changes
Test files Added comprehensive test cases for issues #23575, #28414, #28811, #30440, #30597, #30603, #6101, #31238

@PureWeen PureWeen merged commit ea135a7 into main Sep 8, 2025
129 checks passed
@PureWeen PureWeen deleted the inflight/candidate_squash branch September 8, 2025 17:38
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2025
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.

10 participants