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

feat(droid): ListView smooth scrolling #9586

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

Xiaoy312
Copy link
Contributor

@Xiaoy312 Xiaoy312 commented Aug 24, 2022

GitHub Issue (If applicable): unoplatform/uno.toolkit.ui#283

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

On Android, calling NativeListViewBase.SmoothScrollToPosition throws a silent native error.

What is the new behavior?

You can now programmatically scroll ListView with animation on android.
iOS and Android ListViewBase.NativePanel has been made publicly accessible.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

@gitpod-io
Copy link

gitpod-io bot commented Aug 24, 2022

@nventive-devops

This comment was marked as outdated.

@nventive-devops

This comment was marked as outdated.

@nventive-devops

This comment was marked as outdated.

@nventive-devops

This comment was marked as outdated.

@nventive-devops

This comment was marked as outdated.

@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20220823/listview-smooth-scrolling branch from edd9363 to 72f522d Compare August 25, 2022 15:00
@Xiaoy312 Xiaoy312 marked this pull request as ready for review August 25, 2022 19:20
@nventive-devops

This comment was marked as outdated.

@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20220823/listview-smooth-scrolling branch 2 times, most recently from 25ec5bf to b9d5238 Compare August 29, 2022 15:13
@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20220823/listview-smooth-scrolling branch from b9d5238 to 34b19ca Compare August 29, 2022 18:33
@nventive-devops

This comment was marked as outdated.

@nventive-devops
Copy link
Contributor

The build 53299 found UI Test snapshots differences: android-28-xamarin: 0, android-28-xamarin-Snap: 0, ios: 27, ios-Snap: 105, macOS-screenshots: 40, skia-gtk-screenshots: 7, skia-wpf-screenshots: 9, wasm: 11, wasm-automated-net5.0-Benchmarks: 0, wasm-automated-net5.0-Default: 7, wasm-automated-net5.0-RuntimeTests: 0

Details
  • android-28-xamarin: 0 changed over 0

  • android-28-xamarin-Snap: 0 changed over 0

  • ios: 27 changed over 293

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-3
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-1
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-2
    • Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-1
    • Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-2
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-0
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-1
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-2
    • Screenshots_Image_Stretch_Alignment_Wider_Mode-3
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-3
    • Screenshots_Image_Stretch_Alignment_Smaller_Mode-1
    • Screenshots_Image_Stretch_Alignment_Smaller_Mode-2
  • ios-Snap: 105 changed over 983

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • Border_NonUniformThicknessandRadius_Uno_UI_Samples_UITests_BorderTestsControl_NonUniformThicknessandRadius
    • Brushes_UITests_Windows_UI_Xaml_Media_GradientBrushTests_LinearGradientBrush_Change_Stops_UITests_Windows_UI_Xaml_Media_GradientBrushTests_LinearGradientBrush_Change_Stops
    • Border_Border_Simple_with_Opacity_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_Opacity
    • Brushes_ImageBrushAlignmentXY_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushAlignmentXY
    • Brushes_ImageBrushWithCompositeTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithCompositeTransform
    • Brushes_ImageBrushWithLateSource_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithLateSource
    • Brushes_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay
    • Brushes_UITests_Windows_UI_Xaml_Media_BrushesTests_Brushes_ImplicitConvert_UITests_Windows_UI_Xaml_Media_BrushesTests_Brushes_ImplicitConvert
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse
    • Buttons_Hyperlink_CanExecute_False_nVentive_Umbrella_Views_UI_Samples_Content_UITests_ButtonTestsControl_Hyperlink_CanExecute_False
    • Clipping_SamplesApp_Windows_UI_Xaml_Clipping_DoubleAnimationClipping_SamplesApp_Windows_UI_Xaml_Clipping_DoubleAnimationClipping
    • Clipping_SamplesApp_Windows_UI_Xaml_Clipping_Transform_Ellipse_In_Border_SamplesApp_Windows_UI_Xaml_Clipping_Transform_Ellipse_In_Border
    • CommandBar_CommandBar_Xaml_Automated_UITests_Shared_Windows_UI_Xaml_Controls_CommandBar_CommandBar_Xaml_Automated
    • ContentControl_ContentControl_WithPadding_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_WithPadding
    • Clipping_SamplesApp_Windows_UI_Xaml_Clipping_ButtonClippingTestsControl_SamplesApp_Windows_UI_Xaml_Clipping_ButtonClippingTestsControl
    • ComboBox_ComboBox_NativePopup_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_NativePopup
    • ComboBox_ComboBox_Picker_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_Picker
    • ContentControl_ContentControl_FindName_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_FindName
    • ContentControl_ContentControl_MultiLevelInheritance_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_MultiLevelInheritance
  • macOS-screenshots: 40 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Animations-BeginTime_MultipleAnimations.png
    • Buttons-RadioButtonsInitialLoadSelected.png
    • Buttons-SplitButtonPage.png
    • ColorPicker-WinUIColorPickerPage.png
    • Gesture Recognizer-Manipulation_Basics.png
    • Gesture Recognizer-Pointer Events test bench.png
    • Focus-GetFocus.png
    • Image-Image_Fixed_Size_Alignment.png
    • Image-Image_Formats.png
    • Image-Image_Stretch_Alignment_SizeOnControl.png
    • ItemsRepeater-UniformGridLayout_Simple.png
    • ListView-ListView_With_ListViews_Count_Measure.png
    • MUX-InfoBarPage.png
    • MUX-NavigationViewCompactPaneLengthTestPage.png
    • MUX-NavigationViewCustomThemeResourcesPage.png
    • MUX-NavigationViewPage.png
    • MUX-NavigationViewRS4Page.png
    • MUX-NavigationViewTopNavOnlyPage.png
    • MUX-NavigationViewTopNavPage.png
    • MUX-NumberBox.png
  • skia-gtk-screenshots: 7 changed over 1048

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Image-Image_Stretch_None_ScrollViewer.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
  • skia-wpf-screenshots: 9 changed over 1048

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DragAndDrop-DragDrop_TestPage.png
    • Image-UniformToFill100x100.png
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
    • Transform-TransformToVisual_Translate2d.png
  • wasm: 11 changed over 991

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Wasm.Windows_UI_Xaml_Media.Transform.TransformToVisual_Translate2d
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRingPage
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_Features
    • UITests.Windows_UI_Xaml.DragAndDrop.DragDrop_TestPage
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Controls.ProgressRing.WindowsProgressRing_GH1220
    • UITests.Windows_UI_Xaml_Shapes.Offscreen_Shapes
    • Uno.UI.Samples.Samples.Shared.Content.UITests.ImageBrushInList
    • Uno.UI.Samples.UITests.Image.Image_Margin
    • Uno.UI.Samples.UITests.Image.Image_Stretch_Alignment_Taller
  • wasm-automated-net5.0-Benchmarks: 0 changed over 1

  • wasm-automated-net5.0-Default: 7 changed over 877

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DatePicker_Flyout_DatePicker_-_Flyout
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Screenshots_Image_Stretch_Alignment_Smaller_Mode-0
    • Screenshots_Image_Stretch_Algmnt_Inf_Vertical_Mode-0
    • ScrollBar_Vertical_initial_indicators
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • wasm-automated-net5.0-RuntimeTests: 0 changed over 1

