fadeevab/cliclack

[feature request] ability to disable the extra newline after each log/prompt

Closed this issue ยท 6 comments

For when we might want to show a sequence of steps happening "unbroken", likely together with spinners (or progress bars! ๐Ÿ˜‰ ). Example:

โ–ฒ  This operation can take a while and consume a lot of disk space.
โ”‚  Estimated disk space usage: ~2.3GB
โ”‚  
โ—‡  Are you sure you want to continue?
โ”‚  Yes 
โ”‚
โ”‚ โœ” Files downloaded
โ”‚ โœ” Images built
โ”‚ [spinner] Copying files... 123.45MB / 2.3GB (5%)

... ish

@cylewitruk If we exclude spinners from the equation, you still could use \n like this log::success("Result:\nโœ” Files downloaded\nโœ” Images built")?;

โ”Œ   log 
โ”‚
โ—†  Result:
โ”‚  โœ” Files downloaded
โ”‚  โœ” Images built
โ”‚ 

What do you think?

@cylewitruk If we exclude spinners from the equation, you still could use \n like this log::success("Result:\nโœ” Files downloaded\nโœ” Images built")?;

โ”Œ   log 
โ”‚
โ—†  Result:
โ”‚  โœ” Files downloaded
โ”‚  โœ” Images built
โ”‚ 

What do you think?

That won't really work for me because I want to show them in real-time as they're happening (including spinners and progress bars), and tick them off one-by-one as part of a "group". The above would require that I wait until all is done to print.

@fadeevab After having spent time on the multiprogress bar, I wonder if this could simply be a new "progress type" in a multi progress prompt? Besides download/progress I would want 1) spinner, and 2) "waiting" (no animation, just indicating that it's a step that's waiting, for example download must complete before extracting files).

I did add as_spinner() to multiprogress locally, but ran into problems with the animation. I'm starting to think that long-term the direct dependency on indicatif should be dropped and we just take some inspiration from them, but that cliclack is responsible for all rendering even for progress/download/spinner/etc.

Spontaneous thoughts?

@cylewitruk Is it still actual?

@cylewitruk Is it still actual?

@fadeevab yeah, at least for log lines -- I'm switching over to the new multiprogress now which solves my needs there ๐Ÿ˜„

I might be able to solve it all with multi_progress though -- so don't do anything yet, I'll play with it and see if it works first.

Closing this for now as I've been able to work around not having this built-in