-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 #28890
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
…net#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png
…tnet#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks
…net#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]>
…50403.2 (dotnet#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell
…net#28828) * improve stability to flaky test * Update Issue7678.cs
…er After Changing ItemsLayout in CV2
Hey there @@Ahamed-Ali! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/Controls/src/Core/Handlers/Items2/iOS/StructuredItemsViewController2.cs:76
- Both horizontal and vertical supplementary views are always registered regardless of layout orientation. Please add a clarifying comment to explain this behavior for maintainers and ensure that the public docs in the /docs/ folder reflect this change.
private protected virtual void RegisterSupplementaryViews(UICollectionElementKindSection kind)
src/Controls/src/Core/Handlers/Items2/iOS/GroupableItemsViewController2.cs:61
- As with StructuredItemsViewController2, the conditional check on layout orientation has been removed to register both horizontal and vertical supplementary views. Please document this change in both the code and associated public documentation.
private protected override void RegisterSupplementaryViews(UICollectionElementKindSection kind)
…r/Footer After Changing ItemsLayout in CV2 (dotnet#28890) * [Testing] Fix for flaky UITests in CI that occasionally fail - 7 (dotnet#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png * Update CommunityToolkit.Maui reference in sample content template (dotnet#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks * [Testing] Fix for flaky UITests in CI that occasionally fail - 6 (dotnet#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> * Update dependencies from https://github.com/dotnet/xharness build 20250403.2 (dotnet#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Issue19509.cs (dotnet#28807) * Resave mac tabbedpage images (dotnet#28803) * Fixed ListView leak caused by not disposed ContextActionsCell (dotnet#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell * [Testing] Fix for flaky UITests in CI that occasionally fail - 8 (dotnet#28828) * improve stability to flaky test * Update Issue7678.cs * Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 * Included the test case and sample for the fix * Added the test case for footer --------- Co-authored-by: HarishKumarSF4517 <[email protected]> Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Anandhan Rajagopal <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Vitaly Knyazev <[email protected]>
…r/Footer After Changing ItemsLayout in CV2 (#28890) * [Testing] Fix for flaky UITests in CI that occasionally fail - 7 (#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png * Update CommunityToolkit.Maui reference in sample content template (#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks * [Testing] Fix for flaky UITests in CI that occasionally fail - 6 (#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> * Update dependencies from https://github.com/dotnet/xharness build 20250403.2 (#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Issue19509.cs (#28807) * Resave mac tabbedpage images (#28803) * Fixed ListView leak caused by not disposed ContextActionsCell (#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell * [Testing] Fix for flaky UITests in CI that occasionally fail - 8 (#28828) * improve stability to flaky test * Update Issue7678.cs * Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 * Included the test case and sample for the fix * Added the test case for footer --------- Co-authored-by: HarishKumarSF4517 <[email protected]> Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Anandhan Rajagopal <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Vitaly Knyazev <[email protected]>
…r/Footer After Changing ItemsLayout in CV2 (#28890) * [Testing] Fix for flaky UITests in CI that occasionally fail - 7 (#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png * Update CommunityToolkit.Maui reference in sample content template (#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks * [Testing] Fix for flaky UITests in CI that occasionally fail - 6 (#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> * Update dependencies from https://github.com/dotnet/xharness build 20250403.2 (#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Issue19509.cs (#28807) * Resave mac tabbedpage images (#28803) * Fixed ListView leak caused by not disposed ContextActionsCell (#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell * [Testing] Fix for flaky UITests in CI that occasionally fail - 8 (#28828) * improve stability to flaky test * Update Issue7678.cs * Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 * Included the test case and sample for the fix * Added the test case for footer --------- Co-authored-by: HarishKumarSF4517 <[email protected]> Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Anandhan Rajagopal <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Vitaly Knyazev <[email protected]>
…r/Footer After Changing ItemsLayout in CV2 (dotnet#28890) * [Testing] Fix for flaky UITests in CI that occasionally fail - 7 (dotnet#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png * Update CommunityToolkit.Maui reference in sample content template (dotnet#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks * [Testing] Fix for flaky UITests in CI that occasionally fail - 6 (dotnet#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> * Update dependencies from https://github.com/dotnet/xharness build 20250403.2 (dotnet#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Issue19509.cs (dotnet#28807) * Resave mac tabbedpage images (dotnet#28803) * Fixed ListView leak caused by not disposed ContextActionsCell (dotnet#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell * [Testing] Fix for flaky UITests in CI that occasionally fail - 8 (dotnet#28828) * improve stability to flaky test * Update Issue7678.cs * Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 * Included the test case and sample for the fix * Added the test case for footer --------- Co-authored-by: HarishKumarSF4517 <[email protected]> Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Anandhan Rajagopal <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Vitaly Knyazev <[email protected]>
…r/Footer After Changing ItemsLayout in CV2 (dotnet#28890) * [Testing] Fix for flaky UITests in CI that occasionally fail - 7 (dotnet#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png * Update CommunityToolkit.Maui reference in sample content template (dotnet#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks * [Testing] Fix for flaky UITests in CI that occasionally fail - 6 (dotnet#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> * Update dependencies from https://github.com/dotnet/xharness build 20250403.2 (dotnet#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Issue19509.cs (dotnet#28807) * Resave mac tabbedpage images (dotnet#28803) * Fixed ListView leak caused by not disposed ContextActionsCell (dotnet#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell * [Testing] Fix for flaky UITests in CI that occasionally fail - 8 (dotnet#28828) * improve stability to flaky test * Update Issue7678.cs * Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 * Included the test case and sample for the fix * Added the test case for footer --------- Co-authored-by: HarishKumarSF4517 <[email protected]> Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Anandhan Rajagopal <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Vitaly Knyazev <[email protected]>
…r/Footer After Changing ItemsLayout in CV2 (#28890) * [Testing] Fix for flaky UITests in CI that occasionally fail - 7 (#28764) * improve stability to flaky tests * Updated changes * Update CarouselViewUITests.LoopNoFreeze.cs * Update EntryClearButtonColorShouldMatchTextColor.png * Update CommunityToolkit.Maui reference in sample content template (#28510) * Update CommunityToolkit.Maui & Mvvm reference in template * Fix MAUI Toolkit breaking changes * Debump MVVM Toolkit * Update MauiApp.1.csproj * Update package version in MauiApp.1.csproj * Add framework-specific validation flags and update package version * Swap TextValidationBehavior Flags for frameworks * [Testing] Fix for flaky UITests in CI that occasionally fail - 6 (#28747) * Fixed flaky tests related to entry control * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * Update src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25473.cs Co-authored-by: Copilot <[email protected]> * fixed 19500 test * reverted the common changes * Fix typo in Issue19500.cs comments --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> * Update dependencies from https://github.com/dotnet/xharness build 20250403.2 (#28819) Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.25167.9 -> To Version 9.0.0-prerelease.25203.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Update Issue19509.cs (#28807) * Resave mac tabbedpage images (#28803) * Fixed ListView leak caused by not disposed ContextActionsCell (#28702) * Fixed something that looks like copy/paste error * Fixed memory leak caused by not disposed ContextActionsCell * [Testing] Fix for flaky UITests in CI that occasionally fail - 8 (#28828) * improve stability to flaky test * Update Issue7678.cs * Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 * Included the test case and sample for the fix * Added the test case for footer --------- Co-authored-by: HarishKumarSF4517 <[email protected]> Co-authored-by: Gerald Versluis <[email protected]> Co-authored-by: Anandhan Rajagopal <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Vitaly Knyazev <[email protected]>
### Description of Change ## .NET MAUI Release Notes - Inflight/Candidate ## What's Changed ### MAUI Product Fixes * Fix CarouselView layout SR6 regressions by @albyrock87 in #29035 * Revert "[Android] picker - focus/unfocus events (#28122)" by @PureWeen in https://github.com/dotnet/maui/pull/1fb5164929 * [Windows] Fixed the flyout content width not being set correctly after updating to WinUI SDK 1.7 by @Tamilarasan-Paranthaman in #28996 * [Android] picker - focus/unfocus events by @kubaflo in #28122 * [XC] add IRootObjectProvider by @StephaneDelcroix in #28310 * [iOS] Fix for the File.ContentType from MediaPicker not being in valid MIME format by @SyedAbdulAzeemSF4852 in #28842 * [Android] Fixed the Incorrect Text Color Applied to Selected Tab in TabbedPage by @Ahamed-Ali in #28844 * [iOS] Fix FlyoutPage does not respond to changes in the FlyoutLayoutBehavior property by @devanathan-vaithiyanathan in #28884 * [Android] Fixed ScalingCanvas.SetBlur not working by @NirmalKumarYuvaraj in #28911 * [iOS] - Resolved Proper Rendering of Dynamic Header/Footer Updates in CV2 by @prakashKannanSf3972 in #28641 * [iOS] Fixed the TargetInvocationException Occurs When Selecting Header/Footer After Changing ItemsLayout in CV2 by @Ahamed-Ali in #28890 * [Windows] - Fix Visual State Issue with Picker TextColor After Navigation by @prakashKannanSf3972 in #28746 ### Dependency Updates * [Windows] Upgrade to Windows App SDK 1.7 by @MartyIX in #28499 ### Testing * [Testing] Feature Matrix UITest Cases for CollectionView EmptyView Feature by @NafeelaNazhir in #28679 * Fixed Test case failure in PR 29037 - [2025/04/21] Candidate by @HarishKumarSF4517 in #29049 **Full Changelog**: main...inflight/candidate For more information about inflight process check https://github.com/dotnet/maui/wiki/Inflight-Branch-Process
Root Cause of the issue
SupplementaryView
was not properly registered, leading to an exception during the call toDequeueReusableSupplementaryView
when adding a header or footer after changing the ItemsLayout in CollectionView.Description of Change
Reference
Issues Fixed
Fixes #28678
Tested the behaviour in the following platforms
Screenshot
CrashOccured.mov
FixedCrash.mov