console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.21k stars 238 forks source link

Stacked progress bar #644

Open baszalmstra opened 1 month ago

baszalmstra commented 1 month 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 1 month 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 1 month 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.