-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Sync .NET 9 SR12 with .NET 10 GA release #32012
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
…ews in CI (#31823) This PR addresses the UI test image failures that occurred in the main branch and includes updates to improve rendering and test stability across platforms. - In the CookiesCorrectlyLoadWithMultipleWebViews test case, I changed the WebView source to match the cookies. ### Test cases: - CookiesCorrectlyLoadWithMultipleWebViews
…31831) * [iOS] Fix added for Navigation.SetTitleView does not work in ios 26. * changes added. * changed the version condition.
* Update androidApiLevels for device tests * [ci] Update provisioning of api 36
… in FlyoutPage (#31515) * mac fix added * Windows fix added * test case added * Update Issue31372.cs * Update Issue31372.cs * Update WindowHandler.iOS.cs * fix updated * Update WindowHandler.iOS.cs * Update WindowHandler.iOS.cs * Update PublicAPI.Shipped.txt * changes added in UnShipped file
…1868) * Initial plan * Temporarily disable flaky WebView tests with FlakyTest attribute Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com> * Add tracking issue link to FlakyTest attributes Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com>
…51004.2 (#31872) On relative base path root Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25426.1 -> To Version 9.0.0-prerelease.25504.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…BindingContext update in template sample (#31954) * update ProjectListPage * Update MauiApp.1.csproj --------- Co-authored-by: Vignesh-SF3580 <102575140+Vignesh-SF3580@users.noreply.github.com>
…e is popped while dialo… (#31919) * [Android] -Picker dialog causes crash when page is popped while dialog is open * removed the dispose call. * Revert "removed the dispose call." This reverts commit e1e7a9f. * removed the dispose call. * Modified with Dismiss() method. --------- Co-authored-by: sheiksyedm <sheiksyedm@syncfusion.com>
…2 ItemsLayout PropertyChanged subscription (#31922)
…ppThemeBinding colors for text and placeholder reset to default on theme change (#31921) * added snapshots and fix * removed test cases * added the test cases and snapshots * added braces * added mac and windows snapshots * added mac and windows snapshots * added snapshot --------- Co-authored-by: TamilarasanSF4853 <tamilarasan.velu@syncfusion.com>
* Update arcade * Don t use internal feeds --------- Co-authored-by: Rui Marinho <me@ruimarinho.net>
Co-authored-by: devanathan-vaithiyanathan <114395405+devanathan-vaithiyanathan@users.noreply.github.com>
…_sr12_ga # Conflicts: # .config/dotnet-tools.json # eng/Version.Details.xml # eng/Versions.props # eng/common/core-templates/job/job.yml # eng/common/core-templates/job/onelocbuild.yml # eng/common/core-templates/job/publish-build-assets.yml # eng/common/core-templates/job/source-index-stage1.yml # eng/common/core-templates/steps/generate-sbom.yml # eng/common/core-templates/steps/source-build.yml # eng/pipelines/device-tests.yml # global.json # src/Controls/src/Core/Items/CarouselLayoutTypeConverter.cs # src/Controls/src/Core/Items/ItemsLayoutTypeConverter.cs # src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt # src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt # src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs # src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs # src/Core/src/Platform/Android/EditTextExtensions.cs # src/Templates/src/templates/maui-mobile/Pages/ProjectListPage.xaml
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
Synchronizes .NET 9 SR12 changes into the .NET 10 GA branch, aligning behavior, platform fixes, and test coverage. Key adjustments include dialog dismissal logic on Android pickers, initialization timing for Flyout/FlyoutPage behaviors, updated ItemsLayout instantiation strategy, iOS/macOS title view rendering adjustments, and added regression/device tests (including leak tests).
- Switch from shared static ItemsLayout instances to per-use factory-created instances; tests updated accordingly.
- Android dialog lifecycle handling updated (Hide/Dispose -> Dismiss) plus additional picker disconnect safety.
- Added regression/UI tests and leak tests for CarouselView and CollectionView; Flyout initial presentation logic adjusted on Windows and iOS; added WindowsAppSDK package reference.
Reviewed Changes
Copilot reviewed 26 out of 42 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| Graphics.csproj | Adds WindowsAppSDK reference for Windows target support. |
| EditTextExtensions.cs | Alters fallback logic for text/placeholder color selection. |
| TimePickerHandler.Android.cs | Uses Dismiss instead of Hide for dialog cleanup. |
| PickerHandler.Android.cs | Properly detaches/dismisses dialog on disconnect. |
| FlyoutViewHandler.Windows.cs | Ensures initial IsPresented sync after load. |
| DatePickerHandler.Android.cs | Replaces Hide/Dispose with Dismiss only. |
| Issue31889 test files | New UI page and tests for theme-based Entry/Editor color retention. |
| Issue31731 test files | New UI + test for picker dialog during navigation pop scenario. |
| Issue31372 test files | New UI + test for initial IsPresented on FlyoutPage. |
| Issue12134.cs | Updates test WebView URL. |
| CollectionViewTests.iOS.cs | Adds leak test for default ItemsLayout. |
| CarouselViewTests.iOS.cs | Adds leak test with default ItemsLayout. |
| ItemsLayoutTypeConverterTests.cs | Updates assertions due to layout instance semantics change. |
| PublicAPI.Unshipped (iOS/macCatalyst) | Records removal of an overridden renderer method. |
| LinearItemsLayout.cs | Replaces static field initializers with factory methods. |
| ItemsView.cs | Changes default internal ItemsLayout provisioning (now per-instance). |
| ItemsLayoutTypeConverter.cs | Returns new layout instances instead of shared singletons. |
| CarouselView.cs | Alters default ItemsLayout creation via factory. |
| CarouselLayoutTypeConverter.cs | Returns new carousel layout instances. |
| NavigationRenderer.cs | Adjusts TitleView sizing logic for newer iOS versions. |
| PhoneFlyoutPageRenderer.cs | Moves initial presentation logic from layout phase to appearance. |
Comments suppressed due to low confidence (1)
| editText.SetTextColor(c); | ||
| } | ||
| else | ||
| else if (textColor is null) |
Copilot
AI
Oct 15, 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.
Changing the fallback from else to else if (textColor is null) means that when textColor is non-null but CreateEditTextColorStateList returns null, the previous fallback to system default will no longer execute, leaving the text color potentially unchanged. Restore an unconditional else or explicitly handle the failed ColorStateList creation when textColor is not null.
| else if (textColor is null) | |
| else |
Copilot uses AI. Check for mistakes.
| if (placeholderTextColor is not null && PlatformInterop.CreateEditTextColorStateList(editText.HintTextColors, placeholderTextColor.ToPlatform()) is ColorStateList c) | ||
| editText.SetHintTextColor(c); | ||
| else | ||
| else if (placeholderTextColor is null) |
Copilot
AI
Oct 15, 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.
Same pattern as text color: if placeholderTextColor is non-null but the ColorStateList creation returns null, the system default fallback will now be skipped. Replace with else or add a branch to handle the failed conversion while placeholderTextColor is not null.
Copilot uses AI. Check for mistakes.
| _dialog.DismissEvent -= OnDialogDismiss; | ||
| _dialog.Hide(); | ||
| _dialog.Dispose(); | ||
| _dialog.Dismiss(); |
Copilot
AI
Oct 15, 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.
Previously the code called Hide() then Dispose(); now only Dismiss() is invoked and the explicit Dispose() was removed, which may leave unmanaged window resources undisposed depending on dialog implementation. Reintroduce _dialog.Dispose() (after Dismiss) or confirm that Dismiss fully releases resources and add a comment documenting that guarantee.
| _dialog.Dismiss(); | |
| _dialog.Dismiss(); | |
| // Explicitly dispose the dialog to release unmanaged resources. | |
| _dialog.Dispose(); |
Copilot uses AI. Check for mistakes.
| // Wait for a moment to ensure dialog is open, then wait for auto navigation | ||
| // The page will automatically pop after 3 seconds | ||
| // If the bug exists, this would cause a crash | ||
| System.Threading.Thread.Sleep(4000); // Wait longer than the 3-second delay |
Copilot
AI
Oct 15, 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.
Using Thread.Sleep in tests can cause unnecessary delays and flakiness; prefer a polling wait (e.g., repeatedly checking for the main page elements or using a built-in wait method with timeout) to reduce test runtime and improve reliability.
| System.Threading.Thread.Sleep(4000); // Wait longer than the 3-second delay | |
| // Wait for the main page to reappear after the picker page pops | |
| App.WaitForElement("statusLabel"); | |
| App.WaitForElement("navigateButton"); |
Copilot uses AI. Check for mistakes.
| null, propertyChanged: OnInternalItemsLayoutPropertyChanged, | ||
| defaultValueCreator: (b) => LinearItemsLayout.CreateVerticalDefault()); |
Copilot
AI
Oct 15, 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.
Changing the default from a shared singleton (LinearItemsLayout.Vertical) to a new instance per control alters reference equality semantics (code previously relying on ItemsLayout == LinearItemsLayout.Vertical will now fail), which is a potential breaking change in public behavior. Document this change and assess whether maintaining shared instances or overriding Equals is needed to preserve compatibility.
Copilot uses AI. Check for mistakes.
| if (strValue == "HorizontalList") | ||
| { | ||
| return LinearItemsLayout.CarouselDefault; | ||
| return LinearItemsLayout.CreateCarouselHorizontalDefault(); |
Copilot
AI
Oct 15, 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.
Converter now allocates new instances each call instead of returning shared static CarouselDefault/CarouselVertical, altering expected reference equality for converted values (potential breaking change). Consider caching or documenting the new semantics.
Copilot uses AI. Check for mistakes.
| if (strValue == "VerticalList") | ||
| { | ||
| return LinearItemsLayout.CarouselVertical; | ||
| return LinearItemsLayout.CreateCarouselVerticalDefault(); |
Copilot
AI
Oct 15, 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.
Converter now allocates new instances each call instead of returning shared static CarouselDefault/CarouselVertical, altering expected reference equality for converted values (potential breaking change). Consider caching or documenting the new semantics.
Copilot uses AI. Check for mistakes.
| public static readonly IItemsLayout Vertical = CreateVerticalDefault(); | ||
| /// <include file="../../../docs/Microsoft.Maui.Controls/LinearItemsLayout.xml" path="//Member[@MemberName='Horizontal']/Docs/*" /> | ||
| public static readonly IItemsLayout Horizontal = new LinearItemsLayout(ItemsLayoutOrientation.Horizontal); | ||
| public static readonly IItemsLayout Horizontal = CreateHorizontalDefault(); | ||
|
|
||
| /// <include file="../../../docs/Microsoft.Maui.Controls/LinearItemsLayout.xml" path="//Member[@MemberName='CarouselVertical']/Docs/*" /> | ||
| public static readonly IItemsLayout CarouselVertical = new LinearItemsLayout(ItemsLayoutOrientation.Vertical) | ||
| { | ||
| SnapPointsType = SnapPointsType.MandatorySingle, | ||
| SnapPointsAlignment = SnapPointsAlignment.Center | ||
| }; | ||
| public static readonly IItemsLayout CarouselVertical = CreateCarouselVerticalDefault(); | ||
|
|
||
| internal static readonly LinearItemsLayout CarouselDefault = new LinearItemsLayout(ItemsLayoutOrientation.Horizontal) | ||
| { | ||
| SnapPointsType = SnapPointsType.MandatorySingle, | ||
| SnapPointsAlignment = SnapPointsAlignment.Center | ||
| }; | ||
| internal static readonly LinearItemsLayout CarouselDefault = CreateCarouselHorizontalDefault(); |
Copilot
AI
Oct 15, 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.
Introducing factory methods enables creation of multiple distinct instances where previously code often reused the static fields; downstream code relying on reference equality against the public static fields may now fail when new factory instances are produced (via converters/defaultValueCreators). Either ensure converters/defaults return these static fields or document the shift away from singleton semantics and consider providing value-based equality.
Copilot uses AI. Check for mistakes.
| internal static LinearItemsLayout CreateVerticalDefault() | ||
| => new LinearItemsLayout(ItemsLayoutOrientation.Vertical); | ||
|
|
||
| internal static LinearItemsLayout CreateHorizontalDefault() | ||
| => new LinearItemsLayout(ItemsLayoutOrientation.Horizontal); | ||
|
|
||
| internal static LinearItemsLayout CreateCarouselVerticalDefault() | ||
| => new LinearItemsLayout(ItemsLayoutOrientation.Vertical) | ||
| { | ||
| SnapPointsType = SnapPointsType.MandatorySingle, | ||
| SnapPointsAlignment = SnapPointsAlignment.Center | ||
| }; | ||
|
|
||
| internal static LinearItemsLayout CreateCarouselHorizontalDefault() | ||
| => new LinearItemsLayout(ItemsLayoutOrientation.Horizontal) | ||
| { | ||
| SnapPointsType = SnapPointsType.MandatorySingle, | ||
| SnapPointsAlignment = SnapPointsAlignment.Center | ||
| }; |
Copilot
AI
Oct 15, 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.
Introducing factory methods enables creation of multiple distinct instances where previously code often reused the static fields; downstream code relying on reference equality against the public static fields may now fail when new factory instances are produced (via converters/defaultValueCreators). Either ensure converters/defaults return these static fields or document the shift away from singleton semantics and consider providing value-based equality.
Copilot uses AI. Check for mistakes.
| @@ -1,4 +1,5 @@ | |||
| #nullable enable | |||
| #nullable enable | |||
| *REMOVED*override Microsoft.Maui.Controls.Handlers.Compatibility.PhoneFlyoutPageRenderer.ViewWillLayoutSubviews() -> void | |||
Copilot
AI
Oct 15, 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.
Same public API removal on Mac Catalyst; ensure coordinated documentation and versioning strategy since removing overrides can alter lifecycle timing expectations for consumers subclassing or depending on renderer behavior.
Copilot uses AI. Check for mistakes.
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Description
This brings all the changes from our final .NET 9 SR 12 release in line with our .NET 10 GA release.
This ensures that all fixes and changes in SR 12 are also in .NET 10 GA