Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

AP-1335 Fix animations not being disabled by SpaceKitProvider #155

Merged
merged 2 commits into from
Feb 7, 2020

Conversation

justinanastos
Copy link
Contributor

@justinanastos justinanastos commented Feb 6, 2020

Animations are still happening causing flake in our tests. It appears as though setting animation to undefined causes the default of shift-away to be used. We can use an empty string instead to disable animations.

The above approach is hacky. While it visually works; it is hacky and is tricking tippy.js to do something that's already natively supported.

Instead, we should set duration to 0 and updateDuration to 0, and then tippy.js will recognize we're not animating. This will show the same visual output as before, but this has the additional benefit of disabling animation behaviors in the codebase that tripped us up in our JSDOM tests. Now we can test that tooltips appear and then disappear. Since there's no more delays for animations, now rendering and clicking things acts closer to synchronous, allowing our tests to be more succinct and faster!

Contributes to https://apollographql.atlassian.net/browse/AP-1335

Copy link
Member

@cheapsteak cheapsteak left a comment

Choose a reason for hiding this comment

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

thanks for figuring that out 🙏

@justinanastos justinanastos changed the title AP-1335 Fix animations not being disabled by SpaceKitProvider DO NOT MERGE: AP-1335 Fix animations not being disabled by SpaceKitProvider Feb 6, 2020
@justinanastos
Copy link
Contributor Author

Going to reset reviews because I found a better way to disable animations that will make the library behave as one would expect in tests so we can test both menus/tooltips appearing and disappearing.

@justinanastos justinanastos removed the request for review from jgzuke February 6, 2020 22:12
@justinanastos justinanastos changed the title DO NOT MERGE: AP-1335 Fix animations not being disabled by SpaceKitProvider AP-1335 Fix animations not being disabled by SpaceKitProvider Feb 7, 2020
Copy link
Member

@cheapsteak cheapsteak left a comment

Choose a reason for hiding this comment

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

very nice!

@justinanastos justinanastos merged commit a438e28 into master Feb 7, 2020
@justinanastos justinanastos deleted the justin/AP-1335/menus branch February 7, 2020 15:04
@justinanastos justinanastos restored the justin/AP-1335/menus branch February 7, 2020 15:04
@justinanastos justinanastos deleted the justin/AP-1335/menus branch February 7, 2020 15:04
@apollo-bot2
Copy link
Collaborator

🚀 PR was released in v2.25.1 🚀

@apollo-bot2 apollo-bot2 added the released This issue/pull request has been released. label Feb 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants