progressbar.js icon indicating copy to clipboard operation
progressbar.js copied to clipboard

Problem calculating the Stroke-dashoffset of the path on Storybook causing infinite loop

Open ubalensi-yoobic opened this issue 5 years ago • 1 comments

As suggested by Kimmo Brunfeldt, one of the ProgressBar.js contributor, I'll write a post here explaining the issue I have encounter.

I'm actually using the library inside a component I have build for an application I'm building for my company. The component is written in Typescript / JSX. As every components we make, we need to return them in a software called Storybook for exploring all the components and prevent from any visual regression issues. But since the latest update of Storybook, I encounter an issue using the animate() function, this function is basically calling a function called _getComputedDashOffset() which is in charge to calculate the stroke-dashoffset of the path receiving the progressValue, but this function will now always return 100 causing an infinite loop inside the step. Using the set() function instead of the animate()fix the problem but I'm loosing the animation. So I would like to get any feedback of you guys if you ever encounter this issue before whatever it's from Storybook or somewhere else, I'll actually look into it but didn't find any solution yet. I'll be great if you guys can help me about it.

ubalensi-yoobic avatar Sep 26 '19 12:09 ubalensi-yoobic

This might have the same underlying issue as https://github.com/kimmobrunfeldt/progressbar.js/issues/290 (I have also proposed a fix for this there)

mmjr-x avatar Sep 21 '22 14:09 mmjr-x