spectre.console icon indicating copy to clipboard operation
spectre.console copied to clipboard

Make it possible to exclude linebreaks before and after Progress bars.

Open Baune8D opened this issue 10 months ago • 3 comments

Is your feature request related to a problem? Please describe. When using Progress, Spectre enforces a linebreak before and after the progress bar. This gets quite annoying if we use 2 separate progress bars after each other since that will include 2 empty linebreaks between the progress bars.

I do not know if there is a technical requirement for forcing these linebreaks. But i would much prefer to just add a linebreak if neccessary myself.

Describe the solution you'd like Some kind option for disabling forced linebreaks around progress bars.

Describe alternatives you've considered If we need two separate progress bars after eachother, i have resolved to using AnsiConsole.Cursor.Move(CursorDirection.Up, 1) after the first progress bar in order to remove the duplicate linebreak.

Additional context image


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

Baune8D avatar Jan 08 '25 18:01 Baune8D

I'm not sure I understand this issue. AFAIK, we don't put any line breaks between progress bars. Screenshot below is from the progress example over at https://github.com/spectreconsole/examples/tree/main/examples/Console/Progress

image

patriksvensson avatar Jan 08 '25 18:01 patriksvensson

I'm not sure I understand this issue. AFAIK, we don't put any line breaks between progress bars. Screenshot below is from the progress example over at https://github.com/spectreconsole/examples/tree/main/examples/Console/Progress

I took your example, duplicated the Progress bar, and removed renderhooks and log messages to clarify the issue:

image

There are double linebreaks between the 2 Progress bars.

These linebreaks are forced, which can make it quite annoying to properly fit in the Progress bar in dynamic applications where you cant always predict whats is triggered and when.

I would very much like some kind of control over them.

Baune8D avatar Jan 08 '25 19:01 Baune8D

Ah, now I undestand. Seems reasonable to be able to control this somehow.

patriksvensson avatar Jan 09 '25 00:01 patriksvensson