vbauerster / mpb

multi progress bar for Go cli applications
The Unlicense
2.29k stars 123 forks source link

Add width options that makes decorator remember width for short time #60

Closed nektro closed 3 years ago

nektro commented 4 years ago

With my library that I primarily to use to make web scrapers, there are two main types of bars. those being manual value ones and download ones. and as the byte formatting makes the counter column much wider than normal as shown below.

image

image

however, as many downloads may appear and disappear but a parent bar, this width difference can cause it to be very spam-y and make that column hard to read.

therefore I was hoping it would be possible to be able to tell mpb that the width of that column should be remembered shortly (perhaps 1s) before shrinking. currently I use decor.WCSyncWidth.

vbauerster commented 4 years ago

Sorry I didn't quite understand what the problem is. Can you please post some snippet where this issue is reproducible? As a last resort you can always implement your own decorator if built-in doesn't meet your needs.