-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: loading spinner #93
Conversation
Signed-off-by: Berend Sliedrecht <[email protected]>
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.
tested locally, looks really cool! had one question and suggestion
cli/src/utils/loader.rs
Outdated
pub fn start_loader(loader: Loader) { | ||
match loader { | ||
Loader::Spinner => spinner_loader(), | ||
} | ||
} |
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.
How does the spinner know when to stop? 😅
I have an alternate suggestion for the spinner API:
two functions: start_spinner()
and stop_spinner()
. Do you think something like this is possible with a reasonable amount of effort 😅 ?
Sample code:
start_spinner();
do_something_async().await;
stop_spinner();
let me know what you think!
Signed-off-by: Berend Sliedrecht <[email protected]>
@jl-animo I resolved your feedback. with macaronis. HOWEVER.... it does break pipe sadly to jq for example. (I wonder if there is something for that..) FIXED by sending the loader to stderr |
Signed-off-by: Berend Sliedrecht <[email protected]>
Signed-off-by: Berend Sliedrecht <[email protected]>
closes #93
Signed-off-by: Berend Sliedrecht [email protected]