From 56ba10186069f41191debf6b89ad2e92c91cc99f Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Fri, 11 Aug 2023 10:14:43 -0400 Subject: [PATCH 1/5] Fix PostDiff job --- .github/workflows/clear_cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clear_cache.yml b/.github/workflows/clear_cache.yml index 37ef5949bd8..0f2e0ab5dd5 100644 --- a/.github/workflows/clear_cache.yml +++ b/.github/workflows/clear_cache.yml @@ -77,8 +77,8 @@ jobs: echo "Deleting caches..." echo "Deleting: $WNNUM-cache-net60Win-current" gh actions-cache delete $WNNUM-cache-net60Win-current -R $REPO --confirm - echo "Deleting: $WNNUM-cache-current" - gh actions-cache delete $WNNUM-cache-current -R $REPO --confirm + echo "Deleting: $WNNUM-cache-net60Win-master" + gh actions-cache delete $WNNUM-cache-master -R $REPO --confirm env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1e853138f8b7db2c8808aa8f3884b642e69a72c2 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Wed, 3 Jan 2024 14:45:56 -0500 Subject: [PATCH 2/5] Update PublishPackageViewModel.cs --- .../ViewModels/PackageManager/PublishPackageViewModel.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs index b6f414fad95..2e62190e682 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs @@ -1463,9 +1463,10 @@ internal IEnumerable GetAllFiles() workspaces.Where(ws => ws.HasUnsavedChanges || ws.FileName == null).Select( ws => ws.Name).ToList(); if (unsavedWorkspaceNames.Any()) { - throw new Exception(Wpf.Properties.Resources.MessageUnsavedChanges0 + + MessageBoxService.Show(System.Windows.Application.Current.MainWindow, Resources.MessageUnsavedChanges0, Resources.UnsavedChangesMessageBoxTitle, MessageBoxButton.OK, MessageBoxImage.Warning); + throw new Exception(Resources.MessageUnsavedChanges0 + String.Join(", ", unsavedWorkspaceNames) + - Wpf.Properties.Resources.MessageUnsavedChanges1); + Resources.MessageUnsavedChanges1); } var pmExtension = dynamoViewModel.Model.GetPackageManagerExtension(); From a07f4673831f456a0744d122d5c79f4eac98fd8a Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Wed, 3 Jan 2024 14:46:35 -0500 Subject: [PATCH 3/5] Update PublishPackageViewModel.cs --- .../ViewModels/PackageManager/PublishPackageViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs index 2e62190e682..f36e31445af 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs @@ -1463,7 +1463,7 @@ internal IEnumerable GetAllFiles() workspaces.Where(ws => ws.HasUnsavedChanges || ws.FileName == null).Select( ws => ws.Name).ToList(); if (unsavedWorkspaceNames.Any()) { - MessageBoxService.Show(System.Windows.Application.Current.MainWindow, Resources.MessageUnsavedChanges0, Resources.UnsavedChangesMessageBoxTitle, MessageBoxButton.OK, MessageBoxImage.Warning); + MessageBoxService.Show(System.Windows.Application.Current?.MainWindow, Resources.MessageUnsavedChanges0, Resources.UnsavedChangesMessageBoxTitle, MessageBoxButton.OK, MessageBoxImage.Warning); throw new Exception(Resources.MessageUnsavedChanges0 + String.Join(", ", unsavedWorkspaceNames) + Resources.MessageUnsavedChanges1); From 5f870015044f4830e8e75cddf16faaedb66c3fc7 Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Wed, 3 Jan 2024 16:28:31 -0500 Subject: [PATCH 4/5] add doc link --- .../Docs/PublishPackageDocumentation.html | 142 +++++++++++++----- .../PackageManager/PackageManagerView.xaml | 27 +++- .../PackageManager/PackageManagerView.xaml.cs | 6 + 3 files changed, 133 insertions(+), 42 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html b/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html index 41204540969..ce05375c9ba 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/Docs/PublishPackageDocumentation.html @@ -150,87 +150,153 @@ -

Publishing Dynamo Packages

+

Package Manager

- Dynamo offers a vast number of features out of the box and also maintains an extensive package library, to which the community can contribute, that can significantly extend Dynamo's capability. - This documentation describes how a user can publish a package from Dynamo. + The Dynamo Package Manager is a one-stop-shop for browsing, installing, and publishing packages. Access it from the top navigation under Packages > Package Manager.

+

What are packages?

- The menu option to publish a package can be found at: "Packages > Publish New Package...". - Clicking this menu item will open a dialog box that will ask for all the information related to the package the user wants to publish. + Dynamo offers a vast number of features out of the box and also maintains an extensive package library that can significantly extend Dynamo’s capability. + A package is a collection of custom nodes or additional functionality. The Dynamo Package Manager is a portal for the community to download any package that has been published online. + These toolsets are developed by third parties to extend Dynamo's core functionality, accessible to all, and ready to download at the click of the button.

-

Package Name:

+

Installing Dynamo packages

- Name of the package you want to publish. This will appear in the library and on the package manager website. + 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 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. + In the package details panel, click Install below a specific version in the Versions and Package Requirements table to install that version. +

+

+ You can find a list of the packages you have installed in the Installed Packages tab of the Package Manager. On this tab, you can view package files, uninstall packages, and more. +

+

Publishing Dynamo Packages

+

+ 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

+ +

+ Package Name:
+ Name of the package you want to publish. This will appear in the library, in package search, and on the package manager website. Package names must be at least 3 characters in length.

Description:
- The description is a great place to add more details about your package, including listing any exceptions and pre-requisites. - It can also be used to educate users on what the package does and how it can be utilised into their workspaces. + The description is a great place to add more details about your package, including listing any exceptions and prerequisites. It can also be used to educate users on what the package does and how it can be used in their workspaces.

Version:
- The version field is split into three sections, major, minor and build, which allows you as a package author to upload new versions of your - package that follow versioning semantics - Users may want to publish more versions for their packages with new and improved features, - polish some corners which were left out in the first version, or fix a bug. + The version field is split into three sections, major, minor, and build, which allows you as a package author to upload new versions of your package that follow versioning semantics. Package authors may want to publish more versions for their packages with new and improved features, polish some corners that were left out in the first version, or fix a bug.

- Group:
- This field can be used to specify a group that a package belongs to such as the company/organization. + Host:
+ If your package relies on a host program, such as Revit, Civil3D, Alias, or others, you can pick one or more hosts from the drop-down. When searching for packages, users can filter results based on host to help them locate packages that are designed to work with their preferred programs.

- External Dependency (optional):
- Your package may depend on a host or its API as Dynamo can be integrated with a bunch of different optional - hosts such as Revit or Civil 3D, so this field can be used to specify which other host(s) your package depends upon. + Keywords (optional):
+ Keywords that can be used as tags related to your package, for example, Generative Design, ML, etc. You can type multiple keywords into the field at once by separating them with the space key, then pressing Enter.

- Keywords (optional):
- Some keywords that can be used as tags related to your package. For e.g Generative Design, ML etc. + Group (optional):
+ This field can be used to specify a group that a package belongs to such as the company/organization.

Website (optional):
- Website that may provide the user with more info regarding the package or the organization/author. + A link to a website that may provide the user with more information regarding the package or the organization/author.

Repository URL (optional):
- A link to package's repository that can help users to view or contribute to the package development. + A link to the package’s repository that allows users to view or contribute to package development.

License (optional):
A license under which the package is released. Default license : MIT.

- Package Contents (optional):
- This section includes the right sidebar of the dialog box. + Copyright holder (optional):
+ Name of the person who holds the copyright to the package. If left blank, this defaults to your username. +

+

+ Copyright year (optional):
+ The copyright year for the package. If left blank, this defaults to the year the package was published. +

+ +

Adding package files

+ +

+ Package Contents:
+ This section, located in the right sidebar of the Publish a Package tab, allows you to organize your package contents prior to publishing.

- Add File:
- Select and add all the files that are related to your package; generally the bin folder, binaries and dependencies are added. + 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 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. 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 node library. + Retain folder structure:
+

+ Advanced package authors with complex package folder structures may want to enable the Retain Folder Structure toggle below the package contents preview panel. + When this setting is toggled on, Dynamo won’t make changes to your package folder structure; instead, the package will be uploaded as is. +

+

+ This is an advanced setting because packages need to be set up in a certain way to ensure they work and to avoid any issues. + When in doubt, toggle the setting off to allow Dynamo to set up the folder structure. +

- 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.

- Publish Step:
+ Add markdown file path (optional):
+ You have the option to specify a file path that hosts markdown (.md) documentation for your package in the Markdown Files Path section.

- After filling in all the required details you can publish the package locally or online. - When publishing locally the package will be published in the local root directory, - whereas while publishing online the package will be uploaded to the package manager. + Publishing your package
+ After filling in all the required details, you can publish the package locally or online. When publishing locally, the package will be published in the local root directory, whereas when publishing online, the package will be uploaded to the Package Manager.

+
+

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 window 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. + 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

+

+ You can find a list of your published packages in the My Packages tab of the Package Manager, where you can deprecate them, publish a new version, etc. +

+

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/PackageManagerView.xaml b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml index df14b67dfeb..f88c3ae354c 100644 --- a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml +++ b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml @@ -7,6 +7,7 @@ xmlns:controls="clr-namespace:Dynamo.Controls" xmlns:p="clr-namespace:Dynamo.Wpf.Properties;assembly=DynamoCoreWpf" xmlns:ui="clr-namespace:Dynamo.UI" + xmlns:fa="clr-namespace:FontAwesome5;assembly=FontAwesome5.Net" xmlns:wpfControls="clr-namespace:Dynamo.Wpf.Controls" xmlns:local="clr-namespace:Dynamo.PackageManager.UI" WindowStartupLocation="CenterOwner" @@ -108,16 +109,34 @@ - + + HorizontalAlignment="Left" /> + + Date: Thu, 4 Jan 2024 14:04:03 -0500 Subject: [PATCH 5/5] tooltip updated --- src/DynamoCoreWpf/Properties/Resources.Designer.cs | 2 +- src/DynamoCoreWpf/Properties/Resources.en-US.resx | 4 ++-- src/DynamoCoreWpf/Properties/Resources.resx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index a75a7df983c..1e7b36fd450 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -8082,7 +8082,7 @@ public static string PublishPackageDialogCaption { } /// - /// Looks up a localized string similar to Learn More about publishing a package. + /// Looks up a localized string similar to Learn more about packages. /// public static string PublishPackageDocTooltipText { get { diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index bcd6721098e..53a702137cd 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -2408,7 +2408,7 @@ Uninstall the following packages: {0}? File menu | Export - Learn More about publishing a package + Learn more about packages Features @@ -3882,4 +3882,4 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in Millimeters - + \ No newline at end of file diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index 0fac11226a4..767a569dbbb 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -2693,7 +2693,7 @@ Uninstall the following packages: {0}? File menu | Export - Learn More about publishing a package + Learn more about packages Features @@ -3869,4 +3869,4 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in Millimeters - + \ No newline at end of file