Skip to content

Conversation

@johnpierson
Copy link
Member

@johnpierson johnpierson commented Jun 11, 2025

Purpose

Adds a toast notification when a user double-clicks a port to inform them to use the sparkle icon for Node Autocomplete.

Detects double-click in PortViewModel.Connect, shows a real-time info toast, and automatically closes it after 4 seconds.
Enables passing mouse event args into the connect command in both OutPorts.xaml.cs and InPorts.xaml.cs.
Introduces the resource string ToastFileNodeAutoCompleteDoubleClick and cleans up duplicate entries in .resx files.

20250611-doubleClick

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

N/A

Reviewers

@DynamoDS/synapse

FYIs

@Jingyi-Wen

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

@johnpierson johnpierson force-pushed the dyn8996_toastForDoubleClick branch from 8386640 to 82a3408 Compare June 11, 2025 16:23
@johnpierson johnpierson marked this pull request as ready for review June 11, 2025 16:24
@johnpierson johnpierson requested a review from Copilot June 11, 2025 16:24
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

Adds a toast notification when a user double-clicks a port to inform them to use the sparkle icon for Node Autocomplete.

  • Detects double-click in PortViewModel.Connect, shows a real-time info toast, and automatically closes it after 4 seconds.
  • Enables passing mouse event args into the connect command in both OutPorts.xaml.cs and InPorts.xaml.cs.
  • Introduces the resource string ToastFileNodeAutoCompleteDoubleClick and cleans up duplicate entries in .resx files.

Reviewed Changes

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

Show a summary per file
File Description
PortViewModel.cs Added double-click handling, toast display, and timer to close it.
OutPorts.xaml.cs & InPorts.xaml.cs Set PassEventArgsToCommand = true for left-button triggers.
PortCommands.cs Added (but did not use) nodeAutoCompleteToast field.
Resources.resx & Resources.en-US.resx Added toast message resource and removed duplicates.
Dynamo.All.sln.DotSettings Tweaked ReSharper naming rules configuration.
Files not reviewed (1)
  • src/DynamoCore/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)

src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs:536

  • [nitpick] Currently HandlePortClicked is always invoked before checking for a double click. If the goal is to only show the toast on double click (and not initiate a connection), consider returning early when evArgs.ClickCount >= 2 to prevent unintended connection logic.
workspaceViewModel.HandlePortClicked(this);

src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs:552

  • The new double-click toast behavior should have unit or integration tests to verify the toast window appears and closes after the expected interval.
private void HandleDoubleClick()

Copy link
Contributor

@chubakueno chubakueno left a comment

Choose a reason for hiding this comment

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

LGTM!

@BogdanZavu
Copy link
Contributor

If I'm not mistaken in the past we used the information bubble of the node for these sort of things. And the bubble stays open until it is closed without timing. General notification system is more for the the general stuff.
LGTM!

@johnpierson johnpierson merged commit 8f345c6 into DynamoDS:master Jun 12, 2025
26 of 27 checks passed
@johnpierson johnpierson deleted the dyn8996_toastForDoubleClick branch June 12, 2025 15:31
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