Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress ring's indeterminate animation doesn't work well at smaller sizes #2991

Open
knd775 opened this issue Nov 20, 2024 · 1 comment
Open
Labels
bug Something isn't working
Milestone

Comments

@knd775
Copy link
Contributor

knd775 commented Nov 20, 2024

Current Behavior

The ring disappears for some time each loop. This example is with size-4

Recording.2024-11-20.140833.mp4

Expected Behavior

No response

Steps To Reproduce

No response

Link to Reproduction / Stackblitz

No response

More Information

No response

@knd775 knd775 added the bug Something isn't working label Nov 20, 2024
@endigo9740 endigo9740 added this to the v3.0 (Next) milestone Nov 20, 2024
@endigo9740
Copy link
Contributor

endigo9740 commented Dec 11, 2024

@knd775 Ben just FYI I did take a look at this yesterday. I agree the animation doesn't work well at the small size. The issue is our default animation defined here:

https://github.com/skeletonlabs/skeleton/blob/next/packages/skeleton/src/plugin/extends/animations.ts#L15

The way these components work, is by using an SVG circle and animating the stroke like so:

https://css-tricks.com/svg-line-animation-works/

So it's not a fill like a progress bar between 0-100%, but actually a single portion of a dashed line stretched for the entire stroke's length. As such, it's not dynamic. Meaning as the size of the circle grows and shrinks it should be a relatively larger/smaller value. Where as right now we have a fixed value.

This does scale somewhat - just not to the extremes, so what I might do is create a few variations of this and use responsive breakpoints to swap between. That is unless I can come up with a better way to accomplish this and still allow users to replace the animation if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants