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

DYN-5807 : improve auto complete auto layout #15864

Merged
merged 4 commits into from
Feb 28, 2025

Conversation

BogdanZavu
Copy link
Contributor

@BogdanZavu BogdanZavu commented Feb 27, 2025

Purpose

Improve auto complete auto layout in such way that fewer nodes overlap as a result of placing a new node suggested by auto complete. Also we do not want to launch auto complete if the port is an input port which already has a connection.
We will create a small ripple effect only in the area of the affected node that includes the node itself , the connected nodes on the affected side and some other nodes that are in this area.

Old Behaviour :
old

New Behaviour :
new

Declarations

Check these if you believe they are true

  • The codebase 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.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

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

@QilongTang QilongTang added this to the 3.5 milestone Feb 27, 2025
}
}

Rect2D connectedNodesBBBox = ComputeNodesBBox(connectedNodesToConsider);
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use a better name here? like
Rect2D NodesBoundingBox =GetNodesBoundingBox(connectedNodesToConsider);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I recognize a copilot suggestion here! :))

Copy link
Contributor

Choose a reason for hiding this comment

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

Bingo! ;)

return parameter as PortModel != null ? portModel.CanAutoCompleteInput() : true;
}

private Rect2D GetNodesBoundingBox(IEnumerable<NodeModel> nodes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking great! Thank you for splitting these up. Would you add some comments to these new functions?

@QilongTang
Copy link
Contributor

Would you attach a gif for the behavior change? Appreciate it

@BogdanZavu BogdanZavu merged commit cf4a00e into DynamoDS:master Feb 28, 2025
23 checks passed
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.

4 participants