Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Jan 30, 2025
2 parents 2b2d50c + 9cdd9f3 commit 5a57f6f
Show file tree
Hide file tree
Showing 32 changed files with 621 additions and 417 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dynamo_post_bin_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
steps:
- name: Download Pull Request Data
uses: dawidd6/action-download-artifact@v7
uses: dawidd6/action-download-artifact@v8
with:
name: pr_data
run_id: ${{ github.event.workflow_run.id }}
path: ${{ github.workspace }}/pr
- name: Download Bin Diff Result
uses: dawidd6/action-download-artifact@v7
uses: dawidd6/action-download-artifact@v8
with:
name: bin_diff_result
run_id: ${{ github.event.workflow_run.id }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ui_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
shell: cmd
run: .\TE.exe -SilentInstall
- name: Download Build Artifact
uses: dawidd6/action-download-artifact@c03fb0c92813d0d9b088539572090518f7797df4 # v5
uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v5
with:
name: DynamoSandbox
workflow: ${{ env.WORKFLOW_RUN_WORKFLOW_ID }}
run_id: ${{ env.WORKFLOW_RUN_ID }}
path: ${{ github.workspace }}\build
- name: Download Pull Request Artifact
uses: dawidd6/action-download-artifact@c03fb0c92813d0d9b088539572090518f7797df4 # v5
uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v5
with:
name: pr_data
workflow: ${{ env.WORKFLOW_RUN_WORKFLOW_ID }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async void InitializeAsync()
//This indicates in which location will be created the WebView2 cache folder
documentationBrowser.CreationProperties = new CoreWebView2CreationProperties()
{
UserDataFolder = WebBrowserUserDataFolder
UserDataFolder = DynamoModel.IsTestMode ? TestUtilities.UserDataFolderDuringTests(nameof(DocumentationBrowserView)) : WebBrowserUserDataFolder
};
}

Expand Down
86 changes: 43 additions & 43 deletions src/DynamoCore/DynamoCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,49 +158,49 @@
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\TermsOfUse.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\ADPAnalyticsConsent.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\MLNodeAutocompleteConsent.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="@(NodeHelpCsCZMDFiles)" DestinationFolder="$(OutputPath)\cs-CZ\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpDeDEMDFiles)" DestinationFolder="$(OutputPath)\de-DE\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpEnUSMDFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpEsESMDFiles)" DestinationFolder="$(OutputPath)\es-ES\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpFrFRMDFiles)" DestinationFolder="$(OutputPath)\fr-FR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpItITMDFiles)" DestinationFolder="$(OutputPath)\it-IT\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpJaJPMDFiles)" DestinationFolder="$(OutputPath)\ja-JP\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpKoKRMDFiles)" DestinationFolder="$(OutputPath)\ko-KR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpPlPLMDFiles)" DestinationFolder="$(OutputPath)\pl-PL\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpPtBRMDFiles)" DestinationFolder="$(OutputPath)\pt-BR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpRuRUMDFiles)" DestinationFolder="$(OutputPath)\ru-RU\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpZhCNMDFiles)" DestinationFolder="$(OutputPath)\zh-CN\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpZhTWMDFiles)" DestinationFolder="$(OutputPath)\zh-TW\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpDYNFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\cs-CZ\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\de-DE\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\es-ES\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\fr-FR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\it-IT\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\ja-JP\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\ko-KR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\pl-PL\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\pt-BR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\ru-RU\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\zh-CN\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\zh-TW\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\cs-CZ\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\de-DE\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\es-ES\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\fr-FR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\it-IT\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\ja-JP\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\ko-KR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\pl-PL\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\pt-BR\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\ru-RU\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\zh-CN\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\zh-TW\fallback_docs\"/>
<Copy SourceFiles="@(NodeHelpJpgImageFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" />
<Copy SourceFiles="@(NodeHelpPngImageFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" />
<Copy SourceFiles="@(NodeHelpGifImageFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" />
<Copy SourceFiles="@(NodeHelpCsCZMDFiles)" DestinationFolder="$(OutputPath)\cs-CZ\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpDeDEMDFiles)" DestinationFolder="$(OutputPath)\de-DE\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpEnUSMDFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpEsESMDFiles)" DestinationFolder="$(OutputPath)\es-ES\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpFrFRMDFiles)" DestinationFolder="$(OutputPath)\fr-FR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpItITMDFiles)" DestinationFolder="$(OutputPath)\it-IT\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpJaJPMDFiles)" DestinationFolder="$(OutputPath)\ja-JP\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpKoKRMDFiles)" DestinationFolder="$(OutputPath)\ko-KR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpPlPLMDFiles)" DestinationFolder="$(OutputPath)\pl-PL\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpPtBRMDFiles)" DestinationFolder="$(OutputPath)\pt-BR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpRuRUMDFiles)" DestinationFolder="$(OutputPath)\ru-RU\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpZhCNMDFiles)" DestinationFolder="$(OutputPath)\zh-CN\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpZhTWMDFiles)" DestinationFolder="$(OutputPath)\zh-TW\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpDYNFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\cs-CZ\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\de-DE\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\es-ES\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\fr-FR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\it-IT\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\ja-JP\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\ko-KR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\pl-PL\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\pt-BR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\ru-RU\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\zh-CN\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\zh-TW\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\cs-CZ\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\de-DE\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\es-ES\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\fr-FR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\it-IT\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\ja-JP\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\ko-KR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\pl-PL\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\pt-BR\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\ru-RU\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\zh-CN\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpSATFiles)" DestinationFolder="$(OutputPath)\zh-TW\fallback_docs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpJpgImageFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpPngImageFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpGifImageFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" SkipUnchangedFiles="True"/>
<Copy SourceFiles="@(NodeHelpXLSXFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" />
<Copy SourceFiles="@(OpenSourceLicenses)" DestinationFolder="$(OutputPath)Open Source Licenses\" />
<Copy SourceFiles="@(LibGInterface)" DestinationFolder="$(OutputPath)" />
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/Engine/EngineController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public void Dispose()

liveRunnerServices.Dispose();
codeCompletionServices = null;
CompilationServices = null;
}

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ public void ShutDown(bool shutdownHost)

