-
Notifications
You must be signed in to change notification settings - Fork 243
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
how to show progress bar and inquire select at the same time? #564
Comments
Hi Daniel, You should do the |
Hi, Chris:
|
Are you able to share the code so I can give it a try myself? Or at least the UI code to reproduce the problem. |
I guess I have to change my workflow:
|
The code as written seems to work OK for me - what different behavior are you expecting? Also one thing that I notice is you don't need to put |
I want the progress bar and Select menu to show on the screen at the same time. thanks for the Arc reminder. |
@chris-laplante hi, another unrelated question: |
reset or set_position won't work properly in multiple threads. If so I don't think the progressbar should be Sync. |
Ah, gotcha. For the progress bar to be running at the same time as the user is making a selection, we'd need the It wouldn't be impossible to implement the coordination between indicatif and dialoguer, but IMHO it is a bit outside the scope of indicatif currently. @djc what do you think? You might want to consider using a curses-based crate: https://crates.io/keywords/curses |
Can you show multi-threaded code you are trying? It should work fine from multiple threads. |
Yeah, I'm personally not motivated to spend time on that. |
this will reproduce the issue:
|
I can reproduce that, and it's weird. I'll look into it later this week (can't do it right now unfortunately). |
Hi, I have a simple program that the user can pick a song, play it and go back to pick song again.
The initial state:
I'm using inquire's select:
When the user finishes picking the song, the loop goes back to the
Select
again.At the same time, there's another thread that will send back
playing
state via channel to the main thread.what I want to achieve is that I want to show the progressing bar below the select options. However, the bar kept clashing with the first line of Select UI. (
the original line is: "? choose a song:", and now is " >>>> Connecting..."
)I've tried to set the target to
stdout
, it doesn't work either.Any ideas?
The text was updated successfully, but these errors were encountered: