-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[ui-components] Delayed, SpinnerWithText #20448
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @hellendag and the rest of your teammates on Graphite |
return () => clearTimeout(timer); | ||
}, [delayMsec]); | ||
|
||
return value; | ||
return ready; |
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.
Renamed this var because I found that it's not clear what "value" is supposed to mean.
Deploy preview for dagit-storybook ready! ✅ Preview Built with commit 8ade008. |
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.
Code looks good.
Merge activity
|
## Summary & Motivation Extract a couple of our common loading-state UI patterns into ui-components. - `Delayed`, which uses `useDelayedState` to delay showing content. This is useful for delaying when we show a loading state, so that we don't flash it quickly when loading is fairly fast. - `SpinnerWithText`, to show a body-text spinner with a line of text. ## How I Tested These Changes Storybook, Jest.
Summary & Motivation
Extract a couple of our common loading-state UI patterns into ui-components.
Delayed
, which usesuseDelayedState
to delay showing content. This is useful for delaying when we show a loading state, so that we don't flash it quickly when loading is fairly fast.SpinnerWithText
, to show a body-text spinner with a line of text.How I Tested These Changes
Storybook, Jest.