-
Notifications
You must be signed in to change notification settings - Fork 401
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
[BUG] TouchBehavior cancel animation even though it is just short tap #2063
Comments
Hi, thanks for the report. To confirm the issue is that when you tap on the control the completion state change is somehow cancelling the animation before it has finished? I understand your change doesn't solve all use cases but would you be willing to open it as a PR to make it easy to see what has changed and then we can work from there to see how we might solve it? |
Hi @bijington I saw the PR template and the bug should be verified to create PR https://github.com/CommunityToolkit/Maui/blob/main/.github/PULL_REQUEST_TEMPLATE.md ? For the issue. Yes so basically when we tap, the animation will be cancelled directly and it will throw |
@bijington just created PR in here #2101 |
I am no expert in the Simulator.Screen.Recording.-.iPhone.15.-.2024-08-09.at.12.28.45.mp4Is this the expected behavior or would we expect the full animation to complete? I am wondering whether the current behavior is expected and if a developer wanted to invoke the full animation we either make that an option somehow (if it isn't already) or guide them to using the What does everyone think? |
I'm also facing issues with Touch Effect on Mac Catalyst, once I have TaskCanceledException thrown, rest of UI becomes non-interactive, Buttons, Sliders stops working. |
@bijington I think this is something that might have been broken during the pr review of the effect. It used to play the full animation even after lifting from a click (something I'd expect personally). The task cancelled exception is really just noise, but it does happen a lot especially if you are relying on this control so I probably need to go back to a commit that was working on my end and see what's changed, then pr it back in. I'm not aware of any crashes or issues with non responsiveness on mac catalyst, @osaleem303 can you provide a reproduction? |
Hi @Axemasta I've reproduced issue on following repo and also attached a screen recording on reproducing of that issue. |
FWIW I am getting an unhandled exception with the exact same stack trace shown in the original report - while resizing the window frame running on Windows. Not sure how the touch behavior is getting triggered by the resize but that's the stack trace I'm seeing in the exception. And even though the unhandled exception is "handled" the app becomes useless at that point. |
My logs are littered with these.
|
I've found the commit that introduced this issue, I'll try reverting the changes and see if they stop this issue. It looks like the animation also started messing up around this commit, the earlier commits dont throw this exception and always play the full animation (which is to be expected imo). |
I don’t know if I agree. I think it makes sense for the animation to be cancelled prematurely if the user is quick. We just don’t need the error in the logs. |
I probably worded this badly. The animations in the shipped version are what I would consider broken, there is some glitches and pop in especially of colors. I believe the reason why is that the animations are actually getting cancelled whereas before they were fire and forget. You can see in the 2nd gif there is some strange black pop in, its caused by the animation cancelling. I'll be submitting a PR reverting those changes and we can see what the maintainers think. It wasn't a feature of the Xamarin version and it would squash this issue which is annoying for many people (including myself) |
Can you provide a repro or some example xaml demoing the unresponsiveness? I am able to see the messages when resizing, but I haven't been able to get the app to go unresponive on windows using the mct sample app. If you can provide a repro I can push a fix 😊 |
@Axemasta [One week later] I "think" I remember where in the app was current when I was triggering that problem with a resize....but today I'm not seeing it happen. :-) BUT...2 days after that post I updated from 9.0.1 to 9.0.3 and so maybe that's the difference.... |
I'm also facing this issue |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
Touch behavior when set
DefaultAnimationDuration
and user just tap the element, it will just abort the animation and throwTaskCanceledException
even though the animation is not finished. I am not sure if this is expected behavior. Because from user perspective if I just tap it, it should show and finish the animation within the duration ofDefaultAnimationDuration
. Here it is in current implementation even though I increase theDefaultAnimationDuration
to be 500CleanShot.2024-07-26.at.15.49.25.mp4
And here is the stacktrace
Expected Behavior
TouchBehavior
should finish the animation inDefaultAnimationDuration
and not just directly abort the animation. It should be doing something like this.CleanShot.2024-07-26.at.15.54.48.mp4
Steps To Reproduce
Lorem Ipsum
view. It will just directly cancel the animation after we tap itLink to public reproduction project repository
https://github.com/albilaga/CommunityToolkit.Maui/tree/bugfix/wait_animation
Environment
Anything else?
For now the workaround I have as seen in this commit 033416b is I just waiting with
Task.Delay(DefaultAnimationDuration
if touch status is completed. This is still not handling if user tap the view more than once in duration ofDefaultAnimationDuration
so that's why I am not publishing the PR in here. And I am also not sure if this bug is intended or not. Help is appreciated also. Thank youThe text was updated successfully, but these errors were encountered: