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

Progress bar not clear when changing style #669

Open
DBY047 opened this issue Nov 22, 2024 · 0 comments
Open

Progress bar not clear when changing style #669

DBY047 opened this issue Nov 22, 2024 · 0 comments

Comments

@DBY047
Copy link

DBY047 commented Nov 22, 2024

I built a program to download artifacts from devOps. It uses MultiProgress with tokio to download artifacts in parallels. The program changes the prgress bar style dynamically while the the artifacts are process like progress you would see when you pulled docker images.

I use a default style (ProgressStyle::with_template("{prefix}: {msg}")) when download is not started yet or completed
and another when download is in progress (ProgressStyle::with_template("{prefix}: Downloading [{wide_bar:.white/red}] {percent}% [{bytes}/{total_bytes}]")).

With version 0.17.8, when swaping the progress style, the line in the terminal are all cleaned from previous inforrmations. The bar progress and the percent/bytes downloaded is not visiable anymore. See the result while download is completed and the default progress is used:
image

With version 0.17.9, when swaping the progress from the download style to the default style, the bar, the percent and the bytes information or still shown in the console on all progress bar except the last one 🤔. See the result while download is completed and the default progress is use:
image

I found out that using set_move_cursor(true) with the MultiProgress causes this issue with version 0.17.9. Without this setting, progress bar flicker way more specially on Windows. But I guess it is better than seeing data from the bars previous style.

The new version with set_move_cursor(true) seams to fix the flicker issue. I don't see any flickering at all. That whould be nice to have no flicker and the lines clreared like in the previous version. For the moment I will sitck with the previous version.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant