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

DocumentationBrowserViewExtension Upgrade + Insert #13414

Merged
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
263c0ce
Stylesheet Update
dnenov Sep 25, 2022
11c1ee3
HtmlGenerator Structure Change
dnenov Sep 25, 2022
bd5ab74
Markdown Moved
dnenov Sep 26, 2022
3d1acd7
Input Output Table Style Update
dnenov Sep 27, 2022
5aa8df5
Inputs Outputs Tables Finished
dnenov Sep 27, 2022
5ff399e
Body Style Changes
dnenov Sep 27, 2022
4dc5d89
Image Navigation Started
dnenov Oct 4, 2022
77fa947
Breadcrumbs ILayoutSpecSource Implementation, Image Navigation
dnenov Oct 6, 2022
12edda3
Image Navigation Styling
dnenov Oct 10, 2022
987cab2
Insert Functionality Started
dnenov Oct 10, 2022
ea167c1
Insert Functionality Working with JSON Graphs
dnenov Oct 17, 2022
98f60fd
Dynamo Graph from MD File Location
dnenov Oct 17, 2022
14274f8
DissolveNestedGroups Command Added, Multiple Changes to Documentation…
dnenov Oct 18, 2022
69f419d
Insert WIP
dnenov Oct 20, 2022
aaf268d
Dyf | Dyn Split
dnenov Oct 21, 2022
553499c
Removed Prompt to Save File
dnenov Oct 21, 2022
3453637
Toast Notifications Added
dnenov Oct 21, 2022
2b140c3
Note Alignment Fix
dnenov Oct 25, 2022
ce6f658
Initial Tests Added
dnenov Oct 25, 2022
31a0997
Merge remote-tracking branch 'upstream/master' into dnenov-update-doc…
dnenov Oct 25, 2022
e357f7f
Image Controls - Visual Bump
dnenov Oct 26, 2022
24d96e9
Tests Added
dnenov Oct 26, 2022
8fec1b8
Localization for DocumnationBrowser Added
dnenov Oct 26, 2022
ae41083
Merge remote-tracking branch 'upstream/master' into dnenov-update-doc…
dnenov Oct 28, 2022
7d57a62
Localization Issues Fallback Folder
dnenov Oct 28, 2022
a3b1a9a
Test Fix 1
dnenov Oct 28, 2022
192e221
Test Fix 2
dnenov Oct 28, 2022
227aa53
Test Fix 3
dnenov Oct 28, 2022
5c9674c
Comments and Fixes
dnenov Oct 28, 2022
ecc5159
RunSettings Tooltips Changes
dnenov Oct 29, 2022
9f18653
Toast Notificaiton from DynamoModel to DynamoViewModel
dnenov Oct 30, 2022
2f7a2a9
Unsubscribe RequestNotification
dnenov Oct 30, 2022
7e9d00a
Mk2Html Whitlisting CSS Properties Added
dnenov Oct 31, 2022
16fc325
Comments
dnenov Oct 31, 2022
b4e18bc
Comments
dnenov Oct 31, 2022
171249c
Test Fix
dnenov Nov 1, 2022
0d4d6f6
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into dnen…
dnenov Nov 1, 2022
2dd0d8e
Comments
dnenov Nov 1, 2022
14bd9d8
Comments
dnenov Nov 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
391 changes: 285 additions & 106 deletions src/DocumentationBrowserViewExtension/Docs/MarkdownStyling.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dynamo.Utilities;
using Dynamo.Utilities;
using System.IO;
using System.Reflection;

Expand All @@ -17,7 +17,14 @@ internal static string GetDPIScript()
{
return ResourceUtilities.DPISCRIPT;
}

/// <summary>
/// Returns the Image Navigation Script
/// </summary>
/// <returns></returns>
internal static string GetImageNavigationScript()
{
return ResourceUtilities.IMGNAVIGATIONSCRIPT;
}
/// <summary>
/// Returns the content of an embedded resource file.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dynamo.Logging;
using Dynamo.Logging;
using Dynamo.Utilities;
using Microsoft.Web.WebView2.Core;
using Microsoft.Web.WebView2.Wpf;
Expand Down Expand Up @@ -113,6 +113,8 @@ protected virtual void Dispose(bool disposing)
this.documentationBrowser.Dispose();
}
this.documentationBrowser.DpiChanged -= DocumentationBrowser_DpiChanged;
if(this.documentationBrowser.CoreWebView2 != null)
this.documentationBrowser.CoreWebView2.WebMessageReceived -= CoreWebView2OnWebMessageReceived;
}

async void InitializeAsync()
Expand All @@ -138,6 +140,18 @@ async void InitializeAsync()
{
this.documentationBrowser.NavigateToString(htmlContent);
}));

this.documentationBrowser.CoreWebView2.WebMessageReceived += CoreWebView2OnWebMessageReceived;
}

private void CoreWebView2OnWebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs e)
{
var message = e.TryGetWebMessageAsString();
if (string.Equals(message, "insert"))
{
// Insert the graph inside the current worskspace
this.viewModel.InsertGraph();
}
}

/// <summary>
Expand Down
Loading