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(macOS): add native elements support for macOS/Skia #18793

Merged
merged 37 commits into from
Nov 18, 2024

Conversation

spouliot
Copy link
Contributor

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

It is not possible to use native controls inside a Skia-based app on macOS.

What is the new behavior?

It's now possible to integrate native controls (some code required) inside Skia-based apps on macOS.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

https://github.com/unoplatform/uno-private/issues/479

spouliot added 30 commits June 28, 2024 09:00
@spouliot spouliot requested a review from ramezgerges November 14, 2024 14:45
@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18793/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-18793/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18793/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-18793/index.html

@nventive-devops
Copy link
Contributor

The build 147346 found UI Test snapshots differences: android-28-net8: 23, android-28-net8-Snap: 47, ios: 4, ios-Snap: 44, skia-gtk-screenshots: 50, skia-linux-screenshots: 49, skia-windows-screenshots: 71, wasm: 408, wasm-automated-net9.0-UWP-Default-automated: 59, 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: 23 changed over 829

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • WebView_NavigateToAnchor_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
    • When_Clip_Is_Set_On_Child_Element_original
    • When_Clip_Is_Set_On_Child_Element_UITests_Windows_UI_Xaml_UIElementTests_UIElement_Clipping
    • When_Clip_Is_Set_On_Child_Element_validation
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Native_View_UITests_Shared_Windows_UI_Xaml_UIElementTests_UIElement_Native_Child
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • android-28-net8-Snap: 47 changed over 1068

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons_AppBarToggleButtonTest_Uno_UI_Samples_Content_UITests_ButtonTestsControl_AppBarToggleButtonTest
    • Buttons_Button_Events_UITests_Shared_Windows_UI_Xaml_Controls_Button_Button_Events
    • Buttons_Button_IsEnabled_Automated_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Button_IsEnabled_Automated
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • TextBox_TextBox_Formatting_Flicker_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_Formatting_Flicker
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • Border_Border_Simple_with_Uniform_Thickness_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_Uniform_Thickness
    • Border_Border_Simple_with_non_Uniform_Thickness_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_non_Uniform_Thickness
    • ListView_ListViewContainerFromItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewContainerFromItem
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • Border_Border_Simple_with_Opacity_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_with_Opacity
    • TextBox_TextBox_MaxLength_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_MaxLength
    • WebView_WebView_NavigateToUri_Uno_UI_Samples_Content_UITests_WebView_WebView_NavigateToUri
    • WebView_WebView2_JavascriptInvoke_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_JavascriptInvoke
    • WebView_WebView2_NavigateToUri_SamplesApp_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigateToUri
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • RatingControl_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage
    • TextBox_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll
  • ios: 4 changed over 267

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
  • ios-Snap: 44 changed over 1059

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_PathImageBrushfill_Uno_UI_Samples_UITests_ImageBrushTestControl_PathImageBrushfill
    • Brushes_UITests_Windows_UI_Xaml_Media_BrushesTests_RevealBrush_Fallback_UITests_Windows_UI_Xaml_Media_BrushesTests_RevealBrush_Fallback
    • ContentControl_ContentControl_Nested_TemplatedParent_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Nested_TemplatedParent
    • ListView_ListViewGroupedChanging_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedChanging
    • ListView_ListView_Image_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Image
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • Image_ImageSourceStream_Uno_UI_Samples_UITests_ImageTestsControl_ImageSourceStream
    • Brushes_BorderImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_BorderImageBrush
    • Brushes_EllipsemaskingEllipseGrid_Uno_UI_Samples_UITests_ImageBrushTestControl_EllipsemaskingEllipseGrid
    • Brushes_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay_UITests_Shared_Windows_UI_Xaml_Media_ImageBrushTests_ImageBrush_SameWithDelay
    • Brushes_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList
    • GridView_GenericApp_Views_Samples_Shared_Content_UITests_GridViewGrouped_GenericApp_Views_Samples_Shared_Content_UITests_GridViewGrouped
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Generic_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Generic
    • ListView_ListViewHeaderImage_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewHeaderImage
    • MUX_MUXControlsTestApp_DropDownButtonPage_MUXControlsTestApp_DropDownButtonPage
    • ListView_ListView_TextBox_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_TextBox
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
    • Brushes_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
  • skia-gtk-screenshots: 50 changed over 2228

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Buttons.png
    • ToggleButton_IsEnabled_Automated.png-dark
    • Examples.png
    • ClipboardTests.png
    • UniformAlignmentCenterInDoubleStackPanelWebUri.png-dark
    • UniformAlignmentCenterInDoubleStackPanelWebUri.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Popup_HVAlignments.png-dark
    • Popup_HVAlignments.png
    • SplitButtonTestsPage.png-dark
    • PasswordBox_AutoFill.png-dark
    • PasswordBox_AutoFill.png
    • ImageIconPage.png-dark
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png
  • skia-linux-screenshots: 49 changed over 2228

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • ClipboardTests.png
    • Buttons.png
    • DisplayInformation.png-dark
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • BorderImageBrushRelativeTransform.png-dark
    • Examples.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Image_UseTargetSize.png-dark
    • Image_UseTargetSize.png
    • Gamepad_CurrentReading.png-dark
    • CalendarView_Theming.png-dark
    • DropDownButtonPage.png-dark
    • ContentPresenter_NativeEmbedding.png-dark
    • ContentPresenter_NativeEmbedding.png
    • ClipboardTests.png-dark
  • skia-windows-screenshots: 71 changed over 2228

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • BorderImageBrushRelativeTransform.png-dark
    • BorderImageBrushRelativeTransform.png
    • Gamepad_CurrentReading.png-dark
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png
    • ClipboardTests.png-dark
    • ImageBrush_SameWithDelay.png-dark
    • ImageBrush_SameWithDelay.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ButtonClippingTestsControl.png-dark
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
  • wasm: 408 changed over 1045

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_AnchorNavigation
    • SamplesApp.Samples.UnitTests.HttpUnitTests
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_With_ItemContainerStyle
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item
    • SamplesApp.Windows_UI_Xaml_Shapes.PathTestsControl.PathBindingOnData
    • UITests.Microsoft_UI_Xaml_Controls.RadioButtonsTests.RadioButtonsInitialLoadSelected
    • UITests.Shared.Windows_Devices.Midi.MidiDeviceOutputTests
    • UITests.Shared.Windows_Graphics_Display.DisplayInformationTests
    • UITests.Shared.Windows_UI_Xaml_Automation.AutomationProperties_Name
    • UITests.Shared.Windows_UI_Xaml_Controls.ContentDialogTests.ContentDialog_ComboBox
    • UITests.Shared.Windows_UI_Xaml_Controls.ControlTests.Control_IsEnabled_Inheritance
    • UITests.Shared.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_TopNavigation
    • UITests.Shared.Windows_UI_Xaml_Controls.Popup.MessageDialog
    • UITests.Toolkit.ElevatedViewTests
    • UITests.Windows_UI_Xaml.xLoadTests.xLoad_Test_For_Leak
    • UITests.Windows_UI_Xaml_Controls.Flyout.Flyout_TemplatedParent
    • UITests.Windows_UI_Xaml_Controls.GridTestsControl.Grid_def_MinMaxValues
    • UITests.Windows_UI_Xaml_Controls.GridTestsControl.Grid_DynamicRowColumn
    • UITests.Windows_UI_Xaml_Controls.GridTestsControl.Grid_in_Canvas
    • GenericApp.Views.Content.UITests.ImageBrushTestControl.ImageBrush_UniformToFill
  • wasm-automated-net9.0-UWP-Default-automated: 59 changed over 1948

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CommandBar_Native_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Native
    • Image_ImageWithLateSourceFixedDimensions_UITests_Windows_UI_Xaml_Controls_ImageTests_ImageWithLateSourceFixedDimensions
    • Default_StrokeThickness_MyRect
    • Default_StrokeThickness_MyRect_0_StrokeThickness
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_FromStream_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_FromStream
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Default_StrokeThickness_MyEllipse_0_StrokeThickness
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • 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_mp3_Audio_only_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mp3_Extension
    • Default_StrokeThickness_MyPath
    • Default_StrokeThickness_MyPolygon
    • Default_StrokeThickness_MyPolygon_0_StrokeThickness
    • Image_Uno_UI_Samples_UITests_ImageTestsControl_Image_Fixed_Size_Alignment_Uno_UI_Samples_UITests_ImageTestsControl_Image_Fixed_Size_Alignment
    • 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
  • 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

@spouliot spouliot merged commit 69cb331 into master Nov 18, 2024
110 checks passed
@spouliot spouliot deleted the dev/spouliot/macos-desktop-native-embedding branch November 18, 2024 19:24
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.

5 participants