Skip to content

Conversation

@rmarinho
Copy link
Member

@rmarinho rmarinho commented Jun 2, 2025

Description of Change

Revert #29719 since the tests are failing after inflight being merged to main

Copilot AI review requested due to automatic review settings June 2, 2025 13:04
@rmarinho rmarinho requested a review from a team as a code owner June 2, 2025 13:04
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

Reverts the recent CarouselViewHandler2 memory leak fix due to failing tests and cleans up related test and layout factory code.

  • Removes Items2 handler registrations and tests from MemoryTests.cs
  • Deletes the CreateCarouselLayout method and unused usings in LayoutFactory2.cs
  • Inlines the carousel layout logic directly in CarouselViewHandler2.iOS.cs

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Controls/tests/DeviceTests/Memory/MemoryTests.cs Removed CollectionView2/CarouselView2 tests and simplified header/footer memory test
src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs Deleted CreateCarouselLayout implementation and pruned unused usings
src/Controls/src/Core/Handlers/Items2/CarouselViewHandler2.iOS.cs Inlined compositional layout delegate instead of calling the factory
Comments suppressed due to low confidence (3)

src/Controls/tests/DeviceTests/Memory/MemoryTests.cs:172

  • Removing the CarouselView2 test case leaves CarouselViewHandler2 without memory leak coverage; consider adding a new test for the inlined handler logic.
[InlineData(typeof(CarouselView2))]

src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs:264

  • [nitpick] The CustomUICollectionViewCompositionalLayout class remains after removing the carousel factory method; if it's unused, consider deleting it to reduce dead code.
class CustomUICollectionViewCompositionalLayout : UICollectionViewCompositionalLayout

src/Controls/src/Core/Handlers/Items2/CarouselViewHandler2.iOS.cs:51

  • [nitpick] The inlined compositional layout code duplicates logic formerly in LayoutFactory2; consider refactoring shared parts to avoid code duplication and simplify future maintenance.
var layout = new UICollectionViewCompositionalLayout((sectionIndex, environment) =>

@bhavanesh2001
Copy link
Contributor

#29784

@rmarinho rmarinho closed this Jun 2, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 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.

3 participants