Skip to content

Conversation

@johnpierson
Copy link
Member

@johnpierson johnpierson commented May 28, 2025

Purpose

This PR introduces a new transient state for connectors to support preview functionality during node auto-complete and clustering operations.

  • Updated NodeAutoCompleteBarViewModel to replace "IsConnecting" with the new "IsTransient" state.
  • Extended ConnectorViewModel with an IsTransient property and updated the PreviewState logic.
  • Added corresponding UI converter properties and updated ConnectorModel to support the transient state.
    image
File Description
src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs Replaced connection state logic with transient state handling in node auto-complete and clustering.
src/DynamoCoreWpf/ViewModels/Core/ConnectorViewModel.cs Added IsTransient property and updated PreviewState logic to include a Transient state.
src/DynamoCoreWpf/UI/Converters.cs Introduced TransientBrush and Transient color mappings to support the new state.
src/DynamoCore/Graph/Connectors/ConnectorModel.cs Added IsTransient property with change notification to track the transient state.

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 *.resx files
  • 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

  • added new transient state to connectors for previewing while iterating through node autocomplete results.

Reviewers

@DynamoDS/synapse

FYIs

@Amoursol @achintyabhat

@johnpierson johnpierson requested a review from Copilot May 28, 2025 17:15
Copy link

@github-actions github-actions bot left a comment

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-8947

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new transient state for connectors to support preview functionality during node auto-complete and clustering operations.

  • Updated NodeAutoCompleteBarViewModel to replace "IsConnecting" with the new "IsTransient" state.
  • Extended ConnectorViewModel with an IsTransient property and updated the PreviewState logic.
  • Added corresponding UI converter properties and updated ConnectorModel to support the transient state.

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

File Description
src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs Replaced connection state logic with transient state handling in node auto-complete and clustering.
src/DynamoCoreWpf/ViewModels/Core/ConnectorViewModel.cs Added IsTransient property and updated PreviewState logic to include a Transient state.
src/DynamoCoreWpf/UI/Converters.cs Introduced TransientBrush and Transient color mappings to support the new state.
src/DynamoCore/Graph/Connectors/ConnectorModel.cs Added IsTransient property with change notification to track the transient state.
Files not reviewed (2)
  • src/DynamoCoreWpf/UI/Themes/Modern/Connectors.xaml: Language not supported
  • src/DynamoCoreWpf/UI/Themes/Modern/DynamoConverters.xaml: Language not supported
Comments suppressed due to low confidence (1)

src/DynamoCoreWpf/ViewModels/Core/ConnectorViewModel.cs:533

  • [nitpick] Consider adding parentheses to explicitly group the AND condition: if (model.Start.Owner.IsSelected || model.End.Owner.IsSelected || (AnyPinSelected && !IsTransient)). This enhances clarity on how the condition is evaluated.
if (model.Start.Owner.IsSelected || model.End.Owner.IsSelected || AnyPinSelected && !IsTransient)

@johnpierson johnpierson requested a review from Copilot June 2, 2025 17:45

This comment was marked as outdated.

@johnpierson johnpierson added the ai/ml 🧠 synapse team related PRs label Jun 4, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@johnpierson johnpierson requested a review from Copilot June 5, 2025 15:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new transient state to connectors to support preview functionality during node auto-complete and clustering operations. Key changes include:

  • Replacing the use of IsConnecting with a new IsTransient state in NodeAutoCompleteBarViewModel.
  • Extending ConnectorViewModel and related converters to handle a Transient preview state.
  • Updating ConnectorModel and public API documentation to support the transient functionality.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs Updated state logic to use IsTransient and ensure transient connectors are reset appropriately.
src/DynamoCoreWpf/ViewModels/Core/ConnectorViewModel.cs Added new IsTransient property and updated PreviewState enum and getter to include Transient.
src/DynamoCoreWpf/UI/Themes/Modern/DynamoConverters.xaml Added Transient color definitions for the new state.
src/DynamoCoreWpf/UI/Converters.cs Introduced TransientBrush and updated conversion logic to support Transient state.
src/DynamoCoreWpf/PublicAPI.Unshipped.txt Documented the new Transient properties in the public API.
src/DynamoCore/Graph/Connectors/ConnectorModel.cs Added IsTransient property with change notifications.
src/DynamoCoreWpf/UI/Themes/Modern/Connectors.xaml Minor resource dictionary update.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@johnpierson
Copy link
Member Author

Removed the dashed state from the transient connectors as I don't think it is needed. Purple connectors seem like enough.

@BogdanZavu
Copy link
Contributor

Cool! LGTM!

@johnpierson
Copy link
Member Author

Ran failing test locally and it passed.
image

@johnpierson johnpierson merged commit 951cefe into DynamoDS:master Jun 6, 2025
25 of 27 checks passed
@johnpierson johnpierson deleted the dyn8947_transientConnectors branch June 6, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/ml 🧠 synapse team related PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants