spectreconsole / spectre.console

A .NET library that makes it easier to create beautiful console applications.
https://spectreconsole.net
MIT License
9.33k stars 486 forks source link

Specify column width for additional progress bar columns #254

Open phil-scott-78 opened 3 years ago

phil-scott-78 commented 3 years ago

Is your feature request related to a problem? Please describe.

With some columns having dynamic content it is causing the progress bar to bounce around a bit. And in the case of the estimated time, I have one that commonly can be over 9 hours which causes it to wrap. You can watch things get shuffled on this gif, then go to two lines for the estimated time at the end. Not the end of the world, but would allow things to be a bit more polished.

photoshop

Describe the solution you'd like A width property

Describe alternatives you've considered Moving the columns around so that things don't bounce as much


Please upvote :+1: this issue if you are interested in it.

phil-scott-78 commented 3 years ago

btw, the estimated time jumping to 12 hours is probably a bug in this case. But if I do something like download the stackoverflow database which is 45gb it will be accurately listed as 10+ hours which would cause the wrapping

patriksvensson commented 3 years ago

@phil-scott-78 In addition to add a Width property as an escape hatch, a suggestion I would want to make is to change formatting of time to 00:00:00 and cap it to some value indicating that it's greater than 99:59:59.

What do you think?

phil-scott-78 commented 3 years ago

I like it.

At that point I'm not sure if 99:59:59 or something like ::** would be more appropriate. I'd kinda prefer the second

patriksvensson commented 3 years ago

Perhaps **:**:**?

EDIT: I'm actually leaning against showing 99:59:59 when capped unless width is greater than 8. Makes it clear that it's working.

phil-scott-78 commented 3 years ago

My original reply had that format but markdown ate it. I think it makes sense.