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 request: disable animation on load

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

Currently, the on each render the diagram animates as it loads. This is a cool effect, but quickly gets distracting if a user is switching between pages rapidly, or if the app wants to render a modal-like overlay that may trigger a re-render.

I tried following down the path to the elk docs. As best I can make out, the closest parameter that might modify this behavior is elk.animate, which accepts a boolean, but as far as I can tell no value I could pass would alter this behavior—I tried passing a string with various values, and overriding the TS types to force an actual boolean value, without luck. I don’t know where the behavior originates.

Expected behavior

Ideally I’d like to be able to pass in a rendering option to the canvas that disables the initial animation on render.

Minimal reproduction of the problem with instructions

N/A

What is the motivation / use case for changing the behavior?

Non-visible root rerenders of the diagram for cases where loading behavior would otherwise make it seem distracting.

Environment


Libs:
- react version: 17.0.1
- reaflow version: 3.0.14


Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
amcdnlcommented, Apr 8, 2021

OK - so let’s just add a new property on the Canvas component called animated - default it to true and then in the spots where framer-motion is used u need to pass it as a flag like i did here in reaviz: https://github.com/reaviz/reaviz/blob/master/src/BarChart/BarSeries/Bar.tsx#L476

0reactions
bguthriecommented, Apr 19, 2021

Oh goodness! So sorry for dawdling on this and thanks for adding it, I appreciate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

disable animations on CardElement · Issue #137 · stripe ...
It would be nice to have the option to disable the default CardElement animations/transitions (sliding on appear/moving to next field)
Read more >
How to disable interface animations in Android 10
In the Settings app, select Accessibility from the list. Now scroll down to the Display section and select Remove Animations to set the...
Read more >
Disable animations completely for an application UWP
1 Answer 1 ... Unfortunately, there is no such api could disable your app's animation. As you said Windows setting provide system level...
Read more >
How to Disable Animations in Windows 10 - wikiHow
1. Open the Settings app. Press the Start button in the lower-left corner of your screen and select the settings gear. You can also...
Read more >
How to Disable the Default Tiles Animation - ShortPoint Support
How to Disable the Default Tiles Animation ; Open the settings of tiles and switch to Custom CSS tab. Paste the coding in...
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