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

fix(listview): setting SelectedItem during list refresh leaves blank in items on wasm/skia #19654

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

Xiaoy312
Copy link
Contributor

@Xiaoy312 Xiaoy312 commented Mar 7, 2025

GitHub Issue (If applicable): closes unoplatform/kahua-private#272

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

On Wasm/Skia, when setting ListView::SelectedItem during the list refresh/rebuild will causes any item before the selected one to be render as blank.

What is the new behavior?

^ not anymore.

PR Checklist

Please check if your PR fulfills the following requirements:

@Xiaoy312 Xiaoy312 marked this pull request as ready for review March 7, 2025 19:12
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19654/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19654/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 157200 has failed on Uno.UI - CI.

@Xiaoy312 Xiaoy312 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 17, 2025
@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20250307/lv-scrollintoview-mid-refresh branch from 89f1e1d to 0b923d5 Compare March 18, 2025 01:47
@Xiaoy312 Xiaoy312 removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 18, 2025
@Xiaoy312
Copy link
Contributor Author

The vote was reset, because the PR has been completely changed (minus the new test).

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19654/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19654/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 157867 has failed on Uno.UI - CI.

@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20250307/lv-scrollintoview-mid-refresh branch from 0b923d5 to 20c0e90 Compare March 18, 2025 12:52
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19654/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19654/index.html

@nventive-devops
Copy link
Contributor

