diff --git a/src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs b/src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs index 3969e4f3fff..dade00de0dd 100644 --- a/src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs +++ b/src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs @@ -45,7 +45,7 @@ // to distinguish one build from another. AssemblyFileVersion is specified // in AssemblyVersionInfo.cs so that it can be easily incremented by the // automated build process. -[assembly: AssemblyVersion("2.19.5.7826")] +[assembly: AssemblyVersion("2.19.5.7897")] // By default, the "Product version" shown in the file properties window is @@ -64,4 +64,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("2.19.5.7826")] +[assembly: AssemblyFileVersion("2.19.5.7897")] diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs index bfb17e4315f..f955094aa41 100644 --- a/src/DynamoCore/Models/DynamoModel.cs +++ b/src/DynamoCore/Models/DynamoModel.cs @@ -161,8 +161,8 @@ internal LuceneSearchUtility LuceneUtility /// /// Flag to indicate that there is no UI on this process, and things - /// like the update manager and the analytics collection should be - /// disabled. + /// like the node index process, update manager and the analytics collection + /// should be disabled. /// public static bool IsHeadless { get; set; } diff --git a/src/DynamoCore/Utilities/LuceneSearchUtility.cs b/src/DynamoCore/Utilities/LuceneSearchUtility.cs index e695228f133..7f8746095a5 100644 --- a/src/DynamoCore/Utilities/LuceneSearchUtility.cs +++ b/src/DynamoCore/Utilities/LuceneSearchUtility.cs @@ -60,6 +60,8 @@ internal LuceneSearchUtility(DynamoModel model) /// internal void InitializeLuceneConfig(string dirName, LuceneStorage storageType = LuceneStorage.FILE_SYSTEM) { + if (DynamoModel.IsHeadless) return; + addedFields = new List(); DirectoryInfo luceneUserDataFolder; diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 3de5f72a46b..db8e4d9ea0f 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -3479,24 +3479,6 @@ public static string HideClassicNodeLibrary { } } - /// - /// Looks up a localized string similar to Hide nodes below a specified confidence level. - /// - public static string HideNodesBelowSpecificConfidenceLevel { - get { - return ResourceManager.GetString("HideNodesBelowSpecificConfidenceLevel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Confidence level appears next to each recommended node and represents estimated probability that the node is a good choice. When toggled on, this setting hides recommended nodes that don’t meet the specified confidence level. You can click the Low Confidence header to show the nodes.. - /// - public static string HideNodesBelowSpecificConfidenceLevelInfo { - get { - return ResourceManager.GetString("HideNodesBelowSpecificConfidenceLevelInfo", resourceCulture); - } - } - /// /// Looks up a localized string similar to Hide Wires. /// @@ -7376,6 +7358,24 @@ public static string PreferencesWindowShowPreviewBubblesTooltip { } } + /// + /// Looks up a localized string similar to Preferred confidence level. + /// + public static string PreferredConfidenceLevel { + get { + return ResourceManager.GetString("PreferredConfidenceLevel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confidence level appears next to each recommended node and represents estimated probability that the node is a good choice. When toggled on, this setting hides recommended nodes that don’t meet the specified confidence level. You can click the Low Confidence header to show the nodes.. + /// + public static string PreferredConfidenceLevelInfo { + get { + return ResourceManager.GetString("PreferredConfidenceLevelInfo", resourceCulture); + } + } + /// /// Looks up a localized string similar to Your package will be scanned for viruses, and will be available for download once it successfully passes the scan.. /// diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index b6fb25f11b9..caac9cd1ebf 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -3342,10 +3342,10 @@ You can manage this in Preferences -> Security. Node Autocomplete Preferences | Features | Node Autocomplete - - Hide nodes below a specified confidence level + + Preferred confidence level - + Confidence level appears next to each recommended node and represents estimated probability that the node is a good choice. When toggled on, this setting hides recommended nodes that don’t meet the specified confidence level. You can click the Low Confidence header to show the nodes. diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index b7e469db40e..e094990be3f 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -3329,10 +3329,10 @@ You can manage this in Preferences -> Security. Node Autocomplete Preferences | Features | Node Autocomplete - - Hide nodes below a specified confidence level + + Preferred confidence level - + Confidence level appears next to each recommended node and represents estimated probability that the node is a good choice. When toggled on, this setting hides recommended nodes that don’t meet the specified confidence level. You can click the Low Confidence header to show the nodes. diff --git a/src/DynamoCoreWpf/ViewModels/Preview/WatchViewModel.cs b/src/DynamoCoreWpf/ViewModels/Preview/WatchViewModel.cs index c3aa107ae35..dedb39408ba 100644 --- a/src/DynamoCoreWpf/ViewModels/Preview/WatchViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Preview/WatchViewModel.cs @@ -190,8 +190,11 @@ public bool IsCollection get { return isCollection; } set { - isCollection = value; - RaisePropertyChanged("IsCollection"); + if (isCollection != value) + { + isCollection = value; + RaisePropertyChanged(nameof(IsCollection)); + } } } @@ -203,8 +206,11 @@ public IEnumerable Levels get { return levels; } set { - levels = value; - RaisePropertyChanged("Levels"); + if (levels != value) + { + levels = value; + RaisePropertyChanged(nameof(Levels)); + } } } diff --git a/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs b/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs index 704fd6482f9..aa2d6799aac 100644 --- a/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Search/NodeAutoCompleteSearchViewModel.cs @@ -156,12 +156,13 @@ internal NodeAutoCompleteSearchViewModel(DynamoViewModel dynamoViewModel) : base internal void ResetAutoCompleteSearchViewState() { DisplayAutocompleteMLStaticPage = false; - DisplayLowConfidence = false; + DisplayLowConfidence = PreferenceSettings.Instance.HideNodesBelowSpecificConfidenceLevel; AutocompleteMLMessage = string.Empty; AutocompleteMLTitle = string.Empty; FilteredResults = new List(); FilteredHighConfidenceResults = new List(); FilteredLowConfidenceResults = new List(); + searchElementsCache = new List(); } private void InitializeDefaultAutoCompleteCandidates() @@ -359,7 +360,7 @@ internal void DisplayMachineLearningResults() if (viewModelElement != null) { - viewModelElement.AutoCompletionNodeMachineLearningInfo = new AutoCompletionNodeMachineLearningInfo(true, true, result.Score * 100); + viewModelElement.AutoCompletionNodeMachineLearningInfo = new AutoCompletionNodeMachineLearningInfo(true, true, Math.Round(result.Score * 100)); results.Add(viewModelElement); } } @@ -392,7 +393,7 @@ internal void DisplayMachineLearningResults() if (viewModelElement != null) { - viewModelElement.AutoCompletionNodeMachineLearningInfo = new AutoCompletionNodeMachineLearningInfo(true, true, result.Score * 100); + viewModelElement.AutoCompletionNodeMachineLearningInfo = new AutoCompletionNodeMachineLearningInfo(true, true, Math.Round(result.Score * 100)); results.Add(viewModelElement); } } @@ -409,10 +410,10 @@ internal void DisplayMachineLearningResults() } } - // Show low confidence section if there are some results under threshold. - DisplayLowConfidence = FilteredLowConfidenceResults.Count() > 0; + // Show low confidence section if there are some results under threshold and feature enabled + DisplayLowConfidence = FilteredLowConfidenceResults.Any() && PreferenceSettings.Instance.HideNodesBelowSpecificConfidenceLevel; - if (FilteredHighConfidenceResults.Count() == 0) + if (!FilteredHighConfidenceResults.Any()) { DisplayAutocompleteMLStaticPage = true; AutocompleteMLTitle = Resources.AutocompleteLowConfidenceTitle; @@ -421,7 +422,7 @@ internal void DisplayMachineLearningResults() } // By default, show only the results which are above the threshold - FilteredResults = FilteredHighConfidenceResults; + FilteredResults = PreferenceSettings.Instance.HideNodesBelowSpecificConfidenceLevel? FilteredHighConfidenceResults : results ; } } diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml index e99677add7d..2677c621b79 100644 --- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml +++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml @@ -382,11 +382,11 @@ Tag="NoDownArrow" IsEnabled="False"> diff --git a/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml b/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml index c818e800487..6a8779fe1c2 100644 --- a/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml +++ b/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml @@ -956,7 +956,7 @@ IsChecked="{Binding Path=HideNodesBelowSpecificConfidenceLevelIsChecked}" Style="{StaticResource EllipseToggleButton1}" IsEnabled="{Binding Path=EnableHideNodesToggle}"/> -