Skip to content
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(wpf): Fix IsLeftButtonPressed status on WPF platform #16517

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lindexi
Copy link
Contributor

@lindexi lindexi commented Apr 30, 2024

GitHub Issue (If applicable): #14393

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

We can receive the pointer event with IsLeftButtonPressed is true when touch release.

What is the new behavior?

We can receive the pointer event with IsLeftButtonPressed is false when touch release.

See https://github.com/unoplatform/uno/pull/16378/files#r1575262313

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Cc @dr1rrb , and I will add more information about the barel button and the eraser status later.

Internal Issue (If applicable):

@github-actions github-actions bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Apr 30, 2024
@Youssef1313 Youssef1313 requested a review from dr1rrb April 30, 2024 10:03
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16517/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16517/index.html

Copy link
Member

@dr1rrb dr1rrb left a comment

Choose a reason for hiding this comment

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

Thanks @lindexi 👍

@jeromelaban jeromelaban enabled auto-merge May 8, 2024 20:50
@@ -111,7 +111,9 @@ public void ReleasePointerCapture()
=> _hostControl.ReleaseMouseCapture();

#region Native events
private void HostOnMouseEvent(InputEventArgs args, TypedEventHandler<object, PointerEventArgs>? @event, [CallerArgumentExpression(nameof(@event))] string eventName = "")

Copy link
Contributor

Choose a reason for hiding this comment

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

@jeromelaban, @dr1rrb should we add more tests related to these changes?

Copy link
Member

Choose a reason for hiding this comment

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

A manual test would be useful, if we don't have any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeromelaban Any update here? Or what should I do? Thank you.

Copy link
Member

Choose a reason for hiding this comment

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

@lindexi yes, in general, if testing is difficult because if requires integration with the outer platform, we add a "manual test" page which explains what to do, and what the outcome is. Something like this:

[Sample("Microsoft.UI.Xaml.Input", Name = "XamlUICommand", Description = "You should see Cut button without icon, Copy button with icon, Home button without icon and Forward we go! with icon.", IsManualTest = true)]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeromelaban Thank you. I've attempted to add a test file, but I'm unsure if I've done it correctly. If I have, how should I write the code for the test file to make the test engineers happier? Would it suffice to just output the parameters to the console?

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @lindexi, yes, this is the right way to do it. You can add a listview or a textbox that will concatenate the events so that QA can validate that the events are raised properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeromelaban Thank you very much.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeromelaban I updated my test files. Could you review my code? Thank you.

auto-merge was automatically disabled May 23, 2024 12:18

Head branch was pushed to by a user without write access

@github-actions github-actions bot added the area/automation Categorizes an issue or PR as relevant to project automation label May 23, 2024
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16517/index.html

@lindexi lindexi force-pushed the t/lindexi/WpfCorePointerInputSource branch from 63212b3 to 4591023 Compare May 24, 2024 00:59
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16517/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation Categorizes an issue or PR as relevant to project automation area/skia ✏️ Categorizes an issue or PR as relevant to Skia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants