Skip to content

Commit

Permalink
Update Dyn-1822 (#10369)
Browse files Browse the repository at this point in the history
* Dyn 2303 (#10277)

* Add Category ExcelTest.

* Update ExcelTests.cs

* Add new LibraryViewExtension project based on System.Windows.Controls.WebBrowser (#10241)

* add new project
add make core internals visible
add duplicate files as required

* build of libjswebview seems to work
added package references

* add resource files as links so dont duplicate them in repo

* move to .net 4.7.2 to avoid package ref issues
namespace adds dynamo
use new namespace to reference resources that are embedded.

* move back to 4.7 to see if we can get a build on self serve

* log msbuild version in appyveyor

* try using buildxml which restores a bit differently

* image should not be under env - bah

* revet back to nuget restore and build dynamo all

* working branch in acad

* icons from host registered streams supported now

* this functions but startup time is slow.
visibility fixed with startPage
loads acad icons from resource streams that are registered using existing resource dict

* add some stopwatch logging to resource loading
remove superflous resourcestream handler
add cache to main iconProvider entrypoint as first step in resolving icon data
use string builder to construct base64 data strings

* missed changes

* semi working lazy load - small change made to librariejs to raise event whenever any item is clicked
we also cache the original url before falling back to the default icon so we can load the real icon later.

* some cleanup

* update namespace to reflect what components are actually used
update some todos
update comments

* drop back to packges config
rename project, rename folder
rename extension class

* assembly and type names changed

* remove value tuple use
set version number to auto increment for now - keep at 1.0.x until we have a longer term plan for this project

* get rid of value tuple

* recase some methods
comments
add readme

* address review comments

* Add new tests (#10279)

* Revert "Reset engine controller for every new workspace (#10113)" (#10282)

This reverts commit b01e2de.

* DYN-2375 - Event to handle the close operation of the workspace references extension  (#10280)

* First commit

* new changes

* Renaming the event

* Adding test

* Upgrade Revit Sample file to Revit 2021 (#10288)

* pass the additional to sign list to the installerspec generator (#10285)

add new files
add comments
remove files that no longer exist
update installerSpec.exe
update installerspec source

* LibG Binaries Update (#10295)

* "LibG/ASM224,7418555f"

* "LibG/ASM224.4,918b3d73"

* "LibG/ASM225,2b68d3dd"

* "LibG/ASM226,2b308956"

* Change mechanism to retreive the certificate from assembly (#10301)

* DYN-2225 - Marshaling Performance optimization - Heap Cleanup (#10026)

* fast path for zero size heap allocation

* Cache mechanism for marshalling lookups

* Do not allocate heap stack values for class properties for CLR objects

* Test removing getter heap interaction for CLR object

* Remove unused Heap Object set

* make variables non-static

* remove GetterFunctionPointer class

Co-authored-by: aparajit-pratap <[email protected]>

* DYN-2289: Fix crash with NodeToCode (#10305)

* search for property by getter if not found

* add test

* Geometry Color Tests More (#10291)

* Add geometry color check for Display_ByGeometryColor_HasColoredMesh

Add geometry color check for Display_ByGeometryColor_HasColoredMesh

* Test updates

* Add Geometry Transparency Test

* Update test name

* update newly added test (#10313)

* DYN-2286: fix for crash upon unresolved node undo (#10315)

* fix for crash upon unresolved node undo

* override Equals in PortModel

* add recorded test

* DYN-2328 Add test for geometry labeling (#10311)

* DYN-2328 Add test for geometry lablling

* DYN-2328 Add test for geometry labeling

* Removing extra assignments

* updating the test and the test dyn file.

* Removing the extra variable that is not being used

* First Github Action (#10131)

This Github Action will greet Github users who submit a PR or issue first time to our repo

* Removal of PR trigger for now (#10323)

* Analytics Agreement Workflow Update (#10314)

* Initial Commit to Update Analytics Agreement Workflow

* update

* Add unit test for deserializing analytics setting

* Update instrumentation default agreement setting in unit test

* Add more comments

* Add missing resource string (#10329)

* LibG Binaries Update (#10331)

* "LibG/ASM224,7418555f"

* "LibG/ASM224.4,918b3d73"

* "LibG/ASM225,2b68d3dd"

* "LibG/ASM226,5c8f1fdd"

* Fix the library view display issues introduced by MS WebBrowser (#10316)

* Disable the context menu on the library viewer.

* Zoom the libarary view to adapt the current DPI scale.

* Disable the horizontal scroll bar on the bottom of the library view.

* Disable the library view is zoomed by keyboard or mouse wheel.

* Zoom the library bar to adapt the current DPI scale.

* Hide the extra search text bar close button.

* [DYN-2382] LibraryViewExtensionMSWebBrowser does not scale correctly when using display scaling (#10335)

* Disable the context menu on the library viewer.

* Zoom the libarary view to adapt the current DPI scale.

* Disable the horizontal scroll bar on the bottom of the library view.

* Disable the library view is zoomed by keyboard or mouse wheel.

* Zoom the library bar to adapt the current DPI scale.

* Hide the extra search text bar close button.

* Unsubscribing the event handler in dispose method

* Skip GA Client Tear Down Process if NOT Necessary (#10340)

* Skip Analytics Client Tear down if it is not needed

* Add unit test covering analytics tear down

* Touch test naming

* [Analytics] Update Tracking Conditions (#10345)

* Update Tracking Conditions

* Add same check to ReportingUsage

* Add properties comments

* PR comment (#10347)

* Code improvements: (#10348)

1. Unsubscribe DpiChanged event handler in the browser Dispose method.
2. Move the overflow-x style setting from script to html to avoid to set it when the script method is called every time.
3. Add necessary comments.

Co-authored-by: manuelsaldivar525 <[email protected]>
Co-authored-by: Michael Kirschner <[email protected]>
Co-authored-by: Aaron (Qilong) <[email protected]>
Co-authored-by: aparajit-pratap <[email protected]>
Co-authored-by: reddyashish <[email protected]>
Co-authored-by: ZiyunShang <[email protected]>
Co-authored-by: DynamoEngOps <[email protected]>
Co-authored-by: Craig Long <[email protected]>
Co-authored-by: StarLee <[email protected]>
  • Loading branch information
10 people authored Feb 7, 2020
1 parent 2876235 commit 2752653
Show file tree
Hide file tree
Showing 95 changed files with 5,274 additions and 349 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Greetings

on: [issues]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thank you for submitting the issue to us. We are sorry if you get stuck on your workflow. While waiting for our team member to respond, please feel free to browse our forum at https://forum.dynamobim.com/ for more Dynamo related information.'
pr-message: 'Thank you for contributing to Dynamo. We are thrilled to see you take a step forward and please allow up to 30 days for us to review your PR. While waiting for our team member to respond, please feel free to browse our forum at https://forum.dynamobim.com/ for more Dynamo related information.'
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ platform: Any CPU

configuration: Release

image: Visual Studio 2017

before_build:
- nuget restore .\src\Dynamo.All.sln

environment:
dynamo_solution: src/Dynamo.All.sln
image: Visual Studio 2017


build_script:
- where msbuild
- msbuild %dynamo_solution%


Expand Down
Binary file removed doc/distrib/Samples/Data/DynamoSample_2018.rvt
Binary file not shown.
Binary file added doc/distrib/Samples/Data/DynamoSample_2021.rvt
Binary file not shown.
Binary file modified extern/LibG_224_0_1/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_224_0_1/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_224_0_1/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_224_0_1/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_224_0_1/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_224_0_1/LibGCore.dll
Binary file not shown.
Binary file modified extern/LibG_224_4_0/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_224_4_0/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_224_4_0/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_224_4_0/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_224_4_0/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_224_4_0/LibGCore.dll
Binary file not shown.
Binary file modified extern/LibG_225_0_0/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_225_0_0/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_225_0_0/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_225_0_0/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_225_0_0/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_225_0_0/LibGCore.dll
Binary file not shown.
Binary file modified extern/LibG_226_0_0/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_226_0_0/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_226_0_0/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_226_0_0/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_226_0_0/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_226_0_0/LibGCore.dll
Binary file not shown.
Binary file modified extern/ProtoGeometry/LibG.Interface.dll
Binary file not shown.
Binary file modified extern/ProtoGeometry/ProtoGeometry.dll
Binary file not shown.
Binary file modified extern/ProtoGeometry/en-US/ProtoGeometry.resources.dll
Binary file not shown.
11 changes: 11 additions & 0 deletions src/Dynamo.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkspaceDependencyViewExtension", "WorkspaceDependencyViewExtension\WorkspaceDependencyViewExtension.csproj", "{5E76AAB3-6302-473E-9655-081B53FB1419}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibraryViewExtensionMSWebBrowser", "LibraryViewExtensionMSWebBrowser\LibraryViewExtensionMSWebBrowser.csproj", "{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -811,6 +813,14 @@ Global
{5E76AAB3-6302-473E-9655-081B53FB1419}.Release|Any CPU.Build.0 = Release|Any CPU
{5E76AAB3-6302-473E-9655-081B53FB1419}.Release|x64.ActiveCfg = Release|Any CPU
{5E76AAB3-6302-473E-9655-081B53FB1419}.Release|x64.Build.0 = Release|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Debug|x64.ActiveCfg = Debug|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Debug|x64.Build.0 = Debug|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Release|Any CPU.Build.0 = Release|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Release|x64.ActiveCfg = Release|Any CPU
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -883,6 +893,7 @@ Global
{C0D6DEE5-5532-4345-9C66-4C00D7FDB8BE} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{47D2166C-5261-4093-9660-E72B7035E666} = {88D45B00-E564-41DB-B57C-9509646CAA49}
{5E76AAB3-6302-473E-9655-081B53FB1419} = {88D45B00-E564-41DB-B57C-9509646CAA49}
{1A5DC90A-477E-4D4A-87BD-0BFB01F056CE} = {88D45B00-E564-41DB-B57C-9509646CAA49}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {89CB19C6-BF0A-4E6A-BFDA-79D143EAB59D}
Expand Down
14 changes: 10 additions & 4 deletions src/DynamoCore/Graph/Nodes/CodeBlockNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ public override ProtoCore.Type GetTypeHintForOutput(int index)
if (statement == null)
return type;

BinaryExpressionNode expr = statement.AstNode as BinaryExpressionNode;
var expr = statement.AstNode as BinaryExpressionNode;
if (expr == null || expr.Optr != Operator.assign)
return type;

Expand All @@ -554,15 +554,21 @@ public override ProtoCore.Type GetTypeHintForOutput(int index)
return type;

var classIndex = core.ClassTable.IndexOf(fullyQualifiedName);
if (classIndex == ProtoCore.DSASM.Constants.kInvalidIndex)
if (classIndex == Constants.kInvalidIndex)
return type;

var targetClass = core.ClassTable.ClassNodes[classIndex];
var func = targetClass.GetFirstMemberFunctionBy(funcNode.Function.Name);
var funcName = funcNode.Function.Name;
var func = targetClass.GetFirstMemberFunctionBy(funcName);
if (func == null)
{
func = targetClass.ProcTable.GetPropertyGetterByName(funcName);
}
type = func.ReturnType;
return type;
}
else if (expr.RightNode is FunctionCallNode)

if (expr.RightNode is FunctionCallNode)
{
var functionCallNode = expr.RightNode as FunctionCallNode;
ProtoCore.FunctionGroup funcGroup;
Expand Down
28 changes: 20 additions & 8 deletions src/DynamoCore/Graph/Nodes/DummyNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Xml;

namespace Dynamo.Graph.Nodes
Expand Down Expand Up @@ -250,11 +251,10 @@ private void LoadNode(XmlNode nodeElement)
OutputCount = Int32.Parse(outputCount.Value);
LegacyNodeName = legacyName.Value;

if (nodeElement.ChildNodes != null)
foreach (XmlNode childNode in nodeElement.ChildNodes)
{
foreach (XmlNode childNode in nodeElement.ChildNodes)
if (childNode.Name.Equals("OriginalNodeContent"))
OriginalNodeContent = (XmlElement)nodeElement.FirstChild.FirstChild;
if (childNode.Name.Equals("OriginalNodeContent"))
OriginalNodeContent = (XmlElement) nodeElement.FirstChild.FirstChild;
}

if (originalElement != null)
Expand Down Expand Up @@ -292,18 +292,30 @@ private void LoadNode(XmlNode nodeElement)

private void UpdatePorts()
{
var guids = InPorts.Select(x => x.GUID).ToArray();
InPorts.Clear();
for (int input = 0; input < InputCount; input++)
{
var name = string.Format("Port {0}", input + 1);
InPorts.Add(new PortModel(PortType.Input, this, new PortData(name, "")));
var name = $"Port {input + 1}";
var pm = new PortModel(PortType.Input, this, new PortData(name, ""));
InPorts.Add(pm);
if (guids.Length == InputCount)
{
pm.GUID = guids[input];
}
}

guids = OutPorts.Select(x => x.GUID).ToArray();
OutPorts.Clear();
for (int output = 0; output < OutputCount; output++)
{
var name = string.Format("Port {0}", output + 1);
OutPorts.Add(new PortModel(PortType.Output, this, new PortData(name, "")));
var name = $"Port {output + 1}";
var pm = new PortModel(PortType.Output, this, new PortData(name, ""));
OutPorts.Add(pm);
if (guids.Length == OutputCount)
{
pm.GUID = guids[output];
}
}

RegisterAllPorts();
Expand Down
19 changes: 18 additions & 1 deletion src/DynamoCore/Graph/Nodes/PortModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum PortType { Input, Output };
/// <summary>
/// PortModel represents Dynamo ports.
/// </summary>
public class PortModel : ModelBase
public class PortModel : ModelBase, IEquatable<PortModel>
{
#region private fields
ObservableCollection<ConnectorModel> connectors = new ObservableCollection<ConnectorModel>();
Expand Down Expand Up @@ -369,6 +369,23 @@ protected override void DeserializeCore(XmlElement nodeElement, SaveContext cont
}

#endregion

public bool Equals(PortModel other)
{
if (other == null) return false;

if (this == other) return true;

if (GUID == other.GUID) return true;

return false;
}

public override int GetHashCode()
{
return GUID.GetHashCode();
}

}

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions src/DynamoCore/Graph/Workspaces/HomeWorkspaceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class HomeWorkspaceModel : WorkspaceModel
private readonly bool verboseLogging;
private bool graphExecuted;

// Event to handle closing of the workspace references extension when the workspace is closed.
internal static event Action WorkspaceClosed;

// To check whether task is completed or not.
private bool executingTask;

Expand Down Expand Up @@ -419,6 +422,7 @@ private void NodeOnRequestSilenceNodeModifiedEvents(NodeModel node, bool value)
/// </summary>
public override void Clear()
{
WorkspaceClosed?.Invoke();
base.Clear();
PreloadedTraceData = null;
RunSettings.Reset();
Expand Down
44 changes: 32 additions & 12 deletions src/DynamoCore/Logging/DynamoAnalyticsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ public void Dispose()
else
StabilityCookie.WriteCleanShutdown();

Service.ShutDown();
//Unregister the GATrackerFactory only after shutdown is recorded.
//Unregister is required, so that the host app can re-start Analytics service.
Service.Instance.Unregister(GATrackerFactory.Name);
// If the Analytics Client was initialized, shut it down.
// Otherwise skip this step because it would cause an exception.
if (Service.IsInitialized)
{
Service.ShutDown();
// Unregister the GATrackerFactory only after shutdown is recorded.
// Unregister is required, so that the host app can re-start Analytics service.
Service.Instance.Unregister(GATrackerFactory.Name);
}

if (null != heartbeat)
Heartbeat.DestroyInstance();
Expand Down Expand Up @@ -123,14 +128,27 @@ public void Dispose() { }

public virtual IAnalyticsSession Session { get; private set; }

/// <summary>
/// Return if Analytics Client is allowed to send analytics info
/// </summary>
public bool ReportingAnalytics
{
get { return preferences != null && preferences.IsAnalyticsReportingApproved; }
get
{
return preferences != null
&& Service.IsInitialized
&& preferences.IsAnalyticsReportingApproved;
}
}

/// <summary>
/// Return if Analytics Client is allowed to send instrumentation info
/// </summary>
public bool ReportingUsage
{
get { return preferences != null && preferences.IsUsageReportingApproved; }
get { return preferences != null
&& Service.IsInitialized
&& preferences.IsUsageReportingApproved; }
}

/// <summary>
Expand Down Expand Up @@ -160,12 +178,14 @@ public DynamoAnalyticsClient(DynamoModel dynamoModel)
/// </summary>
public void Start()
{
//If not ReportingAnalytics, then set the idle time as infinite so idle state is not recorded.
Service.StartUp(product,
new UserInfo(Session.UserId), ReportingAnalytics ? TimeSpan.FromMinutes(30) : TimeSpan.MaxValue);

TrackPreferenceInternal("ReportingAnalytics", "", ReportingAnalytics ? 1 : 0);
TrackPreferenceInternal("ReportingUsage", "", ReportingUsage ? 1 : 0);
if (preferences!= null && preferences.IsAnalyticsReportingApproved)
{
//If not ReportingAnalytics, then set the idle time as infinite so idle state is not recorded.
Service.StartUp(product,
new UserInfo(Session.UserId), preferences.IsAnalyticsReportingApproved ? TimeSpan.FromMinutes(30) : TimeSpan.MaxValue);
TrackPreferenceInternal("ReportingAnalytics", "", ReportingAnalytics ? 1 : 0);
TrackPreferenceInternal("ReportingUsage", "", ReportingUsage ? 1 : 0);
}
}

public void ShutDown()
Expand Down
2 changes: 2 additions & 0 deletions src/DynamoCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@
// Internals are visible to the Package Manager extension
// For workspace package dependency collection
[assembly: InternalsVisibleTo("WorkspaceDependencyViewExtension")]

[assembly: InternalsVisibleTo("LibraryViewExtensionMSWebBrowser")]
4 changes: 2 additions & 2 deletions src/DynamoCoreWpf/Extensions/ViewLoadedParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void AddMenuItem(MenuBarType type, MenuItem menuItem, int index = -1)
/// <returns></returns>
public void AddToExtensionsSideBar(IViewExtension viewExtension, ContentControl contentControl)
{
TabItem tabItem = dynamoView.AddTabItem(viewExtension, contentControl);
TabItem tabItem = dynamoView.AddExtensionTabItem(viewExtension, contentControl);

if (tabItem != null)
{
Expand All @@ -117,7 +117,7 @@ public void AddToExtensionsSideBar(IViewExtension viewExtension, ContentControl
/// <returns></returns>
public void CloseExtensioninInSideBar(IViewExtension viewExtension)
{
dynamoView.CloseTabItem(viewExtension);
dynamoView.CloseExtensionTabItem(viewExtension);
}

public void AddSeparator(MenuBarType type, Separator separatorObj, int index = -1)
Expand Down
58 changes: 18 additions & 40 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

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

Loading

0 comments on commit 2752653

Please sign in to comment.