-
Notifications
You must be signed in to change notification settings - Fork 887
fix(site): update Spinner component to avoid UI edge cases #16497
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
Conversation
@Parkreiner @BrunoQuaresma Does it solve the following issue? Screen.Recording.2025-02-17.at.14.55.16.mov |
I'm guessing you're talking about the "boomerang" animation where the circle isn't perfectly centered as it rotates? In which case, no. This is basically a "pet project" PR I started because there was some known buggy behavior that we were okay with shipping with #16098. I promised I'd be able to fix those problems later, and this PR is basically a "brain break" between my other tickets Basically, the PR is more concerned with runtime behavior for HTML/JavaScript/UX. I'd want to put the animation fix in a separate PR, because while it looks wonky, it doesn't produce invalid HTML or cause UI flickering |
Yes I am talking about the non centered spinner animation. If this OR doesn't address that, I am happy to extract that to a sperate issue. |
@Parkreiner this Spinner component was based on the Radix Spinner including the API https://www.radix-ui.com/themes/docs/components/spinner |
No issue to link – spurred by some of the conversations in #16098
Still WIP
Changes made
loading
is no longer optional. I don't think it ever makes sense to have a spinner without a loading state.loading
flips totrue
. This can help minimize UI jank during state transitionschildren
prop is hidden (hiding the content via CSS vs unmounting the component entirely)children
prop whenloading
toggles betweentrue
andfalse
Videos
(Todo: Fill these in when the PR is done)