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

Usage of setTimeout for enableAnimations may be problematic #114

Open
Ldoppea opened this issue Jun 9, 2021 · 0 comments
Open

Usage of setTimeout for enableAnimations may be problematic #114

Ldoppea opened this issue Jun 9, 2021 · 0 comments

Comments

@Ldoppea
Copy link
Member

Ldoppea commented Jun 9, 2021

Some parts of the code are using setTimeout with arbitrary delay values that may not work as expected on different computers (as they are dependant on execution speed).

One example is the set of this.enableAnimations on groupings.component.ts

setTimeout(() => {
    // Enable panels animations only after a delay so that only user actions triger an animation.
    // when component is initied, if a panel is displayed, we don't want the apparition of the panel
    // to be animated.
    this.enableAnimations = true;
}, 300);

This may be handled by this.activatePanel that may trigger animation or not based on where it is called. It should trigger animation when called from everywhere except when called from this.route.queryParams.subscribe (this assumption should be verified by looking the code more in details).

More details can be found there : #113 (comment)

@Ldoppea Ldoppea changed the title Usage of setTimeout may be problematic Usage of setTimeout for enableAnimations may be problematic Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant