[DYN-8338] Move Auto-Complete Marker Triggering to ViewModel Instead of Codebehind#15969
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8338
| } | ||
| else | ||
| { | ||
| Dispatcher.DelayInvoke(autoCompleteMarkerDelay, TryHideAutoCompleteMaker); |
There was a problem hiding this comment.
Do you think the delay would be something we can define on XML layer? @johnpierson @BogdanZavu Just curious
There was a problem hiding this comment.
I am not too sure but can research. Would be keen to your thoughts @BogdanZavu
There was a problem hiding this comment.
In the xaml perhaps we could have some animation that comes with a delay but I'm a little worried about introducing too much complexity and issues related to animation that we might not see right away.
<EventTrigger RoutedEvent="MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="InfoPanel"
Storyboard.TargetProperty="Opacity"
To="0"
BeginTime="0:0:1" <!-- delay -->
Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
Or maybe we can just improve what we have a little bit and that should be enough without using a delay ?!
We could have the marker ON based on focus or on focus and mouse enter.
So if the node if selected/blue - we don't hide the marker on mouse leave - we will hide it on lost focus event.
And we continue to hide it on mouse leave if the control does not have focus.
There was a problem hiding this comment.
I was worried that if multiple nodes have focus it will try to show the markers for all of those nodes, but maybe that is ok?
There was a problem hiding this comment.
I really like the animation, because it just feels so clean. But if that could be an issue, that does worry me
There was a problem hiding this comment.
Yeah, imo I think it's ok/expected to show the marker for what's in the selection. I think we're inline with other controls that appear on selection.
There was a problem hiding this comment.
I think that makes sense to me. So effectively tie it to the blue selection border almost?
There was a problem hiding this comment.
I think we should tie it to the focus event if possible. The blue border control behavior might change in the future.
QilongTang
left a comment
There was a problem hiding this comment.
LGTM but I am curious if there can be a cleaner way per my comment
remove double click interaction since marker exists
Yes, same LGTM! |
|
Cool. Let me look into that
…On Mon, Mar 24, 2025 at 12:56 PM Bogdan Zavu ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/DynamoCoreWpf/Views/Core/NodeView.xaml.cs
<#15969 (comment)>:
> @@ -601,8 +604,16 @@ private void OnNodeViewMouseLeave(object sender, MouseEventArgs e)
ViewModel.ZIndex = oldZIndex;
//hide the node autocomplete marker if mouse leaves the node
- TryHideAutoCompleteMaker();
-
+ if (IsAutoCompleteMarkerDisabled()) return;
+ if (Mouse.Captured is DragCanvas)
+ {
+ Dispatcher.BeginInvoke(new Action(TryHideAutoCompleteMaker), DispatcherPriority.Loaded);
+ }
+ else
+ {
+ Dispatcher.DelayInvoke(autoCompleteMarkerDelay, TryHideAutoCompleteMaker);
I think we should tie it to the focus event if possible. The blue border
control behavior might change in the future.
—
Reply to this email directly, view it on GitHub
<#15969 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADYD5VAPWIB4VASLXETWQE32WBIPNAVCNFSM6AAAAABZU2GCMOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDOMJRGQYDQOJZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This enables the Marker to only show while the node is selected.
|
Alrighty @BogdanZavu and @QilongTang - I made the changes to allow it to work with selection instead of hover or mouse events. It seems to be working real nice on my testing. So if you could re-review. it working while selected actually mirrors more how I would want it to work as a user. (Eg. the connections on Miro board notes) |
|
Waiting for checks to finish before merging |
|
Once we get this all sorted we’re going to need to see about getting this in the RC. https://github.com/DynamoDS/Dynamo/tree/RC3.5.0_master |
yeah, cherry-pick shouldn't be a problem considering this is an improvement instead of new request |
Purpose
This PR builds upon a previous PR (#15947).
The Node AutoComplete marker now shows on ports with no wires when the node is selected.
Additionally, I changed the PreviewMouseDown to PreviewMouseLeftButtonDown because middle click was firing off the DNA command. 🙈
Related to DYN-8338
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Reviewers
@QilongTang @BogdanZavu @chubakueno @Jingyi-Wen
FYIs
@achintyabhat @Amoursol