Skip to content

fix: Namespace and logic in ProgressBarAutomationPeer #20501

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

Merged
merged 5 commits into from
May 30, 2025

Conversation

MartinZikmund
Copy link
Member

@MartinZikmund MartinZikmund commented May 22, 2025

GitHub Issue (If applicable): closes #20499

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@MartinZikmund MartinZikmund enabled auto-merge May 22, 2025 10:26
@unodevops
Copy link
Contributor

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

@MartinZikmund MartinZikmund self-assigned this May 22, 2025
@github-actions github-actions bot added area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/build Categorizes an issue or PR as relevant to build infrastructure labels May 22, 2025
@MartinZikmund MartinZikmund requested a review from Copilot May 22, 2025 10:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes namespace issues and refactors the implementation of the ProgressBarAutomationPeer to align with the updated logic requirements. Key changes include:

  • Updating namespace declarations in several files.
  • Refactoring ProgressBarAutomationPeer to inherit from RangeBaseAutomationPeer and use the Owner property.
  • Introducing a TestAutomationPeerListener for testing purposes.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Uno.UI/UI/Xaml/Automation/Peers/RangeBaseAutomationPeer.cs Updated namespace syntax to use the semicolon form.
src/Uno.UI/UI/Xaml/Automation/Peers/AutomationPeer.skia.cs Adjusted getter for AutomationPeerListener to include a test listener.
src/Uno.UI/Microsoft/UI/Xaml/Controls/ProgressBar/ProgressBarAutomationPeer.cs Refactored class inheritance and implementation of IRangeValueProvider to use Owner instead of a local _owner.
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ProgressBar.cs Added tests to validate the new AutomationPeerListener behavior.
build/PackageDiffIgnore.xml Updated package diff ignore settings for ProgressBarAutomationPeer.
Comments suppressed due to low confidence (1)

src/Uno.UI/Microsoft/UI/Xaml/Controls/ProgressBar/ProgressBarAutomationPeer.cs:54

  • [nitpick] Consider renaming GetImpl to GetProgressBar for improved clarity, as it clearly indicates the purpose of casting Owner to ProgressBar.
private ProgressBar GetImpl() => (ProgressBar)Owner;

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@MartinZikmund MartinZikmund requested a review from jeromelaban May 22, 2025 19:22
@MartinZikmund
Copy link
Member Author

@Mergifyio backport release/stable/6.0

Copy link
Contributor

mergify bot commented May 23, 2025

backport release/stable/6.0

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

@MartinZikmund MartinZikmund disabled auto-merge May 23, 2025 09:28
@MartinZikmund MartinZikmund enabled auto-merge May 23, 2025 09:28
@MartinZikmund MartinZikmund force-pushed the dev/mazi/progressbar-reg branch from e275664 to da819ab Compare May 27, 2025 19:24
@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@MartinZikmund MartinZikmund force-pushed the dev/mazi/progressbar-reg branch from da819ab to c9c3a34 Compare May 30, 2025 13:38
@unodevops
Copy link
Contributor

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

@jeromelaban
Copy link
Member

@Mergifyio backport release/stable/6.0

Copy link
Contributor

mergify bot commented May 30, 2025

backport release/stable/6.0

✅ Backports have been created

@nventive-devops
Copy link
Contributor

The build 167251 found UI Test snapshots differences: android-28-net8: 25, android-28-net8-Snap: 41, ios: 4, ios-Snap: 51, skia-linux-screenshots: 78, skia-windows-screenshots: 146, wasm: 35, wasm-automated-net9.0-WinUI-Benchmarks-automated: 1, wasm-automated-net9.0-WinUI-Default-automated: 10, 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: 25 changed over 824

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Button_NestedButtons_Validation_nVentive_Umbrella_Views_UI_Samples_Content_UITests_ButtonTestsControl_Nested_Buttons
    • Detereminate_ProgressRing_Validation0_[#FF0000_#FF0000_#FF0000_#FF0000]_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIDeterminateProgressRing
    • 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_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • SelectionOnLoad_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsInitialLoadSelected
    • SelectionTest_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsPage
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Pivot_Non_PivotItemChange_Validation_UITests_Shared_Windows_UI_Xaml_Controls_Pivot_Pivot_CustomContent_Automated
    • Pivot_Non_PivotItem_Items_UITests_Shared_Windows_UI_Xaml_Controls_Pivot_Pivot_CustomContent_Automated
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
  • android-28-net8-Snap: 41 changed over 1068

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Animations_UITests_Windows_UI_Xaml_Media_Animation_FadeInOutThemeAnimationPage_UITests_Windows_UI_Xaml_Media_Animation_FadeInOutThemeAnimationPage
    • Brushes_ImageBrushChangingCornerRadius_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushChangingCornerRadius
    • Automation_AutomationProperties_AutomationId_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_AutomationId
    • AutoSuggestBox_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Reason_UITests_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Reason
    • AutoSuggestBox_UITests_Shared_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_BasicAutoSuggestBox_UITests_Shared_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_BasicAutoSuggestBox
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • MUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage
    • Border_Border_CornerRadius_with_Opacity_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_with_Opacity
    • Scrolling_MUXControlsTestApp_ScrollViewDynamicPage_MUXControlsTestApp_ScrollViewDynamicPage
    • Scrolling_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage
    • Application_UITests_Windows_UI_Xaml_ApplicationTests_Given_Application_UITests_Windows_UI_Xaml_ApplicationTests_Given_Application
    • Animations_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Background_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Background
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Animations_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Fill_UITests_Windows_UI_Xaml_Media_Animation_ColorAnimation_Fill
    • Icons_UITests_Windows_UI_Xaml_Controls_SymbolIconTests_SymbolIcon_Generic_UITests_Windows_UI_Xaml_Controls_SymbolIconTests_SymbolIcon_Generic
    • MediaPlayerElement_Using_3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_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
    • AutoSuggestBox_UITests_Shared_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Keyboard_UITests_Shared_Windows_UI_Xaml_Controls_AutoSuggestBoxTests_AutoSuggestBox_Keyboard
  • ios: 4 changed over 255

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • ios-Snap: 51 changed over 985

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay
    • ContentPresenter_ContentPresenter_Background_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_Background
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats
    • NavigationView_FluentStyle_NavigationViewSample_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • Performance_UITests_Windows_UI_Xaml_Performance_Performance_1000ButtonsContinuousRendering_UITests_Windows_UI_Xaml_Performance_Performance_1000ButtonsContinuousRendering
    • MediaPlayerElement_Using_3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
    • MenuBar_SimpleMenuBar_UITests_Shared_Windows_UI_Xaml_Controls_MenuBarTests_SimpleMenuBar
    • Brushes_BorderImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_BorderImageBrush
    • 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
    • Brushes_UITests_Windows_UI_Xaml_Media_BrushesTests_RevealBrush_Fallback_UITests_Windows_UI_Xaml_Media_BrushesTests_RevealBrush_Fallback
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse
    • NavigationView_NavigationView_Tapped_UITests_Shared_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Tapped
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • Brushes_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • ToggleSwitch_Native_ToggleSwitch_IsOn_SamplesApp_Windows_UI_Xaml_Controls_ToggleSwitchControl_Native_ToggleSwitch_IsOn
    • Brushes_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Taller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Taller
  • skia-linux-screenshots: 78 changed over 2248

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png
    • ImagesInlineInFlipView.png-dark
    • ImagesInlineInFlipView.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Image_Stretch.png-dark
    • Image_Stretch.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png-dark
    • DragDrop_TestPage.png-dark
    • DragDrop_TestPage.png
    • Examples.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
  • skia-windows-screenshots: 146 changed over 2248

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BorderVisualClipping.png-dark
    • BorderVisualClipping.png
    • Flyout_OverlayInputPassThroughElement.png-dark
    • Flyout_OverlayInputPassThroughElement.png
    • BorderWithNullBrushAndNonZeroThickness.png-dark
    • BorderWithNullBrushAndNonZeroThickness.png
    • CalendarView_Theming.png-dark
    • Buttons.png-dark
    • DragDrop_ListView_Custom_States.png-dark
    • DragDrop_ListView_Custom_States.png
    • DropDownButtonPage.png-dark
    • DynamicBackgroundSizing.png-dark
    • DynamicBackgroundSizing.png
    • Focus_WASM_Tab.png-dark
    • Focus_WASM_Tab.png
    • IconSourceElementTests.png-dark
    • IconSourceElementTests.png
    • DragDrop_TestPage.png-dark
    • DragDrop_TestPage.png
    • Buttons.png
  • wasm: 35 changed over 1052

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.UndefinedHeightListView
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_VisibleBounds
    • UITests.Shared.Windows_UI_Xaml_Controls.ContentDialogTests.ContentDialog_Closing
    • UITests.Windows_UI_Xaml.DragAndDrop.DragDrop_TreeView
    • UITests.Windows_UI_Xaml_Controls.BorderTests.PanelWithNullBrushAndNonZeroThickness
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_IsSelected
    • UITests.Windows_UI_Xaml_Controls.BorderTests.BorderWithNullBrushAndNonZeroThickness
    • UITests.Windows_UI_Xaml_Controls.CommandBar.BackButtonTitle.CommandBar_Frame
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_BoundSelectedItem
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Padding_Unconstrained
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Windows_UI_Xaml_Controls.ComboBox.ComboBox_Stretch
    • UITests.Windows_UI_Xaml_Controls.CommandBar.BackButtonImage.CommandBar_Frame
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.AppBar_KeyBoard
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.Buttons
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.ListView.ListView_DuplicateItem
    • Uno.UI.Samples.Content.UITests.FocusTests.FocusManagerTest
  • wasm-automated-net9.0-WinUI-Benchmarks-automated: 1 changed over 1

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • RunBenchmarks_Benchmarks_Shared_Controls_BenchmarkDotNetTestsPage
  • wasm-automated-net9.0-WinUI-Default-automated: 10 changed over 876

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Default_StrokeThickness_MyPath
    • Default_StrokeThickness_MyEllipse
    • Default_StrokeThickness_MyRect
    • Default_StrokeThickness_MyPolygon
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • ToggleCollapsedStateToVerifyClipping_UITests_Shared_Microsoft_UI_Xaml_Controls_ExpanderTests_ExpanderColorValidationPage
    • Default_StrokeThickness_MyPolyline
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
  • 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

@MartinZikmund MartinZikmund merged commit 046e92b into master May 30, 2025
91 checks passed
@MartinZikmund MartinZikmund deleted the dev/mazi/progressbar-reg branch May 30, 2025 17:06
DevTKSS pushed a commit to DevTKSS/uno that referenced this pull request May 31, 2025
jeromelaban added a commit that referenced this pull request Jun 2, 2025
…6.0/pr-20501

fix: Namespace and logic in `ProgressBarAutomationPeer` (backport #20501)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullReferenceException is thrown from ProgressBar
5 participants