Skip to content

Nickname and PortName should be serialized to Name - #7947

Merged
QilongTang merged 9 commits into
DynamoDS:masterfrom
mjkkirschner:DisplayToName
Jun 12, 2017
Merged

QilongTang merged 9 commits into
DynamoDS:masterfrom
mjkkirschner:DisplayToName

Conversation

@mjkkirschner

@mjkkirschner mjkkirschner commented Jun 9, 2017 •

Copy link
Copy Markdown
Member

Purpose

https://jira.autodesk.com/browse/QNTM-694

This PR does a few things:

  • get rid of original Name Property on NodeModel which usually returned the value of the [NodeNameAttribute] - @gregmarr has detailed notes of the output for this. Instead this attribute value is gathered from a private method on NodeModel.

  • Nickname is now the Name property.

  • PortName is renamed to Name

  • PortModel.Name and NodeModel.Name both serialize to Name - but NodeModel.Name does Not serialize into the graph block, it should only serialize when the nodeViewModel is serialized. Name exists on the NodeViewModel and grabs a value off the NodeModel

  • Fixes an issue when the workspace is serialized, if the WorkspaceModel is a CustomNode, it will serialize the CustomNodeId or functionId as the Uuid.

  • updates some recorded tests to use the new Name property instead of Nickname when setting the name.

Declarations

There will be two related PRs in other repos.

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@ramramps

FYIs

@ikeough @QilongTang @gregmarr

/// </summary>
/// <param name="id">Identifier of the custom node instance.</param>
/// <param name="name">The name represents the GUID of the custom node
/// <param name="functionId">The functionId represents the GUID of the custom node

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch

Comment thread src/DynamoCore/Graph/Nodes/NodeModel.cs Outdated
/// Sets the name of this node from the attributes on the class definining it.
/// </summary>
public void SetNickNameFromAttribute()
public void SetNamePropertyFromAttribute()

@QilongTang QilongTang Jun 12, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we align the two functions' name SetNamePropertyFromAttribute and getNameFromNodeNameAttribute? Like get(set)NameFromNodeNameAttribute..


//notes
writer.WritePropertyName("Notes");
writer.WritePropertyName("Notes");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space here

@QilongTang

Copy link
Copy Markdown
Contributor

Looks good to me overall. Just a few comments

@QilongTang
QilongTang merged commit 0858842 into DynamoDS:master Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants