question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Flag to instantly finish animations

See original GitHub issue

Is your feature request related to a problem? Please describe.

Hi all. We over at @getsentry use framer-motion (it’s amazing!). We also do visual regression testing on our PRs, which means we generate screenshots from selenium based acceptance tests, then visually compare the screenshots against the screenshots generated from master.

For the screenshot comparisons, we have to make sure all animations are disabled. For framer motion We’ve added a testableTransition utility, which we then wrap all of our transition values with. The idea is that it just sets the transition type to false essentially disabling the animation.

This has generally worked, but we’ve noticed some places where the screenshots produce minorly different results between runs. You can see one here https://storage.googleapis.com/sentry-visual-snapshots/getsentry/sentry/6ad776199421d49c927f23c0a62877b96ad348e5/index.html. Maybe it is related to inconsistencies in how the browser renders elements on a gpu accelerated layer?

I was wondering if there was any better way to globally “disable” animations in framer motion.

Describe the solution you’d like MotionConfig could have an option to force framer motion to never “animate” anything, and always immediately transition states. This would be nicer than having to remember to always use testableTransition.

Open to any ideas. Thanks for this incredible library!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:15
  • Comments:7

github_iconTop GitHub Comments

6reactions
mattgperrycommented, Jun 2, 2022

We would quite like something like this in Framer too so I might be able to take a look in the next couple

1reaction
adam-thomas-privitarcommented, Nov 4, 2022

Yeh we really need this. I appreciate the attempt at sensible accessibility defaults when always or user is used – but this options is also famously useful for testing, but only when it completely disables animations. MotionConfig needs a new prop like reducedMotionMode that can be set to all-animations or something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Toggles (aka Feature Flags) - Martin Fowler
Release Toggles​​ These are feature flags used to enable trunk-based development for teams practicing Continuous Delivery. They allow in-progress features to be ...
Read more >
Feature Flags Best Practices (Feature Toggles) - Harness
Feature flags are a way that developers can conditionally turn certain sections of their code (or code paths) on or off. You can...
Read more >
Feature flags - GitLab Docs
With feature flags, you can deploy your application's new features to production in smaller batches. You can toggle a feature on and off...
Read more >
Managing Feature Flags Efficiently - YouTube
At Split, our React/Redux JavaScript application has around 280K lines of code and more active feature flags at any given moment than we ......
Read more >
What are Feature Flags | TTT | Cuelogic - YouTube
In this episode of TTT, we talk about Feature flags (or feature toggles ) which is one of the hottest topics in Software...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found