From 5ee7b000b7c5242c31ab9a0a9684b5ab854e402c Mon Sep 17 00:00:00 2001 From: Brayan Khosravian <35541212+BrayanKhosravian@users.noreply.github.com> Date: Thu, 28 Nov 2019 09:12:23 +0100 Subject: [PATCH] Fix-7167-UWP-ListViewRenderer-ScrollToTop-when-NotifyCollectionChangedAction.Reset (#7279) * - created test view in control gallery for issue 7167 - wrote view, vm, and "ImprovedObservableCollection" for testing purpose - reproduced the bug without using any external nugets like "System.Reactive" - added onitemselected of listview to test itemselections - fixed by changing the implementation of Xamarin.Forms.Platform.UWP.ListViewRenderer.ReloadData - single commit which is useful for cherry picks - if itemsource and collectionviewsource.source (_collection) are the same the collectionviewsource is not being reinstantioated again - wrote ui test. * - changed controlgalery.projitems manually after cherrypick * - made testcase uitestable * - fixed uitesting exception * - made view, vm ui-testable - (TODO) modified uitest. (assert is missing) * - created test view in control gallery for issue 7167 - wrote view, vm, and "ImprovedObservableCollection" for testing purpose - reproduced the bug without using any external nugets like "System.Reactive" - added onitemselected of listview to test itemselections - fixed by changing the implementation of Xamarin.Forms.Platform.UWP.ListViewRenderer.ReloadData - single commit which is useful for cherry picks - if itemsource and collectionviewsource.source (_collection) are the same the collectionviewsource is not being reinstantioated again - wrote ui test. * - changed controlgalery.projitems manually after cherrypick * - made testcase uitestable * - fixed uitesting exception * - made view, vm ui-testable - (TODO) modified uitest. (assert is missing) * - wrote uitest, formetted * - updated comments * - uitest are only being executed for UWP * - removed comments (PR feedback) --- .../Issue7167.xaml | 37 ++++++ .../Issue7167.xaml.cs | 131 +++++++++++++++++++++ .../TestPages/TestPages.cs | 2 +- .../Xamarin.Forms.Controls.Issues.Shared.projitems | 10 ++ Xamarin.Forms.Platform.UAP/ListViewRenderer.cs | 12 +- 5 files changed, 187 insertions(+), 5 deletions(-) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7167.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7167.xaml.cs diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7167.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7167.xaml new file mode 100644 index 0000000..dbe41fa --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7167.xaml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + +