adospace / reactorui-maui

MauiReactor is a MVU UI framework built on top of .NET MAUI
MIT License
568 stars 47 forks source link

Grouped CollectionView asserts on iOS #113

Closed Code-DJ closed 1 year ago

Code-DJ commented 1 year ago

Not sure if this is underlying MAUI issue. CollectionView with IsGrouped = true throws a bunch of asserts as you scroll.

dotnet build -t:Run -f net7.0-ios /p:_DeviceName=:v2:udid=EECA5B10-A549-4D07-8A60-0CA944B62766 dotnet-maui-reactor -f net7.0-ios

Works fine when IsGrouped is not used.

Verified the same on MauiReactor.TestApp - Collection Extended Test (BETA).

[Assert] UICollectionView internal inconsistency: attempting to apply nil layout attributes to view. View: <Microsoft_Maui_Controls_Handlers_Items_VerticalSupplementaryView: 0x7f9520355f40; baseClass = UICollectionViewCell; frame = (0 0; 0 0); layer = <CALayer: 0x600002404f40>>; current attributes from view: (null); collection view: <UICollectionView: 0x7f951acaea00; frame = (0 0; 430 834.333); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x600002303a20>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x600002768f20>; contentOffset: {0, 1860}; contentSize: {430, 2694}; adjustedContentInset: {0, 0, 0, 0}; layout: <Microsoft_Maui_Controls_Handlers_Items_ListViewLayout: 0x7f9518e6d4a0>; dataSource: <Microsoft_Maui_Controls_Handlers_Items_ReorderableItemsViewController_1: 0x7f9518d47110>>

adospace commented 1 year ago

Yes, I see the same messages on the output pane, not sure what is causing it but I guess it's something not related to MauiReactor. Do you see any issue other than the messages?

Code-DJ commented 1 year ago

For CollectionView, I am unable to get UnevenRows to work properly.

I am using new MauiReactor.CollectionView(collectionView => collectionView!.ItemSizingStrategy = ItemSizingStrategy.MeasureAllItems).

The first load rows have the correct heights but when you scroll, it looks like it reuses rows but doesn't recalculate the heights.

Haven't seen any other issue. Thanks!

Code-DJ commented 1 year ago

The asserts are MAUI bug - https://github.com/dotnet/maui/issues/15862 There appear to be other Item sizing issues reported - https://github.com/dotnet/maui/issues?q=is%3Aissue+CollectionView+MeasureAllItems+is%3Aopen