Bug 53834 - incorrect row heights on ios when using groupheadertemplate in Xamarin.Forms 2.3.4.214-pre5
Summary: incorrect row heights on ios when using groupheadertemplate in Xamarin.Forms ...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL: https://github.com/gentledepp/Xamarin...
Depends on:
Blocks:
 
Reported: 2017-03-23 09:04 UTC by Alexander Marek
Modified: 2017-03-24 16:53 UTC (History)
5 users (show)

Tags: bug, ios, rowheight, listview, groupheadertemplate
Is this bug a regression?: Yes
Last known good build: 2.3.3.193


Attachments
repro project (67.02 KB, application/x-zip-compressed)
2017-03-23 16:24 UTC, Jimmy [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alexander Marek 2017-03-23 09:04:19 UTC
Hi!

Pre-5 fixes the issue with the invalid row heights in iOS, when there list item has context actions.
However, it destroys row heights in case you have a grouped listview with a custom header template.

To reproduce this issue, I forked 
https://github.com/jamesmontemagno/Xamarin.Forms-Monkeys

where he wrote about grouped listviews
http://motzcod.es/post/94643411707/enhancing-xamarinforms-listview-with-grouping

What I did then was:
1) I upgraded to Xamarin.Forms 2.3.4.214-pre5
2) I added a custom groupitemtempalte in the MonkeysPage.xaml:

...
                <!-- having a custom header tempalte leads to incorrect cell rowheights on iOS -->
                <ListView.GroupHeaderTemplate>
                    <DataTemplate>
                        <ViewCell Height="25">
                            <StackLayout VerticalOptions="FillAndExpand"
                                       Padding="5"
                                       BackgroundColor="Transparent">
                                <Label Text="{Binding Key}" TextColor="DimGray" VerticalOptions="Center"/>
                            </StackLayout>
                        </ViewCell>
                    </DataTemplate>
                </ListView.GroupHeaderTemplate>
...



You find the corresponding branch here:
https://github.com/gentledepp/Xamarin.Forms-Monkeys/tree/ios_rowheight_bug


Please fix.
Comment 1 Jimmy [MSFT] 2017-03-23 15:03:57 UTC
Thank you for filing this report! Let me run the project you provided to see if I can confirm this issue and I will update the report accordingly.
Comment 2 Jimmy [MSFT] 2017-03-23 16:24:03 UTC
Created attachment 20766 [details]
repro project

I was able to reproduce this issue with sample provided. I am attaching a slightly minimized version of the project to the report.

This issue is similar to bug 51536, the difference is that this bug is happening after adding a GroupHeaderTemplate to the ListView, and it is still occurring with 2.3.4-pre5.

After testing with different Forms versions, this appears to be a regression beginning in the 2.3.4 pre-releases.


### Steps to reproduce
1. Run the attached iOS project


### Expected Results 
The row heights will fit the cell contents


### Actual Results
The row heights are incorrect similar to bug 51536.


### Regression Test
2.3.5.75-nightly    BAD
2.3.4-pre5          BAD
2.3.4-pre3          BAD
2.3.3.193           GOOD
Comment 3 Samantha Houts [MSFT] 2017-03-24 01:40:17 UTC
https://github.com/xamarin/Xamarin.Forms/pull/838
Comment 4 Rui Marinho 2017-03-24 01:50:45 UTC
Should be fixed on 2.3.4-pre6
Comment 5 Alexander Marek 2017-03-24 09:17:05 UTC
Did you make sure that your fix does not re-introduce this bug?

https://bugzilla.xamarin.com/show_bug.cgi?id=51536

see PR here: https://github.com/xamarin/Xamarin.Forms/pull/787
Comment 6 Samantha Houts [MSFT] 2017-03-24 16:53:47 UTC
Yes. This issue was entirely unrelated to Bug 51536. Thank you!