-
Notifications
You must be signed in to change notification settings - Fork 636
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
Dyn 5118 webview2 library #13330
Dyn 5118 webview2 library #13330
Conversation
I did the next changes for replacing the WebBrowser component in Library by WebView2: - I added a new .NET 4.8 VS Library Project that will display the Library using WebView2 - All the files from "LibraryViewExtensionMSWebBrowser\Handlers" were copied to "LibraryViewExtensionWebView2\Handlers" without modifications. - All the files from "LibraryViewExtensionMSWebBrowser\ViewModels" were copied to "LibraryViewExtensionWebView2\ViewModels" without modifications. - All the files from"LibraryViewExtension\web\library\resources" were copied to "LibraryViewExtensionWebView2\web\library\resources" without modifications. - The next files were copied from "LibraryViewExtensionMSWebBrowser" without modifications: EventObserver.cs, LibraryViewCustomization.cs, LibraryViewToolTip.cs - The files that were mainly modified/created are: LibraryViewController.cs, LibraryViewExtensionWebView2.csproj, ScriptingObject.cs, ViewExtension.cs, library.html, LibraryView.xaml
src/LibraryViewExtensionMSWebBrowser/LibraryViewExtensionMSWebBrowser.csproj
Show resolved
Hide resolved
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<OutputPath>bin\Release\</OutputPath> | ||
</PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not needed and handled by the copy step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QilongTang I did similar changes like the ones you did for switch from cefSharp to WebBrowser component, I think is you don't specify an output path it will take the one from "$(SolutionDir)Config\CS_SDK.props" (it will be generating the dll files in Dynamo\bin\AnyCPU\Debug).
Please check the changes done for switching to WebBrowser:
https://github.com/DynamoDS/Dynamo/pull/11957/files
Good stuff, can you summarize the changes from these files
|
Fixing tests that were failing related to the change from WebBrowser to WebView2. Also addressing some comments that Aaron suggested.
Fixing missing test
Some functionalities when interacting with the packages guide were broken like: - highlight installed package (with glow animation). - scrolldown automatically. - show/hide dark overlay over Library - show/hide Library when is not needed. - Locate the Guide popup in the right place vertically next to Library Basically the changes are to now use the WebView2.ExecuteScriptAsync() method and passing the parameters correctly, additionally some methods were converted so async for supporting ExecuteScriptAsync() method. Also I noticed that an extra argument for the js method findPackageDiv was added but not all the methods were updated so some functionalities were invalidated due to that. Finally for scrolling down automatically the Library I had to find a specific section of the Library and then scrolling down, because otherwise was not working.
currentGuide.LibraryView = GuideUtilities.FindChild(mainRootElement, libraryViewName); | ||
var dynamoView = (mainRootElement as DynamoView); | ||
if (dynamoView == null) return; | ||
currentGuide.LibraryView = dynamoView.sidebarGrid.Children.OfType<UserControl>().FirstOrDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we have a name we can refer to instead of lookup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QilongTang I've tried to use a Name for it but when compiling there are errors, seems that is an issue with WebView2 and XAML files, I've reported this issue in the next channel:
https://autodesk.slack.com/archives/C042HLQU5HV/p1664561901005029
Although this one looks good from review so far, I am holding on merging since release pipeline blocked for now |
Purpose
Changes for replacing the WebBrowser component in Library by WebView2 component:
(Please keep in mind that most of the files were copied from LibraryViewExtensionMSWebBrowser to LibraryViewExtensionWebView2, only around 9 files were changed, so if you want to see the real changes you will need to compare both folders with a tool like Meld or WinMerge).
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Changes for replacing the WebBrowser component in Library by WebView2 component:
Reviewers
@QilongTang
FYIs