Skip to content

Conversation

@zeusongit
Copy link
Contributor

Purpose

Based on the Reope PR: #15825
See original PR's description for a detailed summary.

TLDR; Removing some code from MouseMove event which used to trigger when mouse hover over the input port, at which point the cursor should have been changed to CursorSet.ArcSelect. But this have not been working since Notes were introduced (May 2023). IMO it is better to go away with it and gain some performance instead.

I tried to quantify the gain but it is hard, I tried to capture the amount of processing time spent inside the code while simply hovering over a huge graph, for a difference in CPU usage you can look at the screenshots on the original PR.
(I did see minor gains when selecting nodes in the workspace after this fix)

DynamoSandbox_OfomJLQ10S

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

Remove unused code for Port cursor

Reviewers

@zeusongit zeusongit requested review from a team and Copilot June 18, 2025 19:47
@github-actions github-actions bot changed the title Remove unused code for Port cursor DYN-8307: Remove unused code for Port cursor Jun 18, 2025
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-8307

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 removes legacy port-hover cursor logic to streamline mouse movement handling and improve performance.

  • Deletes the idle-state hit-test block that set the cursor when hovering over input ports.
  • Removes associated helper methods (PortFromHitTestResult, ElementUnderMouseCursor, DirectHitTestCallback) and related cursor-setting code.
Comments suppressed due to low confidence (2)

src/DynamoCoreWpf/Views/Core/WorkspaceView.xaml.cs:873

  • [nitpick] With the port-hover cursor logic removed, it would be helpful to add tests verifying that the cursor state remains correct during various mouse movements and workspace states to prevent regressions.
            // If selection is going to be dragged and ctrl is pressed.

PortViewModel pvm = PortFromHitTestResult(dependencyObject);

if (null != pvm && (pvm.PortType == PortType.Input))
this.Cursor = CursorLibrary.GetCursor(CursorSet.ArcSelect);
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this cursor look like? Is there a png (image file) resource for the cursor that also needs to be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how it looks like:

Screenshot 2025-06-18 at 4 10 57 PM

I tried going back to 2.17, 2.15 and still could not see any change in the cursor though, atleast not on hover.

DynamoSandbox_DRAuxvGAlw

@zeusongit zeusongit merged commit 93f5ade into DynamoDS:master Jun 18, 2025
39 of 47 checks passed
@zeusongit zeusongit deleted the DYN-8307 branch June 18, 2025 21:21
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