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): header losing datacontext on ios between frame navigation #14607

Merged

Conversation

Xiaoy312
Copy link
Contributor

@Xiaoy312 Xiaoy312 commented Nov 28, 2023

GitHub Issue (If applicable): closes #13173
Internal Issue (If applicable): unoplatform/tradezero-private#44

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

What is the new behavior?

prevent ios listview header from losing data-context between frame navigation

Copilot Summary

🤖[deprecated] Generated by Copilot at 14689be

Override MovedToWindow method of ListViewBase on iOS to fix header data context bug. Call UpdateHeaderAndFooter method of internal items panel when the list view has a window.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

@github-actions github-actions bot added the platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform label Nov 28, 2023
@Xiaoy312
Copy link
Contributor Author

saving top comment

@unodevops
Copy link
Contributor

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

@Xiaoy312 Xiaoy312 force-pushed the dev/xygu/20231128/ios-listview-header-dc-corruption branch from 14689be to 868c3ad Compare November 29, 2023 21:18
@unodevops
Copy link
Contributor

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

@jeromelaban
Copy link
Member

@Mergifyio backport release/stable/5.0 release/stable/4.10 release/stable/4.9 legacy/4x

Copy link
Contributor

mergify bot commented Nov 30, 2023

backport release/stable/5.0 release/stable/4.10 release/stable/4.9 legacy/4x

✅ Backports have been created

@nventive-devops
Copy link
Contributor

The build 103655 found UI Test snapshots differences: android-28-net7: 0, android-28-net7-Snap: 59, ios: 227, ios-Snap: 675, skia-gtk-screenshots: 19, skia-wpf-screenshots: 18, wasm: 27, wasm-automated-net7.0-UWP-Benchmarks: 0, wasm-automated-net7.0-UWP-Default: 29, wasm-automated-net7.0-UWP-RuntimeTests: 0, wasm-automated-net7.0-WinUI-RuntimeTests: 0

Details
  • android-28-net7: 0 changed over 1

  • android-28-net7-Snap: 59 changed over 1049

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • PagerControl_UITests_Microsoft_UI_Xaml_Controls_PagerControlTests_PagerControlPage_UITests_Microsoft_UI_Xaml_Controls_PagerControlTests_PagerControlPage
    • Pickers_UITests_Shared_Windows_UI_Xaml_Controls_TimePicker_TimePicker_Flyout_Automated_Reload_UITests_Shared_Windows_UI_Xaml_Controls_TimePicker_TimePicker_Flyout_Automated_Reload
    • Brushes_BorderImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_BorderImageBrush
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize
    • ListView_ListViewLargeLegacy_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewLargeLegacy
    • ListView_ListView_WithScrollViewer_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_WithScrollViewer
    • ListView_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_VirtualizePanelAdaptaterIdCache_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_VirtualizePanelAdaptaterIdCache
    • MUX_UITests_Microsoft_UI_Xaml_Controls_SplitButtonTests_SplitButtonPage_UITests_Microsoft_UI_Xaml_Controls_SplitButtonTests_SplitButtonPage
    • TextBlock_TextBlock_Hyperlink_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlock_Hyperlink
    • Automation_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • Image_ImageSourceStream_Uno_UI_Samples_UITests_ImageTestsControl_ImageSourceStream
    • ListView_ListViewIncrementalLoading_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewIncrementalLoading
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressBar_WinUIProgressBarSimple_UITests_Microsoft_UI_Xaml_Controls_ProgressBar_WinUIProgressBarSimple
    • TextBlock_TextBlockMultilineInStarStackPanel_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlockMultilineInStarStackPanel
    • RatingControl_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage
    • Image_Image_Stretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
  • ios: 227 changed over 266

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Check_CornerRadius_Border_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerRadius_Toggle
    • ContentPresenter_Template_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Template
    • Keyboard_Textbox_NoScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
    • ListView_SelectedItem_Both_Selection_Changed
    • ScrollViewer_Removed_And_Added_Restored
    • ScrollViewer_Removed_And_Added_UITests_Windows_UI_Xaml_Controls_ScrollViewerTests_ScrollViewer_Add_Remove
    • TwoStates_UITests_Shared_Windows_UI_Xaml_Controls_CheckBoxTests_CheckBox_Automated
    • When_Background_Updated_UITests_Windows_UI_Xaml_Controls_PageTests_Page_Update_Background
    • When_Navigated_CommandBarDisplayCustomBackButtonIcon_NativeFrame_UITests_Windows_UI_Xaml_Controls_CommandBar_BackButtonImage_CommandBar_Frame
    • When_Navigated_CommandBarShouldHideBackButtonTitle_NativeFrame_UITests_Windows_UI_Xaml_Controls_CommandBar_BackButtonTitle_CommandBar_Frame
    • Check_CornerRadius_Border_No_CornerRadius
    • Button_OverlappedButtons_UITests_Shared_Windows_UI_Xaml_Controls_Button_Overlapped_Buttons
    • ContentPresenter_Changing_ContentTemplate_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Changing_ContentTemplate
    • ContentControl_Changing_ContentTemplate_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Changing_ContentTemplate
    • ComboBoxTests_ToggleDisabled_UITests_Windows_UI_Xaml_Controls_ComboBox_ComboBox_ToggleDisabled
    • HyperlinkButton_IsEnabled_Validation_Uno_UI_Samples_Content_UITests_ButtonTestsControl_HyperlinkButton_IsEnabled_Automated
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • ListView_SelectedItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_SelectedItem
    • ListView_ObservableCollection_Creation_Count_Scrolled1
  • ios-Snap: 675 changed over 1040

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Animations_DoubleAnimation_opacity_final_state_UITests_Windows_UI_Xaml_Media_Animation_DoubleAnimation_FinalState_Opacity
    • Animations_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimationUsingKeyFrames_Fill_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimationUsingKeyFrames_Fill
    • AutoSuggestBox_AutoSuggestBoxChosenSuggestion_UITests_Shared_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBoxChosenSuggestion
    • AutoSuggestBox_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Reason_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Reason
    • Border_BorderRightwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderRightwithmargins
    • Border_Border_Simple_No_Background_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background
    • Border_UITests_Windows_UI_Xaml_Controls_BorderTests_Border_LinearGradientBrush_UITests_Windows_UI_Xaml_Controls_BorderTests_Border_LinearGradientBrush
    • Brushes_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform
    • Brushes_Rectangle_Uno_UI_Samples_UITests_ImageBrushTestControl_Rectangle
    • Brushes_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay
    • ContentControl_ContentControl_FindName_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_FindName
    • ContentControl_ContentControl_Inheritance_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Inheritance
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_WebView_WebView_Animated_Opacity_UITests_Shared_Windows_UI_Xaml_Controls_WebView_WebView_Animated_Opacity
    • Default_UITests_Toolkit_ElevatedView_CornerRadius_UITests_Toolkit_ElevatedView_CornerRadius
    • DragAndDrop_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_ListView_Custom_States_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_ListView_Custom_States
    • DragAndDrop_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_TreeView_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_TreeView
    • Flyouts_UITests_Windows_UI_Xaml_Controls_Flyout_Flyout_TemplatedParent_UITests_Windows_UI_Xaml_Controls_Flyout_Flyout_TemplatedParent
    • Flyouts_UITests_Windows_UI_Xaml_Controls_MenuFlyoutTests_MenuFlyoutSubItem_Placement_UITests_Windows_UI_Xaml_Controls_MenuFlyoutTests_MenuFlyoutSubItem_Placement
    • Gesture_Recognizer_UITests_Shared_Windows_UI_Input_GestureRecognizerTests_TappedTest_UITests_Shared_Windows_UI_Input_GestureRecognizerTests_TappedTest
    • Gesture_Recognizer_UITests_Shared_Windows_UI_Input_GestureRecognizerTests_TransformationsHoverSibling_UITests_Shared_Windows_UI_Input_GestureRecognizerTests_TransformationsHoverSibling
  • skia-gtk-screenshots: 19 changed over 1138

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ListView-ListViewSelectedItems.png
    • Progress-ProgressRingHeightTest.png
    • Progress-WindowsProgressRing_GH1220.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
    • MediaPlayerElement-Mini player.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Automation-AutomationProperties_Name.png
    • TextBlock-TextBlock_FixedWidth_With_DataBound_Run.png
    • PipsPager-PipsPagerExamples.png
    • MediaPlayerElement-Using .3gp.png
    • MUX-WinUIProgressRingPage.png
    • TextBlock-TextBoxSizeChanging.png
    • Windows.Graphics.Display-DisplayInformation.png
    • Windows.UI.Composition-CompositionMaskBrush.png
    • Windows.UI.Composition-CompositionVisualSurface.png
    • Windows.UI.Composition-RedirectVisual.png
    • WinUI-PipsPagerExamples.png
  • skia-wpf-screenshots: 18 changed over 1138

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes-ImageBrush_StreamSource.png
    • Automation-AutomationProperties_Name.png
    • ListView-ListViewSelectedItems.png
    • Image-ImageSourceStream.png
    • Progress-ProgressRingHeightTest.png
    • Progress-WindowsProgressRing_GH1220.png
    • DragAndDrop-DragDrop_TestPage.png
    • MUX-WinUIProgressRingPage.png
    • MediaPlayerElement-Using .mp3 (Audio only).png
    • PipsPager-PipsPagerExamples.png
    • Windows.UI.Composition-CompositionMaskBrush.png
    • Windows.UI.Composition-CompositionVisualSurface.png
    • Windows.UI.Composition-RedirectVisual.png
    • WinUI-PipsPagerExamples.png
    • MUX-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRingPage.png
    • Progress-WinUIProgressRing_CustomSources.png
    • Progress-WinUIProgressRing_Features.png
  • wasm: 27 changed over 1045

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUXControlsTestApp.PaneLayoutTestPage
    • MUXControlsTestApp.SwipeControlPage2
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRingPage
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_CustomSources
    • MUXControlsTestApp.PipsPagerExamples
    • SamplesApp.Samples.Microsoft_UI_Xaml_Controls.NavigationViewTests.FluentStyle.FluentStyle_NavigationViewSample
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewPage
    • MUXControlsTestApp.NavigationViewCompactPaneLengthTestPage
    • SamplesApp.Samples.NavigationViewSample.NavigationViewSample
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.ProgressRingHeightTest
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_3gp_Extension
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Avi_Extension
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Stretch_Fill
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Windows_UI_ViewManagement.ApplicationViewSizing
    • MUXControlsTestApp.NavigationViewAnimationPage
    • UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRing_Features
    • UITests.Shared.Windows_UI_Xaml_Automation.AutomationProperties_Name
  • wasm-automated-net7.0-UWP-Benchmarks: 0 changed over 1

  • wasm-automated-net7.0-UWP-Default: 29 changed over 1938

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DatePicker_Flyout_DatePicker_-_Flyout
    • Automation_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • PipsPager_MUXControlsTestApp_PipsPagerExamples_MUXControlsTestApp_PipsPagerExamples
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • MediaPlayerElement_Sources_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Sources
    • MediaPlayerElement_Using_3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • MediaPlayerElement_Using_avi_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Avi_Extension
    • MediaPlayerElement_Using_flv_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Flv_Extension
    • MediaPlayerElement_Using_mkv_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mkv_Extension
    • MediaPlayerElement_Using_mov_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mov_Extension
    • MediaPlayerElement_Using_mp3_Audio_only_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mp3_Extension
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
    • MediaPlayerElement_MediaPlayerElement_Stretch_Fill_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Stretch_Fill
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_CustomSources_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_CustomSources
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • Progress_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
  • wasm-automated-net7.0-UWP-RuntimeTests: 0 changed over 1

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

@jeromelaban jeromelaban merged commit 979db60 into master Nov 30, 2023
86 checks passed
@jeromelaban jeromelaban deleted the dev/xygu/20231128/ios-listview-header-dc-corruption branch November 30, 2023 16:46
jeromelaban added a commit that referenced this pull request Dec 4, 2023
…5.0/pr-14607

fix(listview): header losing datacontext on ios between frame navigation (backport #14607)
jeromelaban added a commit that referenced this pull request Dec 4, 2023
…4.10/pr-14607

fix(listview): header losing datacontext on ios between frame navigation (backport #14607)
jeromelaban added a commit that referenced this pull request Dec 4, 2023
…4.9/pr-14607

fix(listview): header losing datacontext on ios between frame navigation (backport #14607)
jeromelaban added a commit that referenced this pull request Dec 4, 2023
fix(listview): header losing datacontext on ios between frame navigation (backport #14607)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS] ListView Header/HeaderTemplate changes DataContext incorrectly
4 participants