From ce25037b60f5f3bafb06b812e208135724492b84 Mon Sep 17 00:00:00 2001 From: "Aaron (Qilong)" <173288704@qq.com> Date: Fri, 12 Jan 2024 03:54:22 +0800 Subject: [PATCH 1/4] TOU related notification message update (#14836) * notification message update * Update margin --- src/DynamoCoreWpf/Properties/Resources.Designer.cs | 2 +- src/DynamoCoreWpf/Properties/Resources.en-US.resx | 2 +- src/DynamoCoreWpf/Properties/Resources.resx | 2 +- src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 5149c86c9a3..92d403962bb 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -5126,7 +5126,7 @@ public static string NotificationCenterButtonTooltip { } /// - /// Looks up a localized string similar to To access the Recommended Nodes feature, please read and accept Dynamo > Agreement and Terms of Use.. + /// Looks up a localized string similar to To access the Recommended Nodes feature, please read and accept Dynamo > Agreements for Data Collection.. /// public static string NotificationToAgreeMLNodeautocompleteTOU { get { diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index 9dcd6add055..9bee7a4e45d 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -3856,7 +3856,7 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in 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. - To access the Recommended Nodes feature, please read and accept Dynamo > Agreement and Terms of Use. + To access the Recommended Nodes feature, please read and accept Dynamo > Agreements for Data Collection. Centimeters diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index f8530049348..c5619f66142 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -3843,7 +3843,7 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in 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. - To access the Recommended Nodes feature, please read and accept Dynamo > Agreement and Terms of Use. + To access the Recommended Nodes feature, please read and accept Dynamo > Agreements for Data Collection. Centimeters diff --git a/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml b/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml index 52c113ddb5f..5318b2cf1cc 100644 --- a/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml +++ b/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml @@ -222,7 +222,7 @@ Grid.Row="4"> From b8d1c4eb9180eae8dcc7824598984b27726fa692 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Thu, 11 Jan 2024 15:11:01 -0500 Subject: [PATCH 2/4] [Fix-3] Localize Graphic Scale Unit (#14827) * Fix PostDiff job * Update PreferencesViewModel.cs --- .../ViewModels/Menu/PreferencesViewModel.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs index b884ce40de1..9e74bb37fdd 100644 --- a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs @@ -197,13 +197,14 @@ public string SelectedUnits if (UseHostScaleUnits && IsDynamoRevit) return; - var result = Enum.TryParse(selectedUnits, out Configurations.Units currentUnit); + var enUnit = LocalizedUnitsMap.FirstOrDefault(x => x.Key == selectedUnits).Value; + var result = Enum.TryParse(enUnit, out Configurations.Units currentUnit); if (!result) return; if (Configurations.SupportedUnits.TryGetValue(currentUnit, out double units)) { // Update preferences setting and update the grapic helpers - preferenceSettings.GraphicScaleUnit = value; + preferenceSettings.GraphicScaleUnit = currentUnit.ToString(); preferenceSettings.GridScaleFactor = (float)units; dynamoViewModel.UpdateGraphicHelpersScaleCommand.Execute(null); @@ -1291,6 +1292,12 @@ public bool importSettingsContent(string content) return setSettings(newPreferences); } + /// + /// The dictionary that contains the localized resource strings for Units. + /// This is done to avoid a breaking change that is storing the selected unit in settings file in english language. + /// + private Dictionary LocalizedUnitsMap; + /// /// Returns localized resource strings for Units /// @@ -1392,6 +1399,12 @@ public PreferencesViewModel(DynamoViewModel dynamoViewModel) LanguagesList = Configurations.SupportedLocaleDic.Keys.ToObservableCollection(); SelectedLanguage = Configurations.SupportedLocaleDic.FirstOrDefault(x => x.Value == preferenceSettings.Locale).Key; + LocalizedUnitsMap = new Dictionary(); + foreach (var unit in Configurations.SupportedUnits) + { + LocalizedUnitsMap.Add(GetLocalizedUnits(unit.Key), unit.Key.ToString()); + } + // Chose the scaling unit, if option is allowed by user UnitList = Configurations.SupportedUnits.Keys.Select(x => GetLocalizedUnits(x)).ToObservableCollection(); SelectedUnits = GetLocalizedUnits(Configurations.SupportedUnits.FirstOrDefault(x => x.Key.ToString() == preferenceSettings.GraphicScaleUnit).Key); From d511eaf814716e9d6b235b8d21db46a19af56ac4 Mon Sep 17 00:00:00 2001 From: Roberto T <61755417+RobertGlobant20@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:12:49 -0800 Subject: [PATCH 3/4] DYN-5656 Preferences Blocking Action Bug (#14837) If we open the PackageManager from Preferences panel and then back to Preferences panel using the link then after closing preferences the background was still present. So with this fix is removing the background under the described specfic case. --- .../Views/PackageManager/PackageManagerView.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml.cs b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml.cs index 3479f538a49..ab5dd0899a7 100644 --- a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml.cs +++ b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml.cs @@ -130,8 +130,7 @@ private void PackageManagerPanel_MouseDown(object sender, MouseButtonEventArgs e /// private void CloseButton_Click(object sender, RoutedEventArgs e) { - Analytics.TrackEvent(Actions.Close, Categories.PackageManager); - (this.Owner as DynamoView).EnableOverlayBlocker(false); + Analytics.TrackEvent(Actions.Close, Categories.PackageManager); Close(); } @@ -143,6 +142,7 @@ private void WindowClosed(object sender, EventArgs e) { this.packageManagerPublish?.Dispose(); this.packageManagerSearch?.Dispose(); + (this.Owner as DynamoView).EnableOverlayBlocker(false); if (PackageManagerViewModel == null) return; this.PackageManagerViewModel.PackageSearchViewModel.RequestShowFileDialog -= OnRequestShowFileDialog; From 3354472b463154e20bcbc4e282e4eff97c349fa5 Mon Sep 17 00:00:00 2001 From: Michael Kirschner Date: Thu, 11 Jan 2024 19:34:46 -0500 Subject: [PATCH 4/4] remove retain folder structure option during package publish (#14813) * comment out toggle * remove docs for now * add todo --- .../Docs/PublishPackageDocumentation.html | 65 ++++++++++--------- .../Pages/PublishPackageSelectPage.xaml | 4 +- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html b/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html index ce05375c9ba..e03a4a6459f 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html @@ -1,4 +1,4 @@ - @@ -162,11 +162,11 @@

What are packages?

Installing Dynamo packages

- You can browse and install packages in the Search for Packages tab of the Package Manager. Use the search field to locate specific packages. + You can browse and install packages in the Search for Packages tab of the Package Manager. Use the search field to locate specific packages. You can also apply filters and sorting to narrow down the list to meet your criteria, such as a host program or lack of dependencies.

- To view more information about a package, click View Details. This opens a panel where you can read a description of the package, find version and license information, and more. + To view more information about a package, click View Details. This opens a panel where you can read a description of the package, find version and license information, and more.

To install a package, click Install either in the search view or in the details panel. You can specify a version to install in the search view by clicking the drop-down and selecting a version; otherwise, the most recent version will be installed. @@ -177,10 +177,10 @@

Installing Dynamo packages

Publishing Dynamo Packages

- The Package Manager allows you to publish packages inside Dynamo. Open the Publish a Package tab to get started. + The Package Manager allows you to publish packages inside Dynamo. Open the Publish a Package tab to get started. The Publish a Package tab asks for all required and optional information related to the package that you want to publish.

- +

Adding package details

@@ -236,41 +236,44 @@

Adding package files

Add Files/Directory:
-

- Select and add all the files that are related to your package. Generally, the bin folder, binaries, and dependencies are added. - You can add individual files or folders. -

-

- After you’ve selected files or folders to add, you can view, remove, or add files on the Select Package Contents page. - You can view the folder structure of your selected files in the left panel, and the contents of each folder in the right panel. -

+

+ Select and add all the files that are related to your package. Generally, the bin folder, binaries, and dependencies are added. + You can add individual files or folders. +

+

+ After you’ve selected files or folders to add, you can view, remove, or add files on the Select Package Contents page. + You can view the folder structure of your selected files in the left panel, and the contents of each folder in the right panel. +

Select Node Libraries:
-

- Specify which of the files you added to the package are the node libraries by checking the box in the Node Library column. - Node libraries contain the types and methods that Dynamo will import as nodes. In general, you should mark any assembly as a node library which contains types you wish to import into Dynamo. - ZeroTouch, NodeModel, or NodeViewCustomization assemblies should be marked as a node library. -

-

- To load UI NodeViewCustomizations, they should be either defined in the same assembly that contains the corresponding NodeModel definitions OR defined in a separate assembly. - In either case, the assembly must be tagged as a node library. Currently, for assemblies marked as node library that contain NodeModel or NodeCustomization types, all other types will be ignored. For this reason, it is important to separate NodeModel/NodeViewCustomization types from types you wish to import using ZeroTouch import. -

+

+ Specify which of the files you added to the package are the node libraries by checking the box in the Node Library column. + Node libraries contain the types and methods that Dynamo will import as nodes. In general, you should mark any assembly as a node library which contains types you wish to import into Dynamo. + ZeroTouch, NodeModel, or NodeViewCustomization assemblies should be marked as a node library.

+ To load UI NodeViewCustomizations, they should be either defined in the same assembly that contains the corresponding NodeModel definitions OR defined in a separate assembly. + In either case, the assembly must be tagged as a node library. Currently, for assemblies marked as node library that contain NodeModel or NodeCustomization types, all other types will be ignored. For this reason, it is important to separate NodeModel/NodeViewCustomization types from types you wish to import using ZeroTouch import. +

+

+

Preview Package Contents:
- When you are satisfied with your package contents, click Next to see a preview of how the package files will be set up once they are published. - This page is view only; to make additional changes to the package contents, go back to the previous page. Click Finish to return to the package details page. + When you are satisfied with your package contents, click Next to see a preview of how the package files will be set up once they are published. + This page is view only; to make additional changes to the package contents, go back to the previous page. Click Finish to return to the package details page.

Add markdown file path (optional):
@@ -282,13 +285,13 @@

Adding package files


- +

Anti-virus Scans

- To provide a secure environment to all Dynamo package users, we have introduced anti-virus scans for new packages. - When a user uploads a package, it will be scanned for viruses and will only be available publicly once it has been flagged as safe. - The scan will happen during the package upload process and will not add to the usual duration of 10-15 minutes for the new package to be available online. - If your package is flagged as infected, the Package Manager search page will display a notification stating that the uploaded package has been found to be infected and won't be published online. + To provide a secure environment to all Dynamo package users, we have introduced anti-virus scans for new packages. + When a user uploads a package, it will be scanned for viruses and will only be available publicly once it has been flagged as safe. + The scan will happen during the package upload process and will not add to the usual duration of 10-15 minutes for the new package to be available online. + If your package is flagged as infected, the Package Manager search page will display a notification stating that the uploaded package has been found to be infected and won't be published online. To make the package publicly available, check the files included with the package and upload a new version through the Package Manager.

Managing your packages

@@ -299,4 +302,4 @@

Package Settings

You can view your package-related settings in the Package Settings tab of the Package Manager, including new package download paths and package/library search paths. To edit your settings, click the Preferences link in the Package Settings tab to access the Preferences panel.

- \ No newline at end of file + diff --git a/src/DynamoCoreWpf/Views/PackageManager/Pages/PublishPackageSelectPage.xaml b/src/DynamoCoreWpf/Views/PackageManager/Pages/PublishPackageSelectPage.xaml index 77801747576..c60d7f6ab0e 100644 --- a/src/DynamoCoreWpf/Views/PackageManager/Pages/PublishPackageSelectPage.xaml +++ b/src/DynamoCoreWpf/Views/PackageManager/Pages/PublishPackageSelectPage.xaml @@ -583,6 +583,7 @@ +