Skip to content

Commit 2686b5d

Browse files
Dyn 5106 webview2 documentation browser (#13212)
* 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-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. * DYN-5106-WebView2-DocumentationBrowser Code Review - changing the visibility for the property FallbackDirectoryName - renaming coreDir by docsDir * 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. Co-authored-by: Aaron (Qilong) <173288704@qq.com>
1 parent 85a4339 commit 2686b5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+143
-98
lines changed

src/DocumentationBrowserViewExtension/Docs/ArgumentNullException.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/CustomNodeNotLoaded.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/Deprecated.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/DereferencingNonPointer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/ErrorPageTemplate.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/ExcelNotInstalled.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/FailedToCastFromNull.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Dynamo Dictionary: https://github.com/DynamoDS/DynamoDictionary_React
1111
-->
1212

13-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
13+
1414
<head>
15-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
15+
1616
<meta charset="UTF-8" />
1717
</head>
1818

src/DocumentationBrowserViewExtension/Docs/FileNotFound.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!DOCTYPE html>
22

3-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
3+
44
<head>
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
5+
66
<meta charset="UTF-8" />
77
</head>
88

src/DocumentationBrowserViewExtension/Docs/IntegerOverflow.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
1+

22
<head>
3-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
3+
44
<meta charset="UTF-8" />
55
</head>
66

src/DocumentationBrowserViewExtension/Docs/InternalError.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!DOCTYPE html>
22

3-
<!-- These headers are required to force the browser embedded in the DocumentationBrowser extension to render in modern IE11 mode. -->
3+
44
<head>
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
5+
66
<meta charset="UTF-8" />
77
</head>
88

0 commit comments

Comments
 (0)