console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.46k stars 243 forks source link

Stacked progress bar #644

Open baszalmstra opened 6 months ago

baszalmstra commented 6 months ago

Im wondering if there is an easy way to create a stacked progress bar where one bar shows multiple progress states. E.g:

GrN8f

I can perhaps implement something with the ProgressTracker but I couldnt figure out how to support "wide" elements.

djc commented 6 months ago

I don't think we have support for something like this -- we'd usually use a MultiProgress with constituent progress bars that disappear when they complete, potentially with a "total" bar at the top or bottom.

The formatting code that takes care "wide" stuff lives here:

https://github.com/console-rs/indicatif/blob/main/src/style.rs#L226

baszalmstra commented 6 months ago

The "wide" stuff seems to be setting up some WideElement which the ProgressTracker does not seem to have access too. Ill try something non-wide.