Copy link
Member

@jeromelaban jeromelaban left a comment

Choose a reason for hiding this comment

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

Looking good! Can you add a doc file in https://github.com/unoplatform/uno/tree/master/doc/articles/features which minimally explains the instant scroll APIs?

@jeromelaban jeromelaban marked this pull request as draft August 31, 2022 12:38
@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20220823/listview-smooth-scrolling branch from a77d650 to a352416 Compare August 31, 2022 13:19
@Xiaoy312
Copy link
Contributor Author

Looking good! Can you add a doc file in master/doc/articles/features which minimally explains the instant scroll APIs?

added under doc\articles\feature-flags.md instead, as it seems more fitting.

@Xiaoy312 Xiaoy312 marked this pull request as ready for review August 31, 2022 13:20
@Xiaoy312
Copy link
Contributor Author

todo:

  • rerun failed tasks?
    ^ previous build passed with all check marks; and we only changed md since...

@nventive-devops
Copy link
Contributor

The build 53363 found UI Test snapshots differences: android-28-xamarin: 0, android-28-xamarin-Snap: 0, ios: 25, ios-Snap: 78, macOS-screenshots: 47, skia-gtk-screenshots: 6, skia-wpf-screenshots: 6, wasm: 8, wasm-automated-net5.0-Benchmarks: 0, wasm-automated-net5.0-Default: 9, wasm-automated-net5.0-RuntimeTests: 0

