-
Notifications
You must be signed in to change notification settings - Fork 71
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
chore(ui): Creating a wave loader to start migrating app loaders #2775
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=91e54049831e6e01fc8dd5b0dfc77b83675a4fc6 |
if (onComplete) { | ||
onComplete(name, trackedData); | ||
} | ||
const randomNum = Number(Math.random().toString().slice(-2)); // take the last two digits off a random number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: looks like this is just copied from above but not a fan of the number->string->number acrobatics here. something like Math.floor(Math.random() * 100)
feels more elegant and is likely faster (though i'm sure the cost is extremely negligible 😛)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really bizarre piece of code. I assume I wrote it, but what the hell was I doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
story of my life 😆
}: TrackedWandbLoaderProps & { | ||
size: 'small' | 'huge'; | ||
}) => { | ||
useLifecycleProfiling( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: seems like contents of this call are copy-pasted from the existing tracked loader above. are there subtle differences i'm missing? could we pull this logic out and reuse for both comps (and any other future loaders)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The typing to split these is slightly involved, and I'm sacrificing this at the moment because the problem I'm trying to fix is elsewhere. I'll come back to it.
5c457b2
to
b893bc5
Compare
Description
Preliminary work for WB-21477
Extends the tracked loader to use a new loading animation. Extends the tailwind config to support the animation.