AnalyticsService.ShutDown();

LuceneSearch.LuceneUtilityNodeSearch = null;
LuceneSearch.LuceneUtilityNodeAutocomplete = null;
LuceneSearch.LuceneUtilityPackageManager = null;

State = DynamoModelState.NotStarted;
OnShutdownCompleted(); // Notify possible event handlers.
}
Expand Down
3 changes: 2 additions & 1 deletion src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<Target Name="NpmRunBuild" BeforeTargets="BeforeBuild">
<PropertyGroup>
<PackageVersion>1.0.26</PackageVersion>
<PackageVersion>1.0.27</PackageVersion>
<PackageName>SplashScreen</PackageName>
</PropertyGroup>
<Exec Command="$(PowerShellCommand) -ExecutionPolicy Bypass -File &quot;$(SolutionDir)pkgexist.ps1&quot; &quot;$(PackageName)&quot; &quot;$(PackageVersion)&quot;" ConsoleToMSBuild="true">
Expand Down Expand Up @@ -432,6 +432,7 @@
<Compile Include="ViewModels\Preview\ConnectorAnchorViewModel.cs" />
<Compile Include="ViewModels\Preview\ConnectorContextMenuViewModel.cs" />
<Compile Include="ViewModels\RunSettingsViewModel.cs" />
<Compile Include="Utilities\ActionDebouncer.cs" />
<Compile Include="ViewModels\Search\BrowserInternalElementViewModel.cs" />
<Compile Include="ViewModels\Search\BrowserItemViewModel.cs" />
<Compile Include="ViewModels\Search\NodeAutoCompleteSearchViewModel.cs" />
Expand Down
5 changes: 1 addition & 4 deletions src/DynamoCoreWpf/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1633,12 +1633,9 @@ Dynamo.UI.Views.ScriptHomeObject.ShowSampleDatasetsInFolder() -> void
Dynamo.UI.Views.ScriptHomeObject.ShowTempalte() -> void
Dynamo.UI.Views.ScriptHomeObject.StartGuidedTour(string path) -> void
Dynamo.UI.Views.ScriptObject
Dynamo.UI.Views.ScriptObject.CloseWindow() -> void
Dynamo.UI.Views.ScriptObject.CloseWindowPreserve(bool isCheckboxChecked) -> void
Dynamo.UI.Views.ScriptObject.ImportSettings(string file) -> void
Dynamo.UI.Views.ScriptObject.LaunchDynamo(bool showScreenAgain) -> void
Dynamo.UI.Views.ScriptObject.ScriptObject(System.Action<bool> requestLaunchDynamo, System.Action<string> requestImportSettings, System.Func<bool> requestSignIn, System.Func<bool> requestSignOut, System.Action requestCloseWindow) -> void
Dynamo.UI.Views.ScriptObject.ScriptObject(System.Action<bool> requestLaunchDynamo, System.Action<string> requestImportSettings, System.Func<bool> requestSignIn, System.Func<bool> requestSignOut, System.Action<bool> requestCloseWindow) -> void
Dynamo.UI.Views.ScriptObject.ScriptObject(System.Action<bool> requestLaunchDynamo, System.Action<string> requestImportSettings, System.Func<bool> requestSignIn, System.Func<bool> requestSignOut) -> void
Dynamo.UI.Views.ScriptObject.SignIn() -> bool
Dynamo.UI.Views.ScriptObject.SignOut() -> bool
Dynamo.UI.Views.SplashScreen
Expand Down
4 changes: 2 additions & 2 deletions src/DynamoCoreWpf/UI/GuidedTour/CustomRichTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ private static FlowDocument GetCustomDocument(string Text)
//Finding the end character that indicates the hyperlink is complete (no empty spaces are allowed in hyperlink URL just in the name)
if (word.Contains("="))
{
string linkURL = word.Split('=')[1];
hyperlinkName += word.Split('=')[0];
string linkURL = word.Split('=').LastOrDefault();
hyperlinkName += word.Split('=').FirstOrDefault();

Run run3 = new Run(hyperlinkName.Replace("#", ""));
Hyperlink link = new Hyperlink(run3);
Expand Down
1 change: 0 additions & 1 deletion src/DynamoCoreWpf/UI/SharedResourceDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public static class SharedDictionaryManager
private static ResourceDictionary outPortsDictionary;
private static ResourceDictionary inPortsDictionary;
private static ResourceDictionary _liveChartDictionary;


public static string ThemesDirectory
{
Expand Down
61 changes: 61 additions & 0 deletions src/DynamoCoreWpf/Utilities/ActionDebouncer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Dynamo.Logging;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Dynamo.Wpf.Utilities
{
/// <summary>
/// The ActionDebouncer class offers a means to reduce the number of UI notifications for a specified time.
/// It is meant to be used in UI elements where too many UI updates can cause perfomance issues.
/// </summary>
internal class ActionDebouncer(ILogger logger) : IDisposable
{
private readonly ILogger logger = logger;
private CancellationTokenSource cts;

public void Cancel()
{
if (cts != null)
{
cts.Cancel();
cts.Dispose();
cts = null;
}
}

/// <summary>
/// Delays the "action" for a "timeout" number of milliseconds
/// The input Action will run on same syncronization context as the Debounce method call.
/// </summary>
/// <param name="timeout">Number of milliseconds to wait</param>
/// <param name="action">The action to execute after the timeout runs out.</param>
/// <returns>A task that finishes when the deboucing is cancelled or the input action has completed (successfully or not). Should be discarded in most scenarios.</returns>
public void Debounce(int timeout, Action action)
{
Cancel();
cts = new CancellationTokenSource();

Task.Delay(timeout, cts.Token).ContinueWith((t) =>
{
try
{
if (t.Status == TaskStatus.RanToCompletion)
{
action();
}
}
catch (Exception ex)
{
logger?.Log("Failed to run debounce action with the following error:");
logger?.Log(ex.ToString());
}
}, TaskScheduler.FromCurrentSynchronizationContext());
}

public void Dispose()
{
Cancel();
}
}
}
15 changes: 10 additions & 5 deletions src/DynamoCoreWpf/Utilities/CrashUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
using Dynamo.Configuration;
using Dynamo.Configuration;
using Dynamo.PackageManager;
using Dynamo.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Dynamo.Wpf.Utilities
{
static class CrashUtilities
{
internal static string GithubNewIssueUrlFromCrashContent(object crashContent)
internal enum ReportType
{
Bug,
Crash
}

internal static string GithubNewIssueUrlFromCrashContent(object crashContent, ReportType reportType = ReportType.Crash)
{
var baseUri = new UriBuilder(Configurations.GitHubBugReportingLink);

var issueTitle = "Crash report from Dynamo {0}";
var issueTitle = "{0} report from Dynamo {1}";
var dynamoVersion = AssemblyHelper.GetDynamoVersion().ToString() ?? "2.1.0+";

// append the title and body to the URL as query parameters
// making sure we properly escape content since stack traces may contain characters not suitable
// for use in URLs
var title = "title=" + Uri.EscapeDataString(string.Format(issueTitle, dynamoVersion));
var title = "title=" + Uri.EscapeDataString(string.Format(issueTitle, reportType, dynamoVersion));
var template = "template=issue.yml";
var fields = "dynamo_version=" + Uri.EscapeDataString(dynamoVersion)
+ "&os=" + Uri.EscapeDataString(Environment.OSVersion.ToString())
Expand Down
Loading

0 comments on commit 5a57f6f

Please sign in to comment.