Details
  • android-28-xamarin: 0 changed over 0

  • android-28-xamarin-Snap: 0 changed over 0

  • ios: 25 changed over 293

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-3
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-1
    • Screenshots_Image_Stretch_Algmnt_Inf_Horizontal_Mode-2
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-3
    • Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-1
    • Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-2
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-3
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-1
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-2
    • Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-3
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-1
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-2
    • TextBox_RoundedCorners_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_RoundedCorners
  • ios-Snap: 78 changed over 983

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Animations_DoubleAnimation_TranslateX_GenericApp_Views_Content_UITests_Animations_DoubleAnimation_TranslateX
    • Animations_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Background_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Background
    • Border_AutoBorderStretchwithtopmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithtopmargin
    • Brushes_ImageBrushAlignmentXY_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushAlignmentXY
    • Brushes_ImageBrushWithLateSource_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithLateSource
    • Brushes_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform
    • Brushes_UITests_Windows_UI_Xaml_Media_GradientBrushTests_LinearGradientBrush_Change_Stops_UITests_Windows_UI_Xaml_Media_GradientBrushTests_LinearGradientBrush_Change_Stops
    • Buttons_AppBar_KeyBoard_Uno_UI_Samples_Content_UITests_ButtonTestsControl_AppBar_KeyBoard
    • AutoSuggestBox_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Description_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Description
    • Border_AutoBorderStretchwithleftmargin_Uno_UI_Samples_UITests_BorderTestsControl_AutoBorderStretchwithleftmargin
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • Border_NonUniformThicknessandRadius_Uno_UI_Samples_UITests_BorderTestsControl_NonUniformThicknessandRadius
    • Brushes_ImageBrushWithScaleTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithScaleTransform
    • Buttons_Button_Opacity_Automated_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Button_Opacity_Automated
    • Buttons_Hyperlink_Disabled_nVentive_Umbrella_Views_UI_Samples_Content_UITests_ButtonTestsControl_Hyperlink_Disabled
    • Buttons_Simple_TextBlockButton_Uno_UI_Samples_Content_UITests_TextBlockControl_Simple_TextBlockButton
    • Buttons_ToggleSwitch_IsEnable_Automated_Uno_UI_Samples_Content_UITests_ButtonTestsControl_ToggleSwitch_IsEnable_Automated
    • Buttons_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsBasicPage_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsBasicPage
    • Buttons_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsFocusPage_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsFocusPage
    • Clipping_SamplesApp_Windows_UI_Xaml_Clipping_DoubleAnimationClipping_SamplesApp_Windows_UI_Xaml_Clipping_DoubleAnimationClipping
  • macOS-screenshots: 47 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BreadcrumbBar-BreadcrumbBarPage.png
    • Brushes-ImageBrush_Stretch_None.png
    • Buttons-Custom_Button_With_ContentTemplate.png
    • ColorPicker-WinUIColorPickerPage.png
    • Buttons-SplitButtonPage.png
    • Expander-WinUIExpanderPage.png
    • Focus-GetFocus.png
    • Grid-CenteredGridinGridwiththreefixedsizechildren.png
    • Image-Image_Formats.png
    • Info-InfoBarPage.png
    • ItemsRepeater-UniformGridLayout_Simple.png
    • ListView-ListView_IsSelected.png
    • Image-Image_Stretch.png
    • Image-Image_Stretch_Alignment_SizeOnControl.png
    • Image-Image_Stretch_Full_Taller.png
    • Image-Image_Stretch_None_ScrollViewer.png
    • MediaPlayerElement-Original.png
    • MediaPlayerElement-Using .avi.png
    • ListView-ListView_With_ListViews_Count_Measure.png
    • MUX-NavigationViewTopNavOnlyPage.png
  • skia-gtk-screenshots: 6 changed over 1048

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
  • skia-wpf-screenshots: 6 changed over 1048

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUX-WinUIProgressRingPage.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
  • wasm: 8 changed over 991

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Microsoft_UI_Xaml_Controls.ColorPickerTests.ColorPickerSample
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_Features
    • UITests.Toolkit.ElevatedView_CornerRadius
    • UITests.Windows_UI_Xaml_Controls.ProgressRing.WindowsProgressRing_GH1220
    • UITests.Windows_UI_Xaml_Shapes.Offscreen_Shapes
    • Uno.UI.Samples.UITests.Image.Image_Stretch_Alignment_Bigger
    • Uno.UI.Samples.UITests.Image.Image_Stretch_Alignment_Smaller
  • wasm-automated-net5.0-Benchmarks: 0 changed over 1

  • wasm-automated-net5.0-Default: 9 changed over 877

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • ListView_Weird_Measure_During_Arrange_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_Weird_Measure
    • Screenshots_Image_Stretch_Alignment_Taller_Mode-0
    • ScrollBar_Vertical_initial_indicators
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • Validate_Offscreen_Shapes_UITests_Windows_UI_Xaml_Shapes_Offscreen_Shapes
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer
  • wasm-automated-net5.0-RuntimeTests: 0 changed over 1

@Xiaoy312 Xiaoy312 merged commit c58eac0 into master Sep 1, 2022
@Xiaoy312 Xiaoy312 deleted the dev/xygu/20220823/listview-smooth-scrolling branch September 1, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants