Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f5d5563
Author: Deyan Nenov <[email protected]>
Date:   Tue Nov 28 12:12:19 2023 +0000

    dispose methods null checks

    - trying to prevent null exceptions in case resources have been cleared before dispose event has been called

commit e43ad53
Author: Deyan Nenov <[email protected]>
Date:   Tue Nov 28 11:05:20 2023 +0000

    remove begin invoke from mainFrame_Navigated

    - this was done to try and fix a failing test but it should not be needed

commit 42bf04c
Author: Deyan Nenov <[email protected]>
Date:   Mon Nov 27 21:04:19 2023 +0000

    null check to mainFrame_Navigated

    - added a null check

commit 9dde030
Merge: a77a11a 3f765b5
Author: Deyan Nenov <[email protected]>
Date:   Mon Nov 27 18:07:39 2023 +0000

    Merge branch 'pm-publishpackage-cherrypick-resources' into pm-publishpackage-cherrypick-mypackage

commit a77a11a
Author: Deyan Nenov <[email protected]>
Date:   Mon Nov 27 17:47:17 2023 +0000

    main changes

    - this cherry-pick contains all main changes minus resources and tests.
    - will need to merge resources to work correctly
    - if this breaks the test run, we will need to further split it up, or introduce the changes one by one somehow

commit 3f765b5
Merge: 95d502a 36fb8d3
Author: Deyan Nenov <[email protected]>
Date:   Mon Nov 27 17:38:11 2023 +0000

    Merge remote-tracking branch 'upstream/master' into pm-publishpackage-cherrypick-resources

commit 95d502a
Author: Deyan Nenov <[email protected]>
Date:   Mon Nov 27 17:38:02 2023 +0000

    resource cherry-pick

    - picked up all resource changes

