Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate connectors using ctrl + left click on input ports with testing #9567

Merged
merged 9 commits into from
Mar 15, 2019

Conversation

alfarok
Copy link
Contributor

@alfarok alfarok commented Mar 13, 2019

Purpose

ctrl_click

This PR pulls in the work originally completed by @yeexinc in #7850 and adds several tests that leverage recorded commands. The original work was already reviewed and all active comments were addressed. The recorded tests verify the proper connections are made when using ctrl + left click in order to duplicate a connector that is already currently connected to another nodes input port. Additionally undo/redo was verified using recorded commands but copy/paste was manually as verified as they are not currently supported as recorded commands.

Declarations

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

@mjkkirschner @aparajit-pratap @QilongTang

FYIs

@Amoursol

@@ -315,6 +319,35 @@ void BeginConnection(Guid nodeId, int portIndex, PortType portType)
}
}

void BeginDuplicateConnection(Guid nodeId, int portIndex, PortType portType)
Copy link
Member

Choose a reason for hiding this comment

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

please mark this with an access modifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

interestingly almost none of the methods DynamoModelCommands.cs have access modifiers, I guess because they are all expected to be internal?

Copy link
Contributor

Choose a reason for hiding this comment

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

internal seems reasonable

Copy link
Member

@mjkkirschner mjkkirschner Mar 13, 2019

Choose a reason for hiding this comment

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

I think if not specified the default is actually private.

Copy link
Contributor

Choose a reason for hiding this comment

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

/// </summary>
EndAndStartCtrlConnection,
BeginDuplicateConnection,
Copy link
Member

Choose a reason for hiding this comment

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

oye... public breaking change. can you keep the old enum, obsolete it, and add the new ones at the end without changing the order?

/// followed by ctrl + clicking to copy this connection to 2 additional nodes.
/// The final assertion will only be true if all connections were successfully established.
/// </summary>
[Test, RequiresSTA]
Copy link
Member

Choose a reason for hiding this comment

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

just curious, what happens if you remove the requiresSTA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doesn't seem to matter but is used in all the previous implementations, I can remove from the tests I added

@mjkkirschner
Copy link
Member

@alfarok

  • there is a public API change here - please address that.
  • please add access modifiers - and use var where possible. (makes refactoring easier)
  • can we also add unit tests that run without the UI?

@alfarok
Copy link
Contributor Author

alfarok commented Mar 15, 2019

@mjkkirschner @QilongTang This should be ready for a final look whenever you guys get a free moment

@@ -52,19 +52,19 @@ protected virtual void OpenFileImpl(OpenFileCommand command)
//ClipBoard.Clear();
}

void RunCancelImpl(RunCancelCommand command)
internal void RunCancelImpl(RunCancelCommand command)
Copy link
Member

Choose a reason for hiding this comment

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

@alfarok - did you checkout the link @QilongTang sent - I interpret this to mean these should have been private by default?

@mjkkirschner
Copy link
Member

@alfarok looks good except for the access modifier - if it was private before (by default) lets not change it unless theres a reason to.

@QilongTang
Copy link
Contributor

Nicely wrapped up, LGTM

@QilongTang QilongTang added the LGTM Looks good to me label Mar 15, 2019
@alfarok alfarok merged commit 0f4be7d into DynamoDS:master Mar 15, 2019
alfarok added a commit to alfarok/Dynamo that referenced this pull request Mar 15, 2019
alfarok added a commit that referenced this pull request Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM Looks good to me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants