diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs
index 7b4ee0243f1..8a993aa8991 100644
--- a/src/DynamoCore/Configuration/PreferenceSettings.cs
+++ b/src/DynamoCore/Configuration/PreferenceSettings.cs
@@ -663,6 +663,11 @@ public string PythonTemplateFilePath
///
public bool EnableNodeAutoComplete { get; set; }
+ ///
+ /// This allows the user to enable or disable the new node auto complete menu.
+ ///
+ public bool EnableNewNodeAutoCompleteUI { get; set; }
+
///
/// PolyCurve normal and direction behavior has been made predictable in Dynamo 3.0 and has therefore changed.
/// This defines whether legacy (pre-3.0) PolyCurve behavior is selected by default.
@@ -1008,6 +1013,7 @@ public PreferenceSettings()
IsIronPythonDialogDisabled = false;
ShowTabsAndSpacesInScriptEditor = false;
EnableNodeAutoComplete = true;
+ EnableNewNodeAutoCompleteUI = true;
DefaultEnableLegacyPolyCurveBehavior = true;
HideNodesBelowSpecificConfidenceLevel = false;
MLRecommendationConfidenceLevel = 10;
diff --git a/src/DynamoCore/PublicAPI.Unshipped.txt b/src/DynamoCore/PublicAPI.Unshipped.txt
index 0c73a674235..28278f36814 100644
--- a/src/DynamoCore/PublicAPI.Unshipped.txt
+++ b/src/DynamoCore/PublicAPI.Unshipped.txt
@@ -154,6 +154,8 @@ Dynamo.Configuration.PreferenceSettings.EnableDynamoPlayerRenamedWatchAsOutput.g
Dynamo.Configuration.PreferenceSettings.EnableDynamoPlayerRenamedWatchAsOutput.set -> void
Dynamo.Configuration.PreferenceSettings.EnableNodeAutoComplete.get -> bool
Dynamo.Configuration.PreferenceSettings.EnableNodeAutoComplete.set -> void
+Dynamo.Configuration.PreferenceSettings.EnableNewNodeAutoCompleteUI.get -> bool
+Dynamo.Configuration.PreferenceSettings.EnableNewNodeAutoCompleteUI.set -> void
Dynamo.Configuration.PreferenceSettings.EnableNotificationCenter.get -> bool
Dynamo.Configuration.PreferenceSettings.EnableNotificationCenter.set -> void
Dynamo.Configuration.PreferenceSettings.EnablePersistExtensions.get -> bool
diff --git a/src/DynamoCoreWpf/Commands/PortCommands.cs b/src/DynamoCoreWpf/Commands/PortCommands.cs
index 16b6d7f44dc..9fc75e99a38 100644
--- a/src/DynamoCoreWpf/Commands/PortCommands.cs
+++ b/src/DynamoCoreWpf/Commands/PortCommands.cs
@@ -32,8 +32,7 @@ public DelegateCommand NodeAutoCompleteCommand
get
{
if (autoCompleteCommand == null)
- autoCompleteCommand ??= new DelegateCommand(NodeViewModel.WorkspaceViewModel.DynamoViewModel.IsDNAClusterPlacementEnabled ? AutoCompleteCluster : AutoComplete, CanAutoComplete);
-
+ autoCompleteCommand ??= new DelegateCommand(AutoComplete, CanAutoComplete);
return autoCompleteCommand;
}
}
diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
index 96f2274006d..0aca110c3d5 100644
--- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs
+++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
@@ -8027,6 +8027,24 @@ public static string PreferencesViewEnableNodeAutoComplete {
}
}
+ ///
+ /// Looks up a localized string similar to Enable New UI.
+ ///
+ public static string PreferencesViewEnableNodeAutoCompleteNewUI {
+ get {
+ return ResourceManager.GetString("PreferencesViewEnableNodeAutoCompleteNewUI", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog..
+ ///
+ public static string PreferencesViewEnableNodeAutoCompleteNewUITooltipText {
+ get {
+ return ResourceManager.GetString("PreferencesViewEnableNodeAutoCompleteNewUITooltipText", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Learn more about Node Autocomplete feature..
///
diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
index d7885855e2a..ad8cce97447 100644
--- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
@@ -4155,4 +4155,11 @@ To make this file into a new template, save it to a different folder, then move
This group is frozen. Click to unfreeze.
+
+ Enable New UI
+ Preferences | Features | Experimental | Enable Node AutoComplete New UI
+
+
+ Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog.
+
\ No newline at end of file
diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx
index 386846318a4..dd537f95850 100644
--- a/src/DynamoCoreWpf/Properties/Resources.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.resx
@@ -2690,6 +2690,10 @@ Uninstall the following packages: {0}?
Enable Node AutocompletePreferences | Features | Experimental | Enable Node Auto Complete
+
+ Enable New UI
+ Preferences | Features | Experimental | Enable Node Auto Complete New UI
+
An error occurred when loading the application icon: {0}{0} = detailed error message
@@ -2863,6 +2867,9 @@ Do you wish to uninstall {1}? Restart {2} to complete the uninstall and try down
Learn more about Node Autocomplete feature.
+
+ Enable the new floating menu for node suggestions for a more streamlined workflow. Turn off to return to the traditional pop-up dialog.
+
Add Style
@@ -4139,4 +4146,4 @@ To make this file into a new template, save it to a different folder, then move
This group is frozen. Click to unfreeze.
-
\ No newline at end of file
+
diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
index 00efa9c6c8b..c8f47d11ec8 100644
--- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
+++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
@@ -2867,6 +2867,8 @@ Dynamo.ViewModels.PreferencesViewModel.MLRecommendationNumberOfResults.get -> in
Dynamo.ViewModels.PreferencesViewModel.MLRecommendationNumberOfResults.set -> void
Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteIsChecked.get -> bool
Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteIsChecked.set -> void
+Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteNewUIIsChecked.get -> bool
+Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteNewUIIsChecked.set -> void
Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteMachineLearningIsBeta.get -> bool
Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteMachineLearningIsChecked.get -> bool
Dynamo.ViewModels.PreferencesViewModel.NodeAutocompleteMachineLearningIsChecked.set -> void
@@ -5065,6 +5067,8 @@ static Dynamo.Wpf.Properties.Resources.NodeAutocomplete.get -> string
static Dynamo.Wpf.Properties.Resources.NodeAutocompleteDocumentationUriString.get -> string
static Dynamo.Wpf.Properties.Resources.NodeAutoCompleteNotAvailableForCollapsedGroups.get -> string
static Dynamo.Wpf.Properties.Resources.NodeAutoCompleteToolTip.get -> string
+static Dynamo.Wpf.Properties.Resources.PreferencesViewEnableNodeAutoCompleteNewUI.get -> string
+static Dynamo.Wpf.Properties.Resources.PreferencesViewEnableNodeAutoCompleteNewUITooltipText.get -> string
static Dynamo.Wpf.Properties.Resources.NodeContextMenuEnablePeriodicUpdate.get -> string
static Dynamo.Wpf.Properties.Resources.NodeContextMenuHelp.get -> string
static Dynamo.Wpf.Properties.Resources.NodeContextMenuIsInput.get -> string
diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
index bc6cc6d4e5f..edebded999d 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
@@ -230,6 +230,17 @@ internal bool IsDNAClusterPlacementEnabled
}
}
+ ///
+ /// Controls if the new DNA Flyout is enabled from preference settings.
+ ///
+ internal bool IsNewDNAUIEnabled
+ {
+ get
+ {
+ return model.PreferenceSettings.EnableNewNodeAutoCompleteUI;
+ }
+ }
+
///
/// Count of unresolved issues on the linter manager.
/// This is used for binding in the NotificationsControl
diff --git a/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs
index d5dc7d73e1c..a8b6d3e7651 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs
@@ -560,29 +560,23 @@ private void AutoComplete(object parameter)
return;
}
- var existingPort = wsViewModel.NodeAutoCompleteSearchViewModel.PortViewModel;
- if (existingPort != null)
+ if (wsViewModel.DynamoViewModel.IsNewDNAUIEnabled)
{
- existingPort.Highlight = Visibility.Collapsed;
+ wsViewModel?.OnRequestNodeAutocompleteBar(this);
}
+ else
+ {
+ var existingPort = wsViewModel.NodeAutoCompleteSearchViewModel.PortViewModel;
+ if (existingPort != null)
+ {
+ existingPort.Highlight = Visibility.Collapsed;
+ }
- wsViewModel.NodeAutoCompleteSearchViewModel.PortViewModel = this;
-
- wsViewModel.OnRequestNodeAutoCompleteSearch();
- }
+ wsViewModel.NodeAutoCompleteSearchViewModel.PortViewModel = this;
- // Handler to invoke Node autocomplete cluster
- private void AutoCompleteCluster(object parameter)
- {
- //handle the mouse event to prevent connection from starting
- MouseButtonEventArgs evArgs = parameter as MouseButtonEventArgs;
- if (evArgs != null)
- {
- evArgs.Handled = true;
+ wsViewModel.OnRequestNodeAutoCompleteSearch();
}
-
- var wsViewModel = node.WorkspaceViewModel;
- wsViewModel?.OnRequestNodeAutocompleteBar(this);
+
}
private void NodePortContextMenu(object obj)
diff --git a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
index 8d68c5ad5c0..5f96ce82fc3 100644
--- a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
@@ -1128,6 +1128,22 @@ public bool NodeAutocompleteIsChecked
}
}
+ ///
+ /// Controls the IsChecked property in the "Node autocomplete new menu" toggle button
+ ///
+ public bool NodeAutocompleteNewUIIsChecked
+ {
+ get
+ {
+ return preferenceSettings.EnableNewNodeAutoCompleteUI;
+ }
+ set
+ {
+ preferenceSettings.EnableNewNodeAutoCompleteUI = value;
+ RaisePropertyChanged(nameof(NodeAutocompleteNewUIIsChecked));
+ }
+ }
+
///
/// If MLAutocompleteTOU is approved
///
diff --git a/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml b/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
index a98e422cb6f..a3c49549ad6 100644
--- a/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
+++ b/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
@@ -912,6 +912,7 @@
+
@@ -941,8 +942,35 @@
-
-
+
+
+
+
+
diff --git a/test/settings/DynamoSettings-NewSettings.xml b/test/settings/DynamoSettings-NewSettings.xml
index f5c225a1ab1..47362c295a9 100644
--- a/test/settings/DynamoSettings-NewSettings.xml
+++ b/test/settings/DynamoSettings-NewSettings.xml
@@ -74,6 +74,7 @@
truetruefalse
+ falsefalsetrue99