The build 157913 found UI Test snapshots differences: android-28-net8: 20, android-28-net8-Snap: 43, ios: 9, ios-Snap: 48, skia-gtk-screenshots: 65, skia-linux-screenshots: 46, skia-windows-screenshots: 69, wasm: 146, wasm-automated-net9.0-UWP-Default-automated: 9, wasm-automated-net9.0-UWP-RuntimeTests-0: 0, wasm-automated-net9.0-UWP-RuntimeTests-1: 0, wasm-automated-net9.0-UWP-RuntimeTests-2: 0, wasm-automated-net9.0-WinUI-Benchmarks-automated: 0, wasm-automated-net9.0-WinUI-RuntimeTests-0: 0, wasm-automated-net9.0-WinUI-RuntimeTests-1: 0, wasm-automated-net9.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net8: 20 changed over 829

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_4_-_Orientation_Landscape
    • ContentPresenter_Changing_ContentTemplate_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Changing_ContentTemplate
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • Detereminate_ProgressRing_Validation0_[#FF0000_#FF0000_#FF0000_#FF0000]_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIDeterminateProgressRing
    • DoesNotInterfereWithHorizontalDrag_UITests_Microsoft_UI_Xaml_Controls_RefreshContainerTests_RefreshContainerHorizontalScroll
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • FlyoutTest_When_NoOverlayInputPassThroughElement_Then_DontPassThrough_woOn_UITests_Shared_Windows_UI_Xaml_Controls_Flyout_Flyout_OverlayInputPassThroughElement
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • TextBox_PageLoadedTest_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_TextChanged
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • ContentPresenter_Template_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Template
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
  • android-28-net8-Snap: 43 changed over 1067

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ListView_ListViewLarge_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewLarge
    • Icons_UITests_Windows_UI_Xaml_Controls_SymbolIconTests_SymbolIcon_Generic_UITests_Windows_UI_Xaml_Controls_SymbolIconTests_SymbolIcon_Generic
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavOnlyPage_MUXControlsTestApp_NavigationViewTopNavOnlyPage
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavPage_MUXControlsTestApp_NavigationViewTopNavPage
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • ListView_ListView_FirstLastCacheIndex_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_FirstLastCacheIndex
    • Scrolling_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage
    • Scrolling_MUXControlsTestApp_ScrollViewWithScrollControllersPage_MUXControlsTestApp_ScrollViewWithScrollControllersPage
    • WebView_WebView_JavascriptInvoke_Uno_UI_Samples_Content_UITests_WebView_WebView_JavascriptInvoke
    • WebView_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties
    • WebView_UITests_Windows_UI_Xaml_Controls_WebView_WebView_Title_UITests_Windows_UI_Xaml_Controls_WebView_WebView_Title
    • WebView_WebView2_Alert_UITests_Shared_Windows_UI_Xaml_WebView2_Alert
    • WebView_WebView2_ChromeClient_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_ChromeClient
    • WebView_WebView2_JavascriptInvoke_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_JavascriptInvoke
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • WebView_WebView2_Mailto_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_Mailto
    • WebView_WebView2_NavigateToString2_UITests_Shared_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigateToString2
  • ios: 9 changed over 267

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • ios-Snap: 48 changed over 1058

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay
    • ListView_ListViewGroupedChanging_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedChanging
    • ListView_ListViewGroupedEmptyHeader_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedEmptyHeader
    • Brushes_ImageBrushStretch2_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch2
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • Image_EmptyImageFixedWidth_Uno_UI_Samples_UITests_ImageTestsControl_EmptyImageFixedWidth
    • TextBlock_TextBlock_FixedWidth_With_DataBound_Run_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlock_FixedWidth_With_DataBound_Run
    • Brushes_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • ContentPresenter_ContentPresenter_Background_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Background
    • Icons_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage
    • ListView_ListView_With_ListViews_Count_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • Brushes_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform
    • Brushes_UITests_Windows_UI_Xaml_Media_BrushesTests_RevealBrush_Fallback_UITests_Windows_UI_Xaml_Media_BrushesTests_RevealBrush_Fallback
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Bigger_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Bigger
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal
    • NavigationView_NavigationViewSample_SamplesApp_Samples_NavigationViewSample_NavigationViewSample
    • NavigationView_NavigationView_BasicNavigation_SamplesApp_Samples_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_BasicNavigation
    • ListView_ScrollIntoViewTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_ScrollIntoViewTest
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
  • skia-gtk-screenshots: 65 changed over 2240

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • NetworkInformation.png-dark
    • NetworkInformation.png
    • CompositionPath.png
    • BorderImageBrush.png
    • Gamepad_Enumeration.png
    • WinUIExpanderPage.png-dark
    • WinUIExpanderPage.png
    • CompositionPath.png-dark
    • Ellipse.png-dark
    • TextBlock_RelativeTextSize.png-dark
    • TextBlock_RelativeTextSize.png
    • UIElement_Layout_Bug2879.png-dark
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Examples.png
    • ImageBrush_SameWithDelay.png-dark
    • ImageBrush_SameWithDelay.png
    • ListViewHeaderUpdate.png-dark
  • skia-linux-screenshots: 46 changed over 2240

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ClipboardTests.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • CalendarView_Theming.png-dark
    • DragDrop_TestPage.png-dark
    • DragDrop_TestPage.png
    • Examples.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • CalendarView_Theming.png
    • CompositionPath.png-dark
  • skia-windows-screenshots: 69 changed over 2240

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • CalendarView_Theming.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Buttons.png-dark
    • Buttons.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Ellipse.png-dark
    • Ellipse.png
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png
    • ButtonClippingTestsControl.png
    • Image_UseTargetSize.png-dark
    • Image_UseTargetSize.png
    • BorderImageBrushRelativeTransform.png-dark
    • DropDownButtonPage.png-dark
  • wasm: 146 changed over 1043

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUXControlsTestApp.NavigationViewMenuItemStretchPage
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_ItemsSource
    • SamplesApp.Windows_UI_Xaml.Clipping.DoubleAnimationClipping
    • UITests.Shared.Windows_Globalization.Language_Properties
    • UITests.Shared.Windows_UI_Xaml_Controls.TextBoxTests.TextBox_Disabled
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_FromStream
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_MultiLoad
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_ClipboardMethods
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_Description
    • MUXControlsTestApp.NavigationViewCompactPaneLengthTestPage
    • MUXControlsTestApp.NavigationViewStretchPage
    • SamplesApp.Samples.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_BasicNavigation
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewHeaderFooter_ImplicitlyBinded
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Padding
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewSelectionAndScrolling
    • UITests.Shared.Windows_UI_Xaml.Localization.Localization_Implicit
    • UITests.Windows_UI_Xaml.FocusTests.Focus_FocusVisual_Properties
    • UITests.Windows_UI_Xaml_Controls.ScrollViewerTests.ScrollViewer_Padding
    • Uno.UI.Samples.Content.UITests.GridTestsControl.Grid_InsideStackPanel_InsideButton
    • MUXControlsTestApp.NavigationViewAnimationPage
  • wasm-automated-net9.0-UWP-Default-automated: 9 changed over 880

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • When_HollowCircle2_UITests_Windows_UI_Input_PointersTests_HitTest_GeometryGroup
    • Default_StrokeThickness_MyPath
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • Validate_Offscreen_Shapes_UITests_Windows_UI_Xaml_Shapes_Offscreen_Shapes
    • Screenshots_Image_Stretch_Alignment_Bigger_Mode-0
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Default_StrokeThickness_MyPolyline
  • wasm-automated-net9.0-UWP-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-UWP-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-UWP-RuntimeTests-2: 0 changed over 1

  • wasm-automated-net9.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-2: 0 changed over 1

@Xiaoy312 Xiaoy312 added the ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met label Mar 19, 2025
@jeromelaban jeromelaban merged commit 87b1996 into master Mar 21, 2025
115 checks passed
@jeromelaban jeromelaban deleted the dev/xygu/20250307/lv-scrollintoview-mid-refresh branch March 21, 2025 01:06
@jeromelaban
Copy link
Member

@Mergifyio backport release/stable/5.6

Copy link
Contributor

mergify bot commented Mar 21, 2025

backport release/stable/5.6

✅ Backports have been created

jeromelaban added a commit that referenced this pull request Mar 21, 2025
…5.6/pr-19654

fix(listview): setting SelectedItem during list refresh leaves blank in items on wasm/skia (backport #19654)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants