Skip to content

feat(wasm): Added ability to call async javascript Promise<string> and await it. - #3190

Merged
carldebilly merged 2 commits into
masterfrom
dev/cdb/wasm-async-invoke-js
May 19, 2020
Merged

carldebilly merged 2 commits into
masterfrom
dev/cdb/wasm-async-invoke-js

Conversation

@carldebilly

Copy link
Copy Markdown
Member

Feature

Implements #3084

What is the new behavior?

It is now possible to await javascript/TypeScript execution when it's returning a Promise<string>.

PR Checklist

Please check if your PR fulfills the following requirements:

@gitpod-io

gitpod-io Bot commented May 19, 2020 •

Copy link
Copy Markdown

@carldebilly carldebilly linked an issue May 19, 2020 that may be closed by this pull request
1 of 8 tasks
@carldebilly
carldebilly force-pushed the dev/cdb/wasm-async-invoke-js branch from dd4e9f8 to 888d283 Compare May 19, 2020 02:17
@carldebilly
carldebilly force-pushed the dev/cdb/wasm-async-invoke-js branch from 888d283 to dede46d Compare May 19, 2020 02:20
@carldebilly carldebilly linked an issue May 19, 2020 that may be closed by this pull request
@carldebilly carldebilly self-assigned this May 19, 2020
@carldebilly carldebilly added the platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform label May 19, 2020
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 15325 found UI Test snapshots differences.

  • android-28: 24 changed over 380

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BasicNavigationView_SamplesApp_Samples_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Pane_Automated
    • ComboBoxTests_Fullscreen_Popup_Generic_Closed
    • ComboBoxTests_Fullscreen_Popup_Generic_Opened
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_4_-_Orientation_Landscape
    • Dismiss_MenuFlyout_AfterSuccess
    • Dismiss_MenuFlyout_fileMenu
    • Keyboard_Textbox_InsideScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • MenuFlyoutItem_ClickTest_AfterSuccess
    • MenuFlyoutItem_ClickTest_menuShown
    • PopupWithOverlay_After
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • Simple_MenuFlyout_AfterSuccess
    • Simple_MenuFlyout_exitMenu
    • Simple_MenuFlyout_openMenu
    • Simple_MenuFlyout_xamlUIMenu
    • Simple_SubMenuFlyout_AfterSuccess
    • Simple_SubMenuFlyout_fileMenu
    • Simple_SubMenuFlyout_newMenu
    • TestManipulation_Result
  • android-28-Snap: 4 changed over 713

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ComboBox_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement
    • ListView_ListViewIncrementalLoading_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewIncrementalLoading
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage
    • TextBox_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll
  • ios: 20 changed over 192

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Keyboard_Textbox_InsideScrollViewer_Validation_1_-_Remove_Focus_on_filledTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Initial_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • ListView_ExpandableItem_ExpandMultipleItems_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Collapsed_State
    • ListView_ExpandableItem_ExpandMultipleItems_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Expanded_State
    • ListView_ExpandableItem_ExpandMultipleItems_Initial_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Initial_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • ListView_ObservableCollection_Unused_Space_1_item
    • ListView_ExpandableItem_ExpandMultipleItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item
    • ListView_ObservableCollection_Unused_Space_3_items
    • ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • TextBox_NaturalSize_When_Empty_Is_Right_Width_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxes_TextBox_NaturalSize
  • ios-Snap: 39 changed over 704

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_Simple_with_Radius_Uno_UI_Samples_UITests_BorderTestsControl_Simple_with_Radius
    • Border_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_Clipped_Change_Property_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_Clipped_Change_Property
    • Button_RadioButton_With_GroupName_Uno_UI_Samples_Content_UITests_ButtonTestsControl_RadioButton_With_GroupName
    • ComboBox_ComboBox_CornerRadius_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_CornerRadius
    • ComboBox_ComboBox_NativePopup_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_NativePopup
    • ContentControlTestsControl_ContentControl_SetNull_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_SetNull
    • ContentControlTestsControl_ContentControl_WithPadding_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_WithPadding
    • ContentPresenter_ContentPresenter_TextProperties_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_TextProperties
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_DatePicker_DatePickerFlyout_MinYear_UITests_Shared_Windows_UI_Xaml_Controls_DatePicker_DatePickerFlyout_MinYear
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • Default_UITests_Windows_UI_Xaml_Controls_RadioButtonTests_RadioButton2450_UITests_Windows_UI_Xaml_Controls_RadioButtonTests_RadioButton2450
    • GradientBrush_UITests_Windows_UI_Xaml_Media_GradientBrushTests_GradientsPage_UITests_Windows_UI_Xaml_Media_GradientBrushTests_GradientsPage
    • GridTestsControl_Grid_with_Stack_Panel_and_Trimming_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_Stack_Panel_and_Trimming
    • GridTestsControl_Grid_with_three_UserControl_With_5_Margin_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_three_UserControl_With_5_Margin
    • GridTestsControl_Grid_with_UserControl_VerticalAlignment_Fixed_Height_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_UserControl_VerticalAlignment_Fixed_Height
    • GridTestsControl_UITests_Shared_Windows_UI_Xaml_Controls_GridTestsControl_Grid_with_MinWidthColumns_UITests_Shared_Windows_UI_Xaml_Controls_GridTestsControl_Grid_with_MinWidthColumns
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • ListView_ListViewGroupedVariableHeightComplexTemplate_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedVariableHeightComplexTemplate
    • ListView_ListViewMarginTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewMarginTest
    • ListView_ListView_BoundSelectedItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_BoundSelectedItem
  • wasm: 2 changed over 713

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Uno.UI.Samples.Content.UITests.Transform.Image_With_RotateTransform
    • Uno.UI.Samples.UITests.Image.Image_Margin
  • wasm-automated: 6 changed over 427

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_FocusManager_-_LostFocus_-_ListViewItem_-_2_-_Click_outside
    • ScrollBar_Vertical_Startup
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • Simple_ContentDialog_01_Secondary_Secondary_Button
    • Simple_SubMenuFlyout_newMenu
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer

@MartinZikmund

Copy link
Copy Markdown
Member

This is super useful, thanks!

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 15325 found UI Test snapshots differences.

  • android-28: 24 changed over 380

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BasicNavigationView_SamplesApp_Samples_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Pane_Automated
    • ComboBoxTests_Fullscreen_Popup_Generic_Opened
    • ComboBoxTests_Fullscreen_Popup_Generic_Closed
    • CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_4_-_Orientation_Landscape
    • Keyboard_Textbox_InsideScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • Dismiss_MenuFlyout_AfterSuccess
    • Dismiss_MenuFlyout_fileMenu
    • Keyboard_Textbox_NoScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox
    • MenuFlyoutItem_ClickTest_AfterSuccess
    • MenuFlyoutItem_ClickTest_menuShown
    • PopupWithOverlay_After
    • Simple_MenuFlyout_AfterSuccess
    • Simple_MenuFlyout_exitMenu
    • Simple_MenuFlyout_openMenu
    • Simple_MenuFlyout_xamlUIMenu
    • Simple_SubMenuFlyout_AfterSuccess
    • Simple_SubMenuFlyout_fileMenu
    • Simple_SubMenuFlyout_newMenu
    • TestManipulation_Result
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
  • android-28-Snap: 4 changed over 713

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ComboBox_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement
    • ListView_ListViewIncrementalLoading_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewIncrementalLoading
    • Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage
    • TextBox_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll
  • ios: 19 changed over 192

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Keyboard_Textbox_InsideScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox
    • Keyboard_Textbox_InsideScrollViewer_Validation_2_-_Remove_Focus_on_placeholderTextTextBox
    • Keyboard_Textbox_NoScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_Initial_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithMultipleItems_Validation_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Collapsed_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Expanded_State
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_Initial_State
    • ListView_ObservableCollection_Unused_Space_1_item
    • ListView_ExpandableItemLarge_ExpandHeaderWithSingleItem_Validation_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item_Large
    • ListView_ObservableCollection_Unused_Space_3_items
    • ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • ListView_ExpandableItem_ExpandSingleItem_Collapsed_State
    • ListView_ExpandableItem_ExpandSingleItem_Expanded_State
    • ListView_ExpandableItem_ExpandSingleItem_Initial_State
    • ListView_ExpandableItem_ExpandSingleItem_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Expandable_Item
  • ios-Snap: 40 changed over 704

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_Clipped_Change_Property_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_Clipped_Change_Property
    • Border_Simple_with_Radius_Uno_UI_Samples_UITests_BorderTestsControl_Simple_with_Radius
    • Button_RadioButton_With_GroupName_Uno_UI_Samples_Content_UITests_ButtonTestsControl_RadioButton_With_GroupName
    • ComboBox_ComboBox_CornerRadius_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_CornerRadius
    • ComboBox_ComboBox_NativePopup_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ComboBox_ComboBox_NativePopup
    • CommandBar_UITests_Windows_UI_Xaml_Controls_CommandBar_CommandBar_Native_With_Content_UITests_Windows_UI_Xaml_Controls_CommandBar_CommandBar_Native_With_Content
    • ContentControlTestsControl_ContentControl_WithPadding_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_WithPadding
    • ContentControlTestsControl_ContentControl_SetNull_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_SetNull
    • ContentPresenter_ContentPresenter_TextProperties_Uno_UI_Samples_Content_UITests_ContentPresenter_ContentPresenter_TextProperties
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_DatePicker_DatePickerFlyout_MinYear_UITests_Shared_Windows_UI_Xaml_Controls_DatePicker_DatePickerFlyout_MinYear
    • Default_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_ObservableCollection_Unused_Space
    • Default_UITests_Windows_UI_Xaml_Controls_RadioButtonTests_RadioButton2450_UITests_Windows_UI_Xaml_Controls_RadioButtonTests_RadioButton2450
    • GradientBrush_UITests_Windows_UI_Xaml_Media_GradientBrushTests_GradientsPage_UITests_Windows_UI_Xaml_Media_GradientBrushTests_GradientsPage
    • GridTestsControl_Grid_with_three_UserControl_With_5_Margin_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_three_UserControl_With_5_Margin
    • GridTestsControl_Grid_with_UserControl_VerticalAlignment_Fixed_Height_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_UserControl_VerticalAlignment_Fixed_Height
    • GridTestsControl_UITests_Shared_Windows_UI_Xaml_Controls_GridTestsControl_Grid_with_MinWidthColumns_UITests_Shared_Windows_UI_Xaml_Controls_GridTestsControl_Grid_with_MinWidthColumns
    • GridTestsControl_Grid_with_Stack_Panel_and_Trimming_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_Stack_Panel_and_Trimming
    • Image_ImageUniformWithinScrollViewer_Uno_UI_Samples_UITests_ImageTestsControl_ImageUniformWithinScrollViewer
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • ListView_ListViewGroupedVariableHeightComplexTemplate_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewGroupedVariableHeightComplexTemplate
  • wasm: 2 changed over 713

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Uno.UI.Samples.Content.UITests.Transform.Image_With_RotateTransform
    • Uno.UI.Samples.UITests.Image.Image_Margin
  • wasm-automated: 6 changed over 427

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • FocusManager_GetFocusedElement_ListViewItem_LostFocus_Validation_FocusManager_-_LostFocus_-_ListViewItem_-_2_-_Click_outside
    • Simple_SubMenuFlyout_newMenu
    • ScrollBar_Vertical_Startup
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • Simple_ContentDialog_01_Secondary_Secondary_Button
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer

@carldebilly carldebilly changed the title feat(wasm): Added ability to call async javascript Promise<string> and awaits it. feat(wasm): Added ability to call async javascript Promise<string> and await it. May 19, 2020
@carldebilly
carldebilly merged commit d1574aa into master May 19, 2020
@carldebilly
carldebilly deleted the dev/cdb/wasm-async-invoke-js branch May 19, 2020 11:49
Comment thread src/Uno.Foundation/Runtime.wasm.cs Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to invoke async JavaScript functions and methods WebAssemblyRuntime.InvokeJS get value from callback?

5 participants