Dynamo
Dynamo copied to clipboard
[DYN-8997] CBN output port to show the name of the variable
Purpose
This PR aims to address DYN-8997.
Changes:
- CBN outports now display the left-hand variable/identifier of each code statement (previously just “>”)
- For single-statement code blocks:
- The outport is rendered in standard size (34px) and always positioned at the very top, aligned with the inport, regardless of any comments or empty lines above the statement
- The outport tooltip always displays the left side of the statement
- Adding or removing comments or empty lines above does not affect the outport’s vertical position
- For multiple-statement code blocks:
- Outports are displayed in condensed size and each shows the left side of its statement.
- Each outport is vertically aligned with its respective statement line.
- Tooltips also reflect the left side of each statement.
- Fixed an issue where inports and outports sharing the same name could cause connector restoration to fail after code edits. Logic now ensures unique identification for each port and prevents connector loss or duplication.
- The above behaviors are also applied to proxy ports in collapsed groups.
Declarations
Check these if you believe they are true
- [ ] Is documented according to the standards
- [ ] The level of testing this PR includes is appropriate
- [ ] User facing strings, if any, are extracted into
*.resxfiles - [ ] Snapshot of UI changes, if any.
- [ ] Changes to the API follow Semantic Versioning and are documented in the API Changes document.
- [ ] This PR modifies some build requirements and the readme is updated
- [ ] This PR contains no files larger than 50 MB
- [ ] This PR introduces new feature code involve network connecting and is tested with no-network mode.
Release Notes
The output port of code block node now displays the left side of the statement.
Reviewers
@DynamoDS/eidos @jasonstratton.
FYIs
@dnenov @achintyabhat
This looks weird and is a deviation from current output port alignment:
The output port should always be placed against the identifier.
@ivaylo-matov Can you take a look at the failing tests:
Test Result (4 failures / +4) Dynamo.Tests.CodeBlockNodeTests.OutPort_WithCommentNonAssignment_Alignment DynamoCoreWpfTests.AnnotationViewModelTests.CollapsingGroupWillCreateInportAndOuportCollections Dynamo.Tests.CodeBlockNodeRenamingTests.CodeBlockNodeModelOutputPortLabels DynamoCoreWpfTests.SerializationTests.JSONisSameBeforeAndAfterSaveWithDummyNodes
And just to validate the current state can you share an updated gif?
@zeusongit , the cbn related test should pass now. CollapsingGroupWillCreateInportAndOuportCollections was addressed earlier in #16302
passed: https://master-5.jenkins.autodesk.com/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/18116/