Closed bjesuiter closed 1 year ago
My test is ok.
Hmm, I'm currently analyzing what problem there is with drawing the progress bars.
Try to put 3 progress bars in the test. You should see that it is broken now, as it is for me. The third progress bar does not render while 1 &2 are, despite the data being in the array. also, after rendering of all three bars is complete, the next prompt will be on the same line as the 3rd progress bar, which appears in one complete rendering at the end.
Maybe this is an issue with ANSI escape sequences used while drawing, I experimented with this on the weekend and tried to refactor it completely and it is another kind of complicated sometimes.
I now have a solution, which is able to render 3 progress bars independently of one another from 1 readable stream for each bar, containing the completed prgress, however, Since my test uses fast-firing timers the rendering is sometimes a bit laggy.
Also, printing console logs messes up the rendering of the bars, so this has to still be adjusted.
If you're interested at looking into my refactoring, I can give you a WIP PR, if you want :)
Three progress bars is ok. Maybe you can try another computer
When you look at the image, you see the percent sign behind the last progress row. Thats my prompt sign which is on the wrong line.
You can also see this in the following screenshots from running the MultiProgressBar in a deno test:
I'll add a small PR for this.