Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Baune8D opened this issue Jan 8, 2025 · 3 comments
Open

Comments

@Baune8D
Copy link

Baune8D commented Jan 8, 2025

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 👍 this issue if you are interested in it.

@patriksvensson
Copy link
Contributor

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

@Baune8D
Copy link
Author

Baune8D commented Jan 8, 2025

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.

@patriksvensson
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕑
Development

No branches or pull requests

2 participants