-
Notifications
You must be signed in to change notification settings - Fork 635
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
Fix preview hiding #10889
Fix preview hiding #10889
Conversation
/// </summary> | ||
/// <param name="e">A mouse event</param> | ||
/// <returns>Whether the mouse is over the preview or not</returns> | ||
private bool IsMouseInsidePreview(MouseEventArgs e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this method different in functionality from the method with the similar name: IsMouseInsideNodeOrPreview
? Does the latter method address the second point above: HitTest on NodeView => Anomalous region that skips right part of preview if larger than node
, and is therefore an insufficient test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right @aparajit-pratap . I know it's kinda strange for a method summary, but why it was needed was hard to explain otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know why the anomalous
region exists? 😉 💀
Nice fix to have. This was quite frustrating. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, are you still thinking of creating a test that raises leave events manually?
@mjkkirschner I haven't found a way to do that which would allow me to specify a position. Will search a little more tomorrow morning. |
Merging as we are doing a UI automation test for this |
Purpose
Fixes a bug which would make the preview hide even when the mouse was
moved over a visible part of it. This happened only when the preview
area was wider than the node.
The cause of the bug I would argue is some very strange behavior of
HitTest. When run on the NodeView, this test would not consider the
right part of the preview, like if the box was as wide as the node but
displaced to the left.
Likewise, running a HitTest on the PreviewControl itself provided
inconsistent results. Initially this would work as expected, but after
the preview was expanded and recondensed, the box would remain forever
bloated as if still expanded. This resulted in inconsistencies with the
leave event, which used the real margins of the control.
The problem was fixed by checking explicitly that the preview visible
area is abandoned before hiding the preview.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@QilongTang @mjkkirschner
FYIs
@DynamoDS/dynamo