commit 36fb8d3
Author: Jorgen Dahl <[email protected]>
Date:   Mon Nov 27 11:51:35 2023 -0500

    Test net8 (DynamoDS#14635)

    * Test net8

    * Also add DotNet to the build properties

    * Update CS_SDK.props

    * Update CS_SDK.props

    * update

    * update

    * update

    * Go back to net6

    ---------

    Co-authored-by: pinzart <[email protected]>

commit cbba6d0
Author: Michael Kirschner <[email protected]>
Date:   Mon Nov 27 11:26:04 2023 -0500

    DYN-6412 fix performance issue with feature flags, and deadlock with CLI wrapper. (DynamoDS#14637)

    * fix for null data being shown over and over

    * fix issues with cli wrapper get data

    * revert

    * add test

    * review comments add tests

    * comments

    * review comments

commit c5df6f9
Author: Ashish Aggarwal <[email protected]>
Date:   Mon Nov 27 11:22:32 2023 -0500

    Replace Application.Current with HostAnalyticsInfo.HostName check (DynamoDS#14574)

    * Fix PostDiff job

    * replace application.current

    * tests

    * refactor after Bogdans PR

    ---------

    Co-authored-by: Aaron (Qilong) <[email protected]>

commit 11b1f7c
Author: jesusalvino <[email protected]>
Date:   Mon Nov 27 08:55:32 2023 -0500

    DYN-6313 Add ML Node AutoComplete TOU (DynamoDS#14625)

    * Updating the Agreement and Term of Use

    * Adding the MLNodeAuntocomplete rtf file

    * Persists the AgreeToMLAutocompleteTOU as preference settings

    * rename property

    * resources and control names

    * Clean up

    * Update

    * update

    ---------

    Co-authored-by: Jesus Alfredo Alviño <[email protected]>
    Co-authored-by: Aaron (Qilong) <[email protected]>

commit 3e97cbd
Author: Aabishkar KC <[email protected]>
Date:   Wed Nov 22 12:56:04 2023 -0500

    Update smoke tests workflow (DynamoDS#14638)
  • Loading branch information
dnenov committed Nov 29, 2023
1 parent 79cfc13 commit 6d8c7ea
Show file tree
Hide file tree
Showing 39 changed files with 737 additions and 286 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ui_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ env:
TEST_EXECUTE_DOWNLOAD_URL: https://downloads.smartbear.com/TestExecute1552SLM.exe
ACTOR: ${{ github.actor }}
WORKFLOW_ID: ${{ github.event.workflow_run.workflow_id }}
WORKFLOW_CONCLUSION: ${{ github.event.workflow_run.conclusion }}
RUN_ID: ${{ github.event.workflow_run.id }}
RUN_NAME: ${{ github.event.workflow_run.name }}
RUN_URL: ${{ github.event.workflow_run.html_url }}
Expand All @@ -21,7 +20,7 @@ jobs:
name: UI Smoke Tests
timeout-minutes: 60
runs-on: windows-latest
if: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
195 changes: 195 additions & 0 deletions doc/distrib/MLNodeAutocompleteConsent.rtf

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/Config/CS_SDK.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<UICulture>en-US</UICulture>
<OutputType Condition=" '$(OutputType)' == '' ">Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TestProjectDefaults Condition="$(MSBuildProjectDirectory.Contains('test'))">true</TestProjectDefaults>
<TestProjectDefaults Condition=" '$(TestProjectDefaults)' == '' ">false</TestProjectDefaults>
<!--MSB3539: The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild-->
<!--CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'-->
<!--NUnit2005: Consider using Assert.That(actual, Is.EqualTo(expected)) instead of Assert.AreEqual(expected, actual)-->
Expand Down Expand Up @@ -87,10 +85,10 @@
<Private>false</Private>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition=" '$(TestProjectDefaults)' == 'true' ">
<PropertyGroup Condition=" '$(TestProject)' == 'true' ">
<TestDependenciesPath>$(OutputPath)\..\..\..\test\test_dependencies</TestDependenciesPath>
</PropertyGroup>
<ItemDefinitionGroup Condition=" '$(TestProjectDefaults)' == 'true' ">
<ItemDefinitionGroup Condition=" '$(TestProject)' == 'true' ">
<ProjectReference>
<PrivateAssets>all</PrivateAssets>
<ExcludeAssets>runtime</ExcludeAssets>
Expand Down Expand Up @@ -148,4 +146,4 @@
</PropertyGroup>
</Otherwise>
</Choose>
</Project>
</Project>
17 changes: 17 additions & 0 deletions src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ internal readonly static Lazy<PreferenceSettings>
private bool isTimeStampIncludedInExportFilePath;
private bool isCreatedFromValidFile = true;
private string backupLocation;
private bool isMLAutocompleteTOUApproved;

#region Constants
/// <summary>
Expand Down Expand Up @@ -696,6 +697,21 @@ public bool EnableStaticSplashScreen
}
}

/// <summary>
/// This defines if the user is agree to the ML Automcomplete Terms of Use
/// </summary>
public bool IsMLAutocompleteTOUApproved
{
get
{
return isMLAutocompleteTOUApproved;
}
set
{
isMLAutocompleteTOUApproved = value;
}
}

/// <summary>
/// Engine used by default for new Python script and string nodes. If not empty, this takes precedence over any system settings.
/// </summary>
Expand Down Expand Up @@ -932,6 +948,7 @@ public PreferenceSettings()
DynamoPlayerFolderGroups = new List<DynamoPlayerFolderGroup>();
backupLocation = string.Empty;
GraphChecksumItemsList = new List<GraphChecksumItem>();
isMLAutocompleteTOUApproved = false;
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/DynamoCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\TermsOfUse.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\InstrumentationConsent.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\ADPAnalyticsConsent.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="$(SolutionDir)..\doc\distrib\MLNodeAutocompleteConsent.rtf" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="@(NodeHelpMDFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\" />
<Copy SourceFiles="@(NodeHelpDYNFiles)" DestinationFolder="$(OutputPath)\NodeHelpSharedDocs\" />
<Copy SourceFiles="@(NodeHelpTXTFiles)" DestinationFolder="$(OutputPath)\en-US\fallback_docs\" />
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ public interface IStartConfiguration
bool NoNetworkMode => false;

/// <summary>
/// Configuration object that contains host information like Host name, version and session id.
/// Configuration object that contains host information like Host name, parent id and session id.
/// </summary>
HostAnalyticsInfo HostAnalyticsInfo { get; set; }
}
Expand Down
11 changes: 7 additions & 4 deletions src/DynamoCoreWpf/Controls/InPortContextMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System;
using System.Windows;
using System.Windows.Controls;
using Dynamo.Models;
using Dynamo.ViewModels;

namespace Dynamo.UI.Controls
Expand All @@ -15,8 +16,10 @@ public partial class InPortContextMenu : UserControl
public InPortContextMenu()
{
InitializeComponent();

if (Application.Current != null) Application.Current.Deactivated += CurrentApplicationDeactivated;
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated += CurrentApplicationDeactivated;
}
Unloaded += InPortContextMenuControl_Unloaded;
}

Expand All @@ -27,7 +30,7 @@ public InPortContextMenu()
/// <param name="e"></param>
private void InPortContextMenuControl_Unloaded(object sender, RoutedEventArgs e)
{
if (Application.Current != null)
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated -= CurrentApplicationDeactivated;
}
Expand Down
5 changes: 3 additions & 2 deletions src/DynamoCoreWpf/Controls/IncanvasSearchControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Windows.Input;
using System.Windows.Threading;
using Dynamo.Logging;
using Dynamo.Models;
using Dynamo.Utilities;
using Dynamo.ViewModels;
using Dynamo.Wpf.ViewModels;
Expand All @@ -31,7 +32,7 @@ public SearchViewModel ViewModel
public InCanvasSearchControl()
{
InitializeComponent();
if (Application.Current != null)
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated += CurrentApplicationDeactivated;
Application.Current.MainWindow.Closing += InCanvasSearchControl_Unloaded;
Expand All @@ -40,7 +41,7 @@ public InCanvasSearchControl()

private void InCanvasSearchControl_Unloaded(object sender, System.ComponentModel.CancelEventArgs e)
{
if (Application.Current != null)
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated -= CurrentApplicationDeactivated;
Application.Current.MainWindow.Closing -= InCanvasSearchControl_Unloaded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public partial class NodeAutoCompleteSearchControl : IDisposable
public NodeAutoCompleteSearchControl()
{
InitializeComponent();
if (Application.Current != null)
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated += CurrentApplicationDeactivated;
if (Application.Current.MainWindow != null)
if (Application.Current?.MainWindow != null)
{
Application.Current.MainWindow.Closing += NodeAutoCompleteSearchControl_Unloaded;
}
Expand All @@ -55,10 +55,10 @@ public NodeAutoCompleteSearchControl()

private void NodeAutoCompleteSearchControl_Unloaded(object sender, System.ComponentModel.CancelEventArgs e)
{
if (Application.Current != null)
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated -= CurrentApplicationDeactivated;
if (Application.Current.MainWindow != null)
if (Application.Current?.MainWindow != null)
{
Application.Current.MainWindow.Closing -= NodeAutoCompleteSearchControl_Unloaded;
}
Expand Down
8 changes: 6 additions & 2 deletions src/DynamoCoreWpf/Controls/OutPortContextMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Windows;
using System.Windows.Controls;
using Dynamo.Models;
using Dynamo.ViewModels;

namespace Dynamo.UI.Controls
Expand All @@ -19,7 +20,10 @@ public OutPortContextMenu()
{
InitializeComponent();

if (Application.Current != null) Application.Current.Deactivated += CurrentApplicationDeactivated;
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated += CurrentApplicationDeactivated;
}
Unloaded += OutPortContextMenuControl_Unloaded;
}

Expand All @@ -30,7 +34,7 @@ public OutPortContextMenu()
/// <param name="e"></param>
private void OutPortContextMenuControl_Unloaded(object sender, RoutedEventArgs e)
{
if (Application.Current != null)
if (string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
{
Application.Current.Deactivated -= CurrentApplicationDeactivated;
}
Expand Down
15 changes: 12 additions & 3 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ Don't worry, you'll have the option to save your work.</value>
<comment>Setting menu | Decimal inch</comment>
</data>
<data name="DynamoViewSettingMenuShowDataReportingDialog" xml:space="preserve">
<value>Agreement to _Collect Usability Data</value>
<value>Agreement and _Terms of Use</value>
<comment>Dynamo menu | Show user agreement dialog about data collecting</comment>
</data>
<data name="DynamoViewSettingMenuFractionalFoot" xml:space="preserve">
Expand Down Expand Up @@ -2217,7 +2217,10 @@ Installing the latest update requires Dynamo and any host applications to close.
Do you want to install the latest Dynamo update?</value>
</data>
<data name="UsageReportPromptDialogTitle" xml:space="preserve">
<value>Agreement to Collect Usability Data</value>
<value>Agreement and Terms of Use</value>
</data>
<data name="AgreeToMLAutocompleteTOUText" xml:space="preserve">
<value>I agree to ML Node Autocomplete Terms of Use</value>
</data>
<data name="UseLevelKeepListStructureHint" xml:space="preserve">
<value>Keep 1 input list's nesting</value>
Expand Down Expand Up @@ -2310,7 +2313,7 @@ Uninstall the following packages: {0}?</value>
<value>Filter by</value>
</data>
<data name="DynamoViewSettingMenuShowDataReportingDialogTooltip" xml:space="preserve">
<value>Display the dialog for user to pick agreement on data collecting.</value>
<value>Display the dialog of agreement on data collecting and Machine Learning Node Autocomplete terms of use</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="psDynamoMesh" type="System.Resources.ResXFileRef, System.Windows.Forms">
Expand Down Expand Up @@ -3852,4 +3855,4 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
<data name="ElementBindingDesc" xml:space="preserve">
<value>Element Binding allows a two-way interaction between Dynamo and the host application like Revit or Civil3D where a user can select an element in the host document and have Dynamo "bind" that element to a node in the workspace.</value>
</data>
</root>
</root>
13 changes: 8 additions & 5 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
<comment>Setting menu | Decimal inch</comment>
</data>
<data name="DynamoViewSettingMenuShowDataReportingDialog" xml:space="preserve">
<value>Agreement to _Collect Usability Data</value>
<value>Agreement and _Terms of Use</value>
<comment>Dynamo menu | Show user agreement dialog about data collecting</comment>
</data>
<data name="DynamoViewSettingShowRunPreview" xml:space="preserve">
Expand Down Expand Up @@ -1151,7 +1151,10 @@ Don't worry, you'll have the option to save your work.</value>
<value>Cancel</value>
</data>
<data name="UsageReportPromptDialogTitle" xml:space="preserve">
<value>Agreement to Collect Usability Data</value>
<value>Agreement and Terms of Use</value>
</data>
<data name="AgreeToMLAutocompleteTOUText" xml:space="preserve">
<value>I agree to ML Node Autocomplete Terms of Use</value>
</data>
<data name="DynamoViewContextMenuClearLog" xml:space="preserve">
<value>Clear</value>
Expand Down Expand Up @@ -1306,7 +1309,7 @@ Don't worry, you'll have the option to save your work.</value>
</data>
<data name="PackageManagerNoInstalledPackagesSubMessage" xml:space="preserve">
<value>Once you install a package, you can find it here.</value>
</data>
</data>
<data name="PackagerManageUserNotSignedPackagesMessage" xml:space="preserve">
<value>Sign in to your Dynamo account to view your published packages.</value>
</data>
Expand Down Expand Up @@ -1683,7 +1686,7 @@ If the toggle is off custom packages that are not already loaded will load once
</data>
<data name="PublishPackageViewCopyrightHolderTooltip" xml:space="preserve">
<value>The package's copyright holder.</value>
</data>
</data>
<data name="PublishPackageViewLicenceTooltip" xml:space="preserve">
<value>The package's licence.</value>
</data>
Expand Down Expand Up @@ -2600,7 +2603,7 @@ Uninstall the following packages: {0}?</value>
<value>Filter by</value>
</data>
<data name="DynamoViewSettingMenuShowDataReportingDialogTooltip" xml:space="preserve">
<value>Display the dialog for user to pick agreement on data collecting.</value>
<value>Display the dialog of agreement on data collecting and Machine Learning Node Autocomplete terms of use</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="psDynamoMesh" type="System.Resources.ResXFileRef, System.Windows.Forms">
Expand Down
5 changes: 2 additions & 3 deletions src/DynamoCoreWpf/Services/UsageReportingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,14 @@ public void ToggleIsAnalyticsReportingApproved(object parameter)
private void ShowUsageReportingPrompt(Window ownerWindow)
{
// If an owner window is not supplied, then we will fallback onto
// using the application's main window. In native host application
// scenario (e.g. Revit), the "Application.Current" will be "null".
// using the application's main window.
// The owner window is important so that usage report window always
// get shown on top of the owner window, otherwise it is possible
// for usage report window to show up in the background (behind all
// other full screen windows), and Dynamo main window will appear
// to be frozen because control cannot return to it.
//
if (ownerWindow == null && (null != Application.Current))
if (ownerWindow == null && string.IsNullOrEmpty(DynamoModel.HostAnalyticsInfo.HostName) && Application.Current != null)
ownerWindow = Application.Current.MainWindow;

var usageReportingPrompt = new UsageReportingAgreementPrompt(resourceProvider, dynamoViewModel)
Expand Down
Loading

0 comments on commit 6d8c7ea

Please sign in to comment.