Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DYN-6577][DYN-6548] Fix Publish current workspace option and PM documentation link #14808

Merged
merged 31 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
56ba101
Fix PostDiff job
zeusongit Aug 11, 2023
dc250de
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Aug 11, 2023
1fecd29
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Aug 16, 2023
90a6c41
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Aug 28, 2023
64c202b
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Aug 29, 2023
d6ac751
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Sep 5, 2023
255feeb
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Sep 7, 2023
4e55f7f
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Sep 8, 2023
1886669
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Sep 8, 2023
8ac6b74
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Sep 12, 2023
41c461c
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Sep 12, 2023
f9cf237
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Sep 28, 2023
a0adaef
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Oct 13, 2023
2ab3d49
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Oct 17, 2023
558df01
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Oct 20, 2023
efdb82b
Merge branch 'master' of https://github.com/zeusongit/Dynamo
zeusongit Oct 20, 2023
9b712f2
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Oct 23, 2023
7c2dc1e
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Oct 25, 2023
83bcb52
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 1, 2023
30b861d
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Nov 3, 2023
71d23c2
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Dec 1, 2023
cd1c4f9
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Dec 1, 2023
0cae237
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Dec 6, 2023
d9d38c8
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Dec 12, 2023
ecebcda
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Dec 13, 2023
a53e033
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Dec 20, 2023
764342d
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
zeusongit Jan 3, 2024
1e85313
Update PublishPackageViewModel.cs
zeusongit Jan 3, 2024
a07f467
Update PublishPackageViewModel.cs
zeusongit Jan 3, 2024
5f87001
add doc link
zeusongit Jan 3, 2024
c338213
tooltip updated
zeusongit Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,87 +150,153 @@
<!-- and custom styling in Dynamo sidepanel. -->

<body style="background-color: #353535; font-family: 'Artifakt Element', 'Open Sans';">
<h3>Publishing Dynamo Packages</h3>
<h3>Package Manager</h3>
<p>
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.
</p>
<h4>What are packages?</h4>
<p>
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.
</p>
<h4>Package Name:</h4>
<h4>Installing Dynamo packages</h4>
<p>
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.
</p>
<p>
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.
</p>
<p>
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.
</p>
<p>
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.
</p>
<h4>Publishing Dynamo Packages</h4>
<p>
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.
</p>

<h4>Adding package details</h4>

<p>
<b>Package Name:</b><br />
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.
</p>
<p>
<b>Description:</b><br />
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.
</p>
<p>
<b>Version:</b><br />
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.
</p>
<p>
<b>Group:</b><br />
This field can be used to specify a group that a package belongs to such as the company/organization.
<b>Host:</b><br />
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.
</p>
<p>
<b>External Dependency (optional):</b><br />
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.
<b>Keywords (optional):</b><br />
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.
</p>
<p>
<b>Keywords (optional):</b><br />
Some keywords that can be used as tags related to your package. For e.g Generative Design, ML etc.
<b>Group (optional):</b><br />
This field can be used to specify a group that a package belongs to such as the company/organization.
</p>
<p>
<b>Website (optional):</b><br />
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.
</p>
<p>
<b>Repository URL (optional):</b><br />
A link to package's repository that can help users to view or contribute to the package development.
A link to the packages repository that allows users to view or contribute to package development.
</p>
<p>
<b>License (optional):</b><br />
A license under which the package is released. Default license : MIT.
</p>
<p>
<b>Package Contents (optional):</b><br />
This section includes the right sidebar of the dialog box.
<b>Copyright holder (optional):</b><br />
Name of the person who holds the copyright to the package. If left blank, this defaults to your username.
</p>
<p>
<b>Copyright year (optional):</b><br />
The copyright year for the package. If left blank, this defaults to the year the package was published.
</p>

<h4>Adding package files</h4>

<p>
<b>Package Contents:</b><br />
This section, located in the right sidebar of the Publish a Package tab, allows you to organize your package contents prior to publishing.
</p>
<p>
<b>Add File:</b><br />
Select and add all the files that are related to your package; generally the bin folder, binaries and dependencies are added.
<b>Add Files/Directory:</b><br />
<p>
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.
</p>
<p>
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.
</p>
<p>
<b>Select Node Libraries:</b><br />
<p>
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.
</p>
<p>
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.
</p>
</p>
<p>
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.
<b>Retain folder structure:</b><br />
<p>
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.
</p>
<p>
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.
</p>
</p>
<p>
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.
<b>Preview Package Contents:</b><br />
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.
</p>
<p>
<b>Publish Step:</b><br />
<b>Add markdown file path (optional):</b><br />
You have the option to specify a file path that hosts markdown (.md) documentation for your package in the Markdown Files Path section.
</p>
<p>
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.
<b>Publishing your package</b><br />
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.
</p>

<hr />

<h3>Anti-virus Scans</h3>
<p>
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.
</p>
<h3>Managing your packages</h3>
<p>
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.
</p>
<h3>Package Settings</h3>
<p>
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.
</p>
</body>
Original file line number Diff line number Diff line change
Expand Up @@ -1463,9 +1463,10 @@ internal IEnumerable<string> 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();
Expand Down
27 changes: 23 additions & 4 deletions src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -108,16 +109,34 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="46" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="HeaderTitle"
<StackPanel Grid.Column="0"
VerticalAlignment="Top"
Orientation="Horizontal"
HorizontalAlignment="Left">
<TextBlock x:Name="HeaderTitle"
Text="{x:Static p:Resources.PackageManagerTitle}"
Foreground="{StaticResource PreferencesWindowFontColor}"
Grid.Column="0"
Margin="14,16,0,0"
TextAlignment="Left"
FontSize="20"
FontFamily="Helvetica"
HorizontalAlignment="Left"
Width="459" />
HorizontalAlignment="Left" />
<Label HorizontalAlignment="Left"
DockPanel.Dock="Left"
Name="Titleinfo"
VerticalAlignment="Top"
Height="26"
Width="26"
Margin="10,16,0,0"
MouseLeftButtonDown="OnMoreInfoClicked">
<Label.ToolTip>
<ToolTip Content="{x:Static p:Resources.PublishPackageDocTooltipText}" Style="{StaticResource GenericToolTipLight}"/>
</Label.ToolTip>
<Label.Content>
<fa:ImageAwesome Width="15" Height="15" VerticalAlignment="Bottom" HorizontalAlignment="Left" Icon="Regular_QuestionCircle" Foreground="{StaticResource PreferencesWindowFontColor}"/>
</Label.Content>
</Label>
</StackPanel>
<StackPanel Grid.Column="1"
VerticalAlignment="Top"
Orientation="Horizontal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,11 @@ private void tab_PreviewMouseDown(object sender, MouseButtonEventArgs e)
}
}
}

private void OnMoreInfoClicked(object sender, MouseButtonEventArgs e)
{
this.PackageManagerViewModel.PackageSearchViewModel
.PackageManagerClientViewModel.DynamoViewModel.OpenDocumentationLinkCommand.Execute(new OpenDocumentationLinkEventArgs(new Uri(Wpf.Properties.Resources.PublishPackageMoreInfoFile, UriKind.Relative)));
}
}
}
Loading