Cherry-Pick DYN-5208-DynamoRevit-Crash-Fix (#13245)#13264
Merged
QilongTang merged 1 commit intoDynamoDS:RC2.16.0_masterfrom Aug 30, 2022
RobertGlobant20:RC2.16.0_master
Merged
Cherry-Pick DYN-5208-DynamoRevit-Crash-Fix (#13245)#13264QilongTang merged 1 commit intoDynamoDS:RC2.16.0_masterfrom RobertGlobant20:RC2.16.0_master
QilongTang merged 1 commit intoDynamoDS:RC2.16.0_masterfrom
RobertGlobant20:RC2.16.0_master
Conversation
* Squashed commit of the following: commit c81f3fe Merge: 98ff9c0 7240196 Author: t-tellro <[email protected]> Date: Thu Aug 25 12:46:28 2022 -0500 Merge branch 'master' into DYN-5106-WebView2-DocumentationBrowser commit 98ff9c0 Author: t-tellro <[email protected]> Date: Thu Aug 25 12:32:33 2022 -0500 DYN-5106-WebView2-DocumentationBrowser DocumentationBrowser was crashing in Dynamo for Revit due that WebView2 was trying to create the cache folder in the path "C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit" due to permissions so in this fix I'm changing the folder to use the AppData for Revit "C:\Users\roberto.tellez\AppData\Roaming\Dynamo\Dynamo Revit\2.16". The same medicin was applied for the WebView2 used in Guided Tours, when using the ResourceUtilities.LoadWebBrowser() method it will using the cache folder passed as parameter. commit 715626f Merge: 979f0fc 3491e96 Author: t-tellro <[email protected]> Date: Tue Aug 16 13:12:47 2022 -0500 Merge branch 'master' into DYN-5106-WebView2-DocumentationBrowser commit 979f0fc Author: t-tellro <[email protected]> Date: Mon Aug 15 22:46:10 2022 -0500 DYN-5106-WebView2-DocumentationBrowser Code Review Fixing CanCreateNodeDocumenationHtmlFromNodeAnnotationEventArgsWithPackageNodeWithAddtionalDocumentation test due that it was using and old format of the html <img> tab, then I updated the image to use the virtual folder and http. commit 284eb7a Merge: ab4326d b95ef11 Author: Roberto T <[email protected]> Date: Mon Aug 15 13:48:44 2022 -0500 Merge branch 'master' into DYN-5106-WebView2-DocumentationBrowser commit ab4326d Merge: dc993a0 fc26f34 Author: t-tellro <[email protected]> Date: Mon Aug 15 13:43:15 2022 -0500 Merge branch 'DYN-5106-WebView2-DocumentationBrowser' of https://github.com/RobertGlobant20/Dynamo into DYN-5106-WebView2-DocumentationBrowser commit dc993a0 Author: t-tellro <[email protected]> Date: Mon Aug 15 13:42:26 2022 -0500 DYN-5106-WebView2-DocumentationBrowser Code Review - changing the visibility for the property FallbackDirectoryName - renaming coreDir by docsDir commit fc26f34 Merge: b0526ab 933f16c Author: Aaron (Qilong) <[email protected]> Date: Mon Aug 15 10:00:24 2022 -0700 Merge branch 'master' into DYN-5106-WebView2-DocumentationBrowser commit b0526ab Author: t-tellro <[email protected]> Date: Fri Aug 12 18:52:22 2022 -0500 DYN-5106-WebView2-DocumentationBrowser Code Review Due that the fallback_doc directory path can change depending if Dynamo is executed as Sandbox or if is over Revit then the path can be different so I added a code that will create the virtual directory depending of the correct fallback_doc directory path. Also I modified the Md2Html class so now it will be inserting in the image source (<img src) the prefix "http://appassets" so it can be loaded from a virtual directory created by the DocumentationBrowser. commit 417069a Merge: 0c12dff bef463e Author: t-tellro <[email protected]> Date: Thu Aug 11 18:11:39 2022 -0500 Merge branch 'master' into DYN-5106-WebView2-DocumentationBrowser commit 0c12dff Author: t-tellro <[email protected]> Date: Thu Aug 11 18:01:50 2022 -0500 DYN-5106-WebView2-DocumentationBrowser I replaced the WebBrowser component by WebView2 in the file DocumentationBrowserView.xaml, also I added some functions for initializing WebView2, The method ShouldAllowNavigation was modified due that WebView2 doesn't have the Navigating event and also the event handler receive different parameters then modified the function to implement the same behavior than the previous one. Also I noticed that WebView2 CORS was blocking to load the jpg images that are shown for several nodes, then I had to create a mapped virtual directory in this way the html will be able to load the images and show them in the web page. Finally I removed a tag in all the html that was making the web page compatible for IE based browsers (due that now we are using WebView2 a Chromium based browser). * DYN-5208-DynamoRevit-Crash-Fix Removing comment. * DYN-5208-DynamoRevit-Crash-Fix Updating comment * DYN-5208-DynamoRevit-Crash-Fix Code Review Fix that will create the WebView2 cache folder always in the AppData path. e.g. Revit C:\Users\roberto.tellez\AppData\Roaming\Dynamo\Dynamo Revit\2.16 Sandbox C:\Users\roberto.tellez\AppData\Roaming\Dynamo\Dynamo Core\2.16 * DYN-5208-DynamoRevit-Crash-Fix Code Review 2 Fix that will set the WebView2.UserDataFolder only when the popup is using an html page. * DYN-5208-DynamoRevit-Crash-Fix Code Review 2 Updating comment due that was specific to Revit.
QilongTang
approved these changes
Aug 30, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-Pick DYN-5208-DynamoRevit-Crash-Fix (#13245)
#13245