Skip to content
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

[iOS] Use a GeneralWrapperView for the EmptyView on CollectionView #26513

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

rmarinho
Copy link
Member

@rmarinho rmarinho commented Dec 10, 2024

Description of Change

When the empty view only had 1 button , no layout, it wasn't renderer correctly , the height was always 0. So we can reuse the same approach from CV2 , and reuse the code to fix both approaches for now.

This pull request includes several changes to the iOS handlers and template helpers in the src/Controls/src/Core/Handlers/Items directory. The most significant changes involve the introduction of a new GeneralWrapperView class to replace UIContainerView2 and updates to the handling of views in the TemplateHelpers and TemplatedCell2 classes.

Introduction of GeneralWrapperView:

  • Added a new GeneralWrapperView class in src/Controls/src/Core/Platform/iOS/GeneralWrapperView.cs to handle the wrapping of views, enabling better measurement and arrangement.

Updates to TemplateHelpers:

  • Modified the RealizeView method in TemplateHelpers.cs to replace UIContainerView2 with GeneralWrapperView, improving the handling of views without templates.
  • Removed unnecessary using directives and added new ones to reflect the changes in dependencies.

Updates to TemplatedCell2:

  • Replaced instances of UIContainerView2 with GeneralWrapperView in the BindVirtualView method to ensure consistent handling of views.
  • Removed the UIContainerView2 class from TemplatedCell2.cs, as it is now replaced by GeneralWrapperView.

Minor Cleanup:

  • Removed an unnecessary blank line in ItemsViewController.cs to maintain code cleanliness.

To test
Test for issue #19609 should pass

Issues Fixed

Fixes #26508

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@rmarinho rmarinho added area-controls-collectionview CollectionView, CarouselView, IndicatorView potential-regression This issue described a possible regression on a currently supported version., verification pending labels Dec 10, 2024
@rmarinho rmarinho added this to the .NET 9 SR3 milestone Dec 10, 2024
@rmarinho rmarinho requested review from PureWeen and kubaflo December 10, 2024 17:15
@rmarinho rmarinho requested a review from a team as a code owner December 10, 2024 17:15
@rmarinho rmarinho requested a review from mattleibow December 10, 2024 17:15
@kubaflo
Copy link
Contributor

kubaflo commented Dec 10, 2024

I wonder if there are maybe other internal UiViews that act as containers that should be replaced by this GeneralWrapperView?

@jfversluis
Copy link
Member

jfversluis commented Dec 11, 2024

General WrapperView 🫡

@rmarinho rmarinho merged commit 07f41ae into main Dec 11, 2024
104 checks passed
@rmarinho rmarinho deleted the fix-26508 branch December 11, 2024 09:29
@samhouts samhouts added fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Dec 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-net8.0-nightly This may be available in a nightly release! fixed-in-net9.0-nightly This may be available in a nightly release! potential-regression This issue described a possible regression on a currently supported version., verification pending
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[CollectionView] EmptyView with button doesn't t work on iOS
5 participants