kimmobrunfeldt / progressbar.js

Responsive and slick progress bars

Home Page:https://kimmobrunfeldt.github.io/progressbar.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ubalensi-yoobic opened this issue · 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.

This might have the same underlying issue as #290 (I have also proposed a fix for this there)