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

chore(ui): Creating a wave loader to start migrating app loaders #2775

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

jtulk
Copy link
Contributor

@jtulk jtulk commented Oct 24, 2024

Description

Preliminary work for WB-21477

Extends the tracked loader to use a new loading animation. Extends the tailwind config to support the animation.

@jtulk jtulk requested review from a team as code owners October 24, 2024 17:27
@circle-job-mirror
Copy link

circle-job-mirror bot commented Oct 24, 2024

if (onComplete) {
onComplete(name, trackedData);
}
const randomNum = Number(Math.random().toString().slice(-2)); // take the last two digits off a random number
Copy link
Contributor

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 😛)

Copy link
Contributor Author

@jtulk jtulk Oct 24, 2024

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?

Copy link
Contributor

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(
Copy link
Contributor

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)?

Copy link
Contributor Author

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.

@jtulk jtulk force-pushed the jtulk/wave-loader branch from 5c457b2 to b893bc5 Compare October 24, 2024 20:28
@shawnlewis shawnlewis merged commit 130bfaa into master Oct 24, 2024
107 of 109 checks passed
@shawnlewis shawnlewis deleted the jtulk/wave-loader branch October 24, 2024 21:01
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants