Progress formatting options for `PercentageColumn`
See original GitHub issueIs your feature request related to a problem? Please describe.
I want to show a progress table using spectre. It works really well as it is, however, some operations take a really long time to complete, so I would like to be able to show more detailed progress values (e.g. 50.41%
instead of just 50%
).
The code responsible for this seems to be here:
And it doesn’t provide any outside entry points to customize this behavior.
Describe the solution you’d like
New ProgressColumn
property of type string
that serves as the format for task.Percentage.ToString(...)
. Potentially also a IFormattingProvider
property too, but I personally need to use the current culture formatting anyway.
Describe alternatives you’ve considered
I could create my own ProgressColumn
but I’d end up re-writing most of the stuff in the PercentageColumn
.
Additional context
None that I could think of.
Issue Analytics
- State:
- Created a month ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
@Tyrrrz Format strings are hard 😄, and I want to keep the number of support issues down if I can. We could however (in addition) add a new column where you get a lambda with the task, and where you return a string of your choice. Perhaps that would be a middle road?
So, I’ve been thinking, and perhaps we can add a setting to the column whether it should round it to nearest integer or not, and with how many decimals.