rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.53k stars 206 forks source link

UX issues that require enhancements #56

Closed brubicon closed 3 years ago

brubicon commented 4 years ago

Hello,

Great library! Love all the great and thoughtful features. I have two issues that I'm trying to deal with that I think if enhanced would greatly improve the library:

  1. In unknown mode, there is currently no way to disable either the unknown bar and/or the spinner. It's very distracting to show two animations in the unknown mode when only one of the animations is enough. If we're able to show only one animation (unknown or spinner), it would look more professional.

  2. After progress is complete, a receipt is printed that doesn't show a final context message. For example, if there is one or more progress bars, it would great to show a final message indicating the end result (i.e. via bar.text). Today bar.text is cleared at the end, which is a great default, but would be great to customize an end message. This way the end-user is able to know what the result of the progress was, especially with multiple bars.

Thank you so much!

rsalmei commented 4 years ago

Hello @brubicon, thank you man!

Let's see, I think 1. would be easy to implement, although I do not agree. I think the spinner communicates the visual identity, the "please wait, I'm processing" feeling. Take my first gif animation in the README for example, all the 4 bars running one after the other. If the unknown one comes without any spinner, I think it would be very weird, it would clearly be missing something. But I surely could support a config option spinner=None, what do you think?

Humm, regarding the 2., I can see the use of that! It's a nice suggestion, do you think another config option would do it? Something like receipt_message=True, which would be False by default.

You're welcome! 👍

brubicon commented 4 years ago
  1. Yes, absolutely, the config spinner=None makes sense. That's what I immediately first tried without checking the documentation haha.

  2. I think that's a great idea, to be able to set a default message once progress completes. We'll still need to be able to set it during progression, as there might be multiple final messages to print depending on the context. "Successfully downloaded ABC." or "Failed to download ABC." Maybe one way to approach this is to make bar.text() not be cleared after it completes, have it clear by default (cleaner) and then when you instantiate alive_progress, can set some flag to disable clearing, something like clear_context_text=False.

Thank you!

rsalmei commented 4 years ago

Hey @brubicon, I'm glad to report I've made them! Now there's support for both spinner=None and bar=None, as well as a new config option show_receipt_text=False. You can just set it to True to print it into the receipt. I preferred a positive logic: when it is True, then Yes it shows, instead of a clear, which when it is True, then No it not shows.

Both are gonna make it in the next 2.0! 👍

rsalmei commented 3 years ago

I'm going to change this config to just receipt_text! I think it's more mnemonic. So receipt_text=True maintains the text, receipt_text=False, removes the text (default).

rsalmei commented 3 years ago

Closing the ready issues to reduce the number of opened ones.