Skip to content

DYN-9663 fix missing parameter DataType in NodeDocumentationMarkdownGenerator#17141

Merged
jasonstratton merged 5 commits into
DynamoDS:masterfrom
johnpierson:DYN-9663-fix-missing-parameter-datatype
Jun 12, 2026
Merged

DYN-9663 fix missing parameter DataType in NodeDocumentationMarkdownGenerator#17141
jasonstratton merged 5 commits into
DynamoDS:masterfrom
johnpierson:DYN-9663-fix-missing-parameter-datatype

Conversation

@johnpierson

@johnpierson johnpierson commented Jun 8, 2026

Copy link
Copy Markdown
Member

Purpose

Fixes missing DataType in the node documentation browser for input and output ports. Tracked in DYN-9663.

Three root causes addressed:

  1. NodeDocumentationMarkdownGenerator dropped parameter typesBuildParameters in AssemblyHandler.cs constructed TypedParameter objects with only the name, ignoring arg.ArgumentType. One-line fix to pass the ProtoCore.Type through.

  2. Doc browser parsed type from a fragile multi-line stringGetTypeFromDescription tried to extract type from a tooltip description string, which only worked when a parameter had a non-empty XML doc Summary. Added InputTypes/OutputTypes collections to OpenNodeAnnotationEventArgs, populated directly from PortModel.GetInputPortType()/GetOutPortType(), which already handle ZeroTouch, DesignScript, custom node, and [InPortTypes]/[OutPortTypes] attribute paths correctly.

  3. Output DataType cell was never emitted — Output table had 3 column headers (Name, Description, DataType) but only 2 <td> cells per row. Added the missing cell.

  4. NodeModel nodes without [InPortTypes] always returned null — Added a fallback in GetInputPortType() to infer the type string from the port's DefaultValue AST node (IntNodeint, DoubleNodedouble, BooleanNodebool, StringNodestring). NodeModel nodes without typed defaults or [InPortTypes] attributes will still show empty — those require separate annotation work.

Declarations

Check these if you believe they are true

Release Notes

Fix missing DataType column in the node documentation browser. Input and output port types now display correctly for ZeroTouch, DesignScript, and NodeModel nodes. NodeModel nodes with typed default values (e.g. Range, Sequence) will show inferred types even without explicit [InPortTypes] attributes.

Reviewers

(FILL ME IN)

FYIs

(FILL ME IN, Optional)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9663

@johnpierson johnpierson force-pushed the DYN-9663-fix-missing-parameter-datatype branch from 4dd58cd to e706161 Compare June 8, 2026 18:16
@johnpierson

Copy link
Copy Markdown
Member Author

Before/After
image
image

@RobertGlobant20 RobertGlobant20 left a comment

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.

LGTM with minor comments

/// <summary>
/// Collection of the nodes input port types.
/// </summary>
public IEnumerable<string> InputTypes { get; private set; }

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.

does it need to be added to the publid API?

Comment thread src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelEventArgs.cs

@jasonstratton jasonstratton left a comment

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.

Require adding methods to PublicAPI.Unshipped.txt
Adding a test for GetInputPoertType() default values is just suggested.

/// <summary>
/// Collection of the nodes input port types.
/// </summary>
public IEnumerable<string> InputTypes { get; private set; }

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.

Yes. I think so. both InputTypes.get and OutputTypes.get are new public API

}

// Fallback: infer from the port's default value node type.
return DefaultValue switch

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 are tests for GetInputPortType(). Please confirm that they cover the defaults for those cases when the NodeModel omits the InPortType

johnpierson and others added 5 commits June 12, 2026 09:02
…enerator

BuildParameters in AssemblyHandler.cs extracted only the parameter name
from each VarDeclNode, ignoring arg.ArgumentType. Pass the ProtoCore.Type
to TypedParameter so TypeName and TypeRank are populated in the generated
node help data.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Output table had 3 column headers (Name, Description, DataType) but only
emitted 2 <td> cells per row, leaving the DataType column always empty.
Add the missing DataType cell using GetTypeFromDescription, consistent
with the input port table rendering.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
GetTypeFromDescription parsed type from a multi-line tooltip string, which
only worked when a parameter had a non-empty XML doc Summary. Nodes without
Summary (common) or NodeModel nodes always showed empty type columns.

Add InputTypes/OutputTypes to OpenNodeAnnotationEventArgs, populated via
PortModel.GetInputPortType() and GetOutPortType() which correctly handle
ZeroTouch, DesignScript, custom node, and NodeModel ([InPortTypes] attr)
paths. Remove the now-unused GetTypeFromDescription helper.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…tribute

NodeModel nodes without [InPortTypes] always returned null from
GetInputPortType(), leaving the DataType column empty in the doc browser.
As a fallback after the attribute check, infer the type string from the
port's DefaultValue AST node: IntNode->int, DoubleNode->double,
BooleanNode->bool, StringNode->string.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add the new OpenNodeAnnotationEventArgs input and output type properties to the WPF public API list. Cover the NodeModel input-port type fallback path for ports that omit InPortTypes but provide default value AST nodes.
@johnpierson johnpierson force-pushed the DYN-9663-fix-missing-parameter-datatype branch from b3fcfa9 to 1afece9 Compare June 12, 2026 15:02

@jasonstratton jasonstratton left a comment

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.

Beat me to making the PublicAPI change. Thank you. ... Approved & will merge

@jasonstratton jasonstratton merged commit d1661a7 into DynamoDS:master Jun 12, 2026
24 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants