DYN-8338 Enable a new Marker on Input and Output Port for Launching Node AutoComplete#15947
Conversation
|
Related to DYN-8338 and DYN-8398 |
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8338
|
Oh cool. Let me get that integrated.
…On Wed, Mar 19, 2025 at 4:20 PM Bogdan Zavu ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/DynamoCoreWpf/UI/Themes/Modern/OutPorts.xaml
<#15947 (comment)>:
>
- <!-- Bind NodeAutoComplete to double left click -->
- <Grid.InputBindings>
- <MouseBinding Command="{Binding Path=NodeAutoCompleteCommand}" MouseAction="LeftDoubleClick" />
- </Grid.InputBindings>
+ <!-- Grid that allows for port interaction -->
+ <Grid
That is a separate control , not connected to the node view.
But I think I have something at least it seems to work on my end as
expected.
So the trick is to process the event in our sparkling bubble and prevent
the mouse event from propagating to the parent control and launch the other
command.
So I have this :
<Border x:Name="NodeAutoCompleteMarker"
Grid.Column="2"
Margin="0,0,-20,0"
Cursor="Hand"
CornerRadius="10"
Height="18px"
Width="18px"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Background="#D5BCF7"
IsHitTestVisible="True"
SnapsToDevicePixels="True"
Visibility="Visible">
<TextBlock
TextAlignment="Center"
FontSize="11"
VerticalAlignment="Center"
HorizontalAlignment="Center"
>✨</TextBlock>
<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="PreviewMouseDown">
<interactivity:InvokeCommandAction Command="{Binding NodeAutoCompleteCommand}" PassEventArgsToCommand="True"/>
</interactivity:EventTrigger>
</interactivity:Interaction.Triggers>
</Border>
And now in NodeAutoCompleteCommand we receive the mouse arguments and we
can prevent the bubbling.
private bool CanAutoComplete(object parameter)
{
MouseButtonEventArgs evArgs = parameter as MouseButtonEventArgs;
evArgs.Handled = true;
I think if we integrate the above with the rest of your changes we should
be good.
—
Reply to this email directly, view it on GitHub
<#15947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADYD5VCHJAKEFJAFK225PO32VHURNAVCNFSM6AAAAABZKWIN5SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMBQGQYTCMRSGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
|
||
| private void TryShowAutoCompleteMarker() | ||
| { | ||
| //show the node autocomplete marker if available, skip codeblocks and watch nodes |
|
In NodeAutoCompleteSearchControl.xaml |
|
Let's add this to the inports as well. |
| <!-- Bind NodeAutoComplete to double left click --> | ||
| <Grid.InputBindings> | ||
| <MouseBinding Command="{Binding Path=NodeAutoCompleteCommand}" MouseAction="LeftDoubleClick" /> | ||
| </Grid.InputBindings> |
There was a problem hiding this comment.
@BogdanZavu @johnpierson Should we hold on touching the behavior for regular autocomplete yet? Only apply to cluster autocomplete for now? We can use a dedicated command for cluster autocomplete if needed
There was a problem hiding this comment.
Not really, I think the change is solid. So let's go ahead with the general improvement. We can ask for some help with testing from @jnealb once it's in.
|
Buildtime errors: |
|
|
| <interactivity:InvokeCommandAction Command="{Binding NodeAutoCompleteCommand}" PassEventArgsToCommand="True"/> | ||
| </interactivity:EventTrigger> | ||
| </interactivity:Interaction.Triggers> | ||
| </Border> |
There was a problem hiding this comment.
@BogdanZavu @johnpierson Would you remind me this would not make this part of every port at the view initialization right? Just thinking about performance impact
There was a problem hiding this comment.
So we only added one border - while collapsed this will not participate in the rendering , sizing recalculation etc so performance should remain the same. Same thing for the highlight.
QilongTang
left a comment
There was a problem hiding this comment.
Other than two comments, LGTM
|
Cool! LGTM! Let's add those color defines and I think we're good! *✧ |
- Add marker to output port - Hook marker to node autocomplete command (single click) - Enable visibility when no connection exists (Apologies for this all being one commit as I had to refork, rebranch and all sorts of mess because of a merge conflict with a previous PR)
Tie Node AutoComplete Marker to be visible only when it is enabled in preferences
… is frozen/transient
Move NodeAutoCompleteMarkerVisible to internal
Disable node autocomplete marker on Python nodes.
ef27dc1 to
bd4b02f
Compare
| private const double autocompletePopupSpacing = 2.5; | ||
| private const double proxyPortContextMenuOffset = 20; | ||
| internal bool inputPortDisconnectedByConnectCommand = false; | ||
| private bool nodeAutoCompleteMarkerVisible; |
There was a problem hiding this comment.
@johnpierson guessing the failure reason - let's initialize this with false. I suspect during tests is true and the tests record the control no
|
Sorry @johnpierson I introduced merge conflicts.. Addressed for you! |
…hnpierson/Dynamo into DYN8338_AddAutoCompleteMarker
Hide the autocomplete marker while the node is moving
|
I tested the 1 failure now locally and it seems to be passing. This should be good to go @QilongTang |
|
There is 1 failed test but I think it's not related to this change and it passes for me locally. |
|
@BogdanZavu - Last time I merged a PR, I did it early by accident so if you guys want to do it. :) |
…nching Node AutoComplete (DynamoDS#15947)" This reverts commit 68ae401.



Purpose
This PR adds a new marker that appears on output ports during hover for node autocomplete. If approved, this would replace the double click paradigm and decouple autocomplete from wire connection interference.
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Reviewers
@QilongTang @BogdanZavu @chubakueno @Jingyi-Wen
FYIs
@Amoursol @mjkkirschner