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

Cherry-Pick DYN-5208-DynamoRevit-Crash-Fix (#13245) #13264

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Cherry-Pick DYN-5208-DynamoRevit-Crash-Fix (#13245) #13264

merged 1 commit into from
Aug 30, 2022

Conversation

RobertGlobant20
Copy link
Contributor

Cherry-Pick DYN-5208-DynamoRevit-Crash-Fix (#13245)
#13245

* 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 QilongTang merged commit fa1eebe into DynamoDS:RC2.16.0_master Aug 30, 2022
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.

2 participants