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

Animation runs on first render, but it should not as nothing changed #6676

Open
timunie opened this issue Oct 4, 2021 · 2 comments
Open

Comments

@timunie
Copy link
Contributor

timunie commented Oct 4, 2021

Describe the bug
In Aura.UI there is a FloatingButtonBar which can be opened or closed via IsExpanded="true". if the page is shown you can notice that the animation is running one time to open and then close again. As IsExpanded did not change I think the animation should not run. Am I wrong here?

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/PieroCastillo/Aura.UI and download the source
  2. Run the demo App
  3. Switch to the FloatingButtonBar Example and back.
  4. Notice that every time the animation runs.

Expected behavior
The animation only runs if the actual value changed, which triggers the animation

Screenshots
135614654-3128d9df-920c-4d54-903c-73e5573b21a3

Desktop (please complete the following information):

  • OS: Windows
  • Version 0.10.7

Additional context
original issue in Aura.UI: PieroCastillo/Aura.UI#23
feedback from the author in gitter:

mmm I saw the error maybe in the Avalonia Styling system, because the error is executed when "OnAttachedToLogicalTree" is executed

/cc @PieroCastillo

@timunie
Copy link
Contributor Author

timunie commented Feb 8, 2022

I put together a minimal sample which shows the issue also in Avalonia it self: https://github.com/timunie/Tims.Avalonia.Samples/tree/AnimationIssue/src/AnimationFiredTooOftenIssue

As IMO animations may be expensive, this can also be a performance issue.

Happy coding
Tim

@timunie
Copy link
Contributor Author

timunie commented Jul 10, 2023

Updated the sample to 11.0. Sadly, the issue is not magaically gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants