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

Add ability to mark ProgressTask as failed #314

Open
Tyrrrz opened this issue Mar 23, 2021 · 1 comment
Open

Add ability to mark ProgressTask as failed #314

Tyrrrz opened this issue Mar 23, 2021 · 1 comment
Labels

Comments

@Tyrrrz
Copy link
Contributor

Tyrrrz commented Mar 23, 2021

Is your feature request related to a problem? Please describe.
When performing multiple parallel tasks, it's likely that some of them may fail without stopping the entire process. It would be nice if there was a way to signal to the user that a task has failed.

Describe the solution you'd like
Currently, ProgressTask exposes a method called StopTask(). The least intrusive solution I see is to add an overload called StopTask(bool isError).

If the task is stopped with an error, we can apply some kind of ErrorStyle, which would make the progress bar appear red. Additionally, we can make it so a failed task displays an X in the PercentageColumn.

Describe alternatives you've considered
I considered writing something to the console myself, but it breaks the progress reporting.

Additional context

Here's how it currently looks:

image

One of the tasks has failed, but its progress remains at 0 with no visual indication that it crashed. As a user, it's not clear whether it's just stuck at 0% or failed.


Please upvote 👍 this issue if you are interested in it.

@redoz
Copy link

redoz commented Jul 25, 2023

@patriksvensson would you take a PR for this? I was thinking of adding bool Failed { get; set;} to the ProgressTask and an additional property (Style FailedStyle {get;set;} = Color.Red?) to the ProgressBarColumn

Edit: oups. I see there's already a PR open for something similar

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

No branches or pull requests

3 participants