Skip to content

[net7.0] Make CollectionView on iOS measure to content size - #15652

Merged
rmarinho merged 4 commits into
net7.0from
backport/pr-14951-to-net7.0
Aug 16, 2023
Merged

rmarinho merged 4 commits into
net7.0from
backport/pr-14951-to-net7.0

Conversation

@hartez

@hartez hartez commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

Backport of #14951 to net7.0

/cc @hartez

* Make CollectionView on iOS measure to content size
Fixes #9135

* Make tests work when device is in landscape

* Auto-format source code

* Removed extra local variable

* Update src/Controls/src/Core/Handlers/Items/ItemsViewHandler.iOS.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Handle height/width invalidation checks independently

---------

Co-authored-by: GitHub Actions Autoformatter <autoformat@example.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
@Syed-RI

Syed-RI commented Jun 15, 2023

Copy link
Copy Markdown

@hartez Hurray! Backport to .NET7 FTW!

bool _emptyViewDisplayed;
bool _disposed;

Func<UICollectionViewCell> _getPrototype;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is never used.

/Users/builder/azdo/_work/1/s/src/Controls/src/Core/Handlers/Items/iOS/ItemsViewController.cs(32,30): error CS0169: The field 'ItemsViewController<TItemsView>._getPrototype' is never used [/Users/builder/azdo/_work/1/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net7.0-ios]

@jsuarezruiz

Copy link
Copy Markdown
Contributor

Tested with #9135 sample:
Captura de pantalla 2023-07-21 a las 10 28 08

And #14966:
Captura de pantalla 2023-07-21 a las 10 38 58

Everything is working as expected. In the second sample detected that images are not loading. We have a couple of related issues like #13904

@jsuarezruiz
jsuarezruiz self-requested a review July 21, 2023 08:46
@hartez
hartez marked this pull request as ready for review July 25, 2023 16:16
@UkeHa

UkeHa commented Jul 31, 2023

Copy link
Copy Markdown

This is (currently the last) blocker for us. When will it be merged and when will be the next service release?

@jsuarezruiz
jsuarezruiz requested review from rmarinho and tj-devel709 and removed request for rmarinho July 31, 2023 14:35
@samhouts samhouts added this to the .NET 7 + Servicing milestone Jul 31, 2023
@jfversluis

Copy link
Copy Markdown
Member

@hartez this still good to merge in net7?

@samhouts
samhouts requested review from a team and rachelkang and removed request for a team and tj-devel709 August 16, 2023 00:20
@Syed-RI

Syed-RI commented Aug 16, 2023

Copy link
Copy Markdown

@hartez this still good to merge in net7?

Who knows 🤷🏽‍♂️

@Hooterr

Hooterr commented Aug 16, 2023

Copy link
Copy Markdown

For what it's worth, I managed to back port this fix manually by inheriting from the existing handlers and adding changes from this pull request (some reflection usage was needed as well) but it works fine in 7.0.92.

@UkeHa

UkeHa commented Aug 16, 2023

Copy link
Copy Markdown

@Hooterr it's certainly possible to roll your own MAUI-version, but i for one would prefer to get a stable .net7 release. Especially after testing the latest .net preview and running into a whole bunch of regressions.

@rmarinho
rmarinho merged commit 20097e8 into net7.0 Aug 16, 2023
@rmarinho
rmarinho deleted the backport/pr-14951-to-net7.0 branch August 16, 2023 13:56
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-7.0.96 Look for this fix in 7.0.96 SR8! platform/ios t/housekeeping ♻︎

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants