Skip to content

Commit

Permalink
try to resolve merge conflicts with dynamo master (DynamoDS#33)
Browse files Browse the repository at this point in the history
* Dyn 3817 exit tour window popup (DynamoDS#11918)

* DYN-3817-ExitTourWindow Popup

I added the UI for the Exit Tour Window, but still having some issues in the layout

* DYN-3817-ExitTourWindow-Popup

I created the view for the Exit Tour Window and also the functionality of showing the ExitTour ( this is shown only when one of the steps is closed so the tour is not finished - this doesn't apply for the Survey popup).
A resource string was added and is related to the ExitTour content so it can be localized later.

* DYN-3817-ExitTourWindow-Popup

Removing code not needed in DynamoView.xaml.cs

* DYN-3817-ExitTourWindow-Popup Code Review

The ExitTourWindow was renamed to RealTimeInfoWindow.
I reorganized the RealTimeInfoWindow so doesn't depend of a Step (then it can be used in a more generic way).
I created the properties Width, Height and TextContent inside the RealTimeInfoWindow  so they can be set up from outside. The TextContent property contains the text that will be shown in the popup and it can be updated on runtime.

* DYN-3817-ExitTourWindow-Popup Code Issues

Fixing issues produced after merging the latest changes in master branch

* DYN-3817-ExitTourWindow-Popup Code Review 2

The offset hardcoded values were changed to const double, also I reorganized the way the RealTimeInfoWindow object is created.
Also I added some comments in the xaml file

* Dyn-3640 - Recover execution after clearing cyclic dependency from graph (DynamoDS#11896)

* cleanup

* minor cleanup

* clear cycles from dependency graph nodes for graph runs

* cleanup

* update failing test

* clear node warnings for cleared cycles

* do not include cyclic graph node as a redefined node of another graph node

* add unit tests

* fix one more case

* review comments

* add logging to intermittent pkgloader tests (DynamoDS#11925)

* update tests

* update xml summary
add some logging to failing tests

Co-authored-by: michael kirschner <michael.kirschner@autodesk.com>

* pkg load test log typo (DynamoDS#11926)

* update tests

* update xml summary
add some logging to failing tests

* typo

Co-authored-by: michael kirschner <michael.kirschner@autodesk.com>

* Update UI (DynamoDS#11932)

* Update searchMethod invocation in LibraryMSWebBrowserExtension (DynamoDS#11931)

* Update searchMethod invocation 

Update searchMethod invocation  to use correct number of parameters

* Update SearchDictionary.cs

* Add adsk fonts to extern folder with license terms. (DynamoDS#11890)

* small adjustment

* align titles

* add names to buttons for ui automation tests

* missing button name

* new font folder for use in Dynamo only

* Update readme.md

* add font links to about box

Co-authored-by: michael kirschner <michael.kirschner@autodesk.com>

* check for null (DynamoDS#11930)

* Prevent port measure crash (DynamoDS#11935)

* CRASH: Delete node with right-click at the same time (DynamoDS#11927)

* null checks

* Add unit test

* Fix For Loading Json File (DynamoDS#11934)

* Fix For Loading Json File

During the testing of the task https://jira.autodesk.com/browse/DYN-3817 Aabishkar reported that when trying to open the "Get Started" tour a message appear saying Could not find a part of the path 'C:\Windows\system32\UI\GuidedTour\dynamo_guides.json'
Then I modified the code that is loading the json,file, in the past was a relative path and now we are using an absolute path.

* Fix For Loading Json File

Instead to have the json file path in the GuidesManager constructor I created two public properties that will contains the assembly path execution and the JSON files guides path, so we can verify in the unit testing that this paths exists and if the Guide will be created correctly.
Also I added a unit test that will validate that the json guides file exists and that the Guides can be created.

* Handle crash due to save path being too long

Co-authored-by: Roberto T <61755417+RobertGlobant20@users.noreply.github.com>
Co-authored-by: aparajit-pratap <aparajit.pratap@autodesk.com>
Co-authored-by: michael kirschner <michael.kirschner@autodesk.com>
Co-authored-by: Aaron (Qilong) <173288704@qq.com>
Co-authored-by: Ashish Aggarwal <ashish.aggarwal@autodesk.com>
  • Loading branch information
6 people authored Aug 17, 2021
1 parent c0c0632 commit b2929ff
Show file tree
Hide file tree
Showing 37 changed files with 1,674 additions and 122 deletions.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions extern/Autodesk/Artifakt-Element-Font/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Licensing information: © Autodesk, Inc. All Rights Reserved. The Artifakt font software is Autodesk proprietary and confidential, and may be used only by authorized users and only for Autodesk business purposes. Any use not authorized by Autodesk is not permitted and is an infringement of Autodesk's intellectual property rights as well as a breach of your agreement with Autodesk.
Go to brand.autodesk.com/brand-elements/typography for detailed usage guidelines on when and how to use the Artifakt designer collection.
9 changes: 9 additions & 0 deletions extern/Autodesk/Artifakt-Element-Font/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

### Autodesk Artifakt Element Fonts

This folder contains the .otf (Open Type Format) files for the Autodesk Artifakt-Element font that is used in Dynamo.


Please read the [license terms](./license.txt) carefully before use.

These fonts are *not* licensed under Apache 2.0 like other portions of Dynamo. In general you should not use these fonts without permission.
2 changes: 1 addition & 1 deletion src/DynamoCore/Core/CustomNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public IEnumerable<CustomNodeInfo> AddUninitializedCustomNodesInPath(string path
/// <param name="isTestMode">
/// Flag specifying whether or not this should operate in "test mode".
/// </param>
/// <param name="PackageInfo">
/// <param name="packageInfo">
/// Info about the package that requested this customNode to be loaded or to which the customNode belongs.
/// Is PackageMember property will be true if this property is not null.
/// </param>
Expand Down
3 changes: 3 additions & 0 deletions src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,9 @@ internal void AddAndRegisterNode(NodeModel node, bool centered = false)

HasUnsavedChanges = true;

if (node is CodeBlockNodeModel cbn
&& string.IsNullOrEmpty(cbn.Code)) return;

RequestRun();
}

Expand Down
24 changes: 9 additions & 15 deletions src/DynamoCore/Models/DynamoModelCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ private void SelectModelImpl(SelectModelCommand command)

foreach (var guid in command.ModelGuids)
{
ModelBase model = CurrentWorkspace.GetModelInternal(guid);
var model = CurrentWorkspace.GetModelInternal(guid);
if (model == null) return;

if (!model.IsSelected)
{
Expand Down Expand Up @@ -308,9 +309,8 @@ private void BeginConnection(Guid nodeId, int portIndex, PortType portType)
{
bool isInPort = portType == PortType.Input;
activeStartPorts = null;

var node = CurrentWorkspace.GetModelInternal(nodeId) as NodeModel;
if (node == null)

if (!(CurrentWorkspace.GetModelInternal(nodeId) is NodeModel node))
return;
PortModel portModel = isInPort ? node.InPorts[portIndex] : node.OutPorts[portIndex];

Expand Down Expand Up @@ -349,8 +349,7 @@ private void BeginDuplicateConnection(Guid nodeId, int portIndex, PortType portT

// Otherwise, if the port is an input port, check if the port already has a connection.
// If it does, duplicate the existing connection.
var node = CurrentWorkspace.GetModelInternal(nodeId) as NodeModel;
if (node == null)
if (!(CurrentWorkspace.GetModelInternal(nodeId) is NodeModel node))
{
return;
}
Expand All @@ -370,8 +369,7 @@ private void BeginDuplicateConnection(Guid nodeId, int portIndex, PortType portT
private void BeginShiftReconnections(Guid nodeId, int portIndex, PortType portType)
{
if (portType == PortType.Input) return; //only handle multiple connections when the port selected is an output port
var node = CurrentWorkspace.GetModelInternal(nodeId) as NodeModel;
if (node == null) return;
if (!(CurrentWorkspace.GetModelInternal(nodeId) is NodeModel node)) return;

PortModel selectedPort = node.OutPorts[portIndex];

Expand Down Expand Up @@ -410,8 +408,7 @@ private void EndConnection(Guid nodeId, int portIndex, PortType portType)
var startNode = CurrentWorkspace.GetModelInternal(activeStartPorts[0].Owner.GUID);
if (startNode == null) return;

var node = CurrentWorkspace.GetModelInternal(nodeId) as NodeModel;
if (node == null) return;
if (!(CurrentWorkspace.GetModelInternal(nodeId) is NodeModel node)) return;

bool isInPort = portType == PortType.Input;

Expand All @@ -429,8 +426,7 @@ private void EndShiftReconnections(Guid nodeId, int portIndex, PortType portType
if (portType == PortType.Input) return; //only handle multiple connections when the port selected is an output port
if (activeStartPorts == null || activeStartPorts.Count() <= 0) return;

var node = CurrentWorkspace.GetModelInternal(nodeId) as NodeModel;
if (node == null) return;
if (!(CurrentWorkspace.GetModelInternal(nodeId) is NodeModel node)) return;
PortModel selectedPort = node.OutPorts[portIndex];

var firstModel = GetConnectorsToAddAndDelete(selectedPort, activeStartPorts[0]);
Expand All @@ -451,9 +447,7 @@ private void BeginCreateConnections(Guid nodeId, int portIndex, PortType portTyp
{
if (portType == PortType.Output) return; // Only handle ctrl connections if selected port is an input port
if (firstStartPort == null || activeStartPorts == null || activeStartPorts.Count() <= 0) return;

var node = CurrentWorkspace.GetModelInternal(nodeId) as NodeModel;
if (node == null) return;
if (!(CurrentWorkspace.GetModelInternal(nodeId) is NodeModel node)) return;

PortModel portModel = node.InPorts[portIndex];
var models = GetConnectorsToAddAndDelete(portModel, activeStartPorts[0]);
Expand Down
5 changes: 3 additions & 2 deletions src/DynamoCore/Search/SearchDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ internal void RebuildTagDictionary()
}

/// <summary>
/// Search for elements in the dictionary or subset based on the query
/// Search for elements in the dictionary or subset based on the query. PLEASE NOTE - this method is called using reflection from the
/// MSLibraryWebBrowserUIExtension - if its signature is modified, please update its use in that extension.
/// </summary>
/// <param name="query"> The query </param>
/// <param name="minResultsForTolerantSearch">Minimum number of results in the original search strategy to justify doing more tolerant search</param>
Expand Down Expand Up @@ -473,4 +474,4 @@ internal IEnumerable<double> GetWeights(V element)
return null;
}
}
}
}
8 changes: 7 additions & 1 deletion src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
<Compile Include="UI\GuidedTour\Step.cs" />
<Compile Include="UI\GuidedTour\Survey.cs" />
<Compile Include="UI\GuidedTour\Tooltip.cs" />
<Compile Include="UI\GuidedTour\ExitTour.cs" />
<Compile Include="UI\GuidedTour\Welcome.cs" />
<Compile Include="Utilities\CompactBubbleHandler.cs" />
<Compile Include="Interfaces\IShellCom.cs" />
Expand Down Expand Up @@ -339,6 +338,9 @@
<Compile Include="Views\CodeCompletion\CodeCompletionEditor.xaml.cs">
<DependentUpon>CodeCompletionEditor.xaml</DependentUpon>
</Compile>
<Compile Include="Views\GuidedTour\RealTimeInfoWindow.xaml.cs">
<DependentUpon>RealTimeInfoWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Views\GuidedTour\GuideBackground.xaml.cs">
<DependentUpon>GuideBackground.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -463,6 +465,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\GuidedTour\RealTimeInfoWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\GuidedTour\GuideBackground.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
42 changes: 39 additions & 3 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 15 additions & 3 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -616,15 +616,15 @@ You will get a chance to save your work.</value>
<comment>FIle menu | New | New custom node</comment>
</data>
<data name="DynamoViewFileMenuNewHomeWorkSpace" xml:space="preserve">
<value>_Home Workspace...</value>
<value>_Home Workspace</value>
<comment>File menu | New | New home workspace</comment>
</data>
<data name="DynamoViewFileMenuOpen" xml:space="preserve">
<value>_Open...</value>
<comment>File menu | Open</comment>
</data>
<data name="DynamoViewFileMenuRecentFiles" xml:space="preserve">
<value>_Open Recent Files...</value>
<value>_Open Recent Files</value>
<comment>File menu | Open Recent files</comment>
</data>
<data name="DynamoViewFileMenuSave" xml:space="preserve">
Expand Down Expand Up @@ -2270,7 +2270,7 @@ Uninstall the following packages: {0}?</value>
<comment>Dynamo menu</comment>
</data>
<data name="DynamoViewDynamoMenuAbout" xml:space="preserve">
<value>_About...</value>
<value>_About</value>
<comment>Dynamo menu | Display About dialog</comment>
</data>
<data name="DynamoViewDynamoMenuPreferences" xml:space="preserve">
Expand Down Expand Up @@ -2492,6 +2492,9 @@ Uninstall the following packages: {0}?</value>
<data name="GetStartedGuideSurveyTitle" xml:space="preserve">
<value>Finished</value>
</data>
<data name="ExitTourWindowContent" xml:space="preserve">
<value>You can return to this tutorial later from the Help menu.</value>
</data>
<data name="PackageStatePendingUnload" xml:space="preserve">
<value>Scheduled to be unloaded</value>
</data>
Expand Down Expand Up @@ -2562,4 +2565,13 @@ This package will be deleted after the next Dynamo restart.</value>
<data name="PackageContextMenuUnmarkUnloadPackageTooltip" xml:space="preserve">
<value>Remove the scheduled unload status</value>
</data>
<data name="GraphIssuesOnSavePath_Description" xml:space="preserve">
<value>The selected save location path is too long. Please change the save location and try again.</value>
</data>
<data name="GraphIssuesOnSavePath_Summary" xml:space="preserve">
<value>You are trying to save a graph with a path that is too long.</value>
</data>
<data name="GraphIssuesOnSavePath_Title" xml:space="preserve">
<value>Save Path Issues Found</value>
</data>
</root>
18 changes: 15 additions & 3 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@
<comment>FIle menu | New | New custom node</comment>
</data>
<data name="DynamoViewFileMenuNewHomeWorkSpace" xml:space="preserve">
<value>_Home Workspace...</value>
<value>_Home Workspace</value>
<comment>File menu | New | New home workspace</comment>
</data>
<data name="DynamoViewFileMenuOpen" xml:space="preserve">
<value>_Open...</value>
<comment>File menu | Open</comment>
</data>
<data name="DynamoViewFileMenuRecentFiles" xml:space="preserve">
<value>_Open Recent Files...</value>
<value>_Open Recent Files</value>
<comment>File menu | Open Recent files</comment>
</data>
<data name="DynamoViewFileMenuSave" xml:space="preserve">
Expand All @@ -387,7 +387,7 @@
<comment>Help menu</comment>
</data>
<data name="DynamoViewDynamoMenuAbout" xml:space="preserve">
<value>_About...</value>
<value>_About</value>
<comment>Dynamo menu | Display About dialog</comment>
</data>
<data name="DynamoViewHelpMenuDisplayStartPage" xml:space="preserve">
Expand Down Expand Up @@ -2492,6 +2492,9 @@ Uninstall the following packages: {0}?</value>
<data name="GetStartedGuideSurveyTitle" xml:space="preserve">
<value>Finished</value>
</data>
<data name="ExitTourWindowContent" xml:space="preserve">
<value>You can return to this tutorial later from the Help menu.</value>
</data>
<data name="PackageStateError" xml:space="preserve">
<value>Error</value>
</data>
Expand Down Expand Up @@ -2559,4 +2562,13 @@ This package will be deleted after the next Dynamo restart.</value>
<data name="PackageContextMenuUnmarkUnloadPackageTooltip" xml:space="preserve">
<value>Remove the scheduled unload status</value>
</data>
<data name="GraphIssuesOnSavePath_Description" xml:space="preserve">
<value>The selected save location path is too long. Please change the save location and try again.</value>
</data>
<data name="GraphIssuesOnSavePath_Summary" xml:space="preserve">
<value>You are trying to save a graph with a path that is too long.</value>
</data>
<data name="GraphIssuesOnSavePath_Title" xml:space="preserve">
<value>Save Path Issues Found</value>
</data>
</root>
24 changes: 0 additions & 24 deletions src/DynamoCoreWpf/UI/GuidedTour/ExitTour.cs

This file was deleted.

Loading

0 comments on commit b2929ff

Please sign in to comment.