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

[Progress] Partial and global operation progress

Open SuperJMN opened this issue 2 years ago • 4 comments

I have a Task with Subtasks and I want to render each task's progress and the overall progress.

On the one side, I'd like to have the overall task progress (the number of subtasks pending/completed) On the another side, I'd like to have the progress of the children tasks with their progress.

Is there any way to do this? Thanks.


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

SuperJMN avatar Jul 23 '23 14:07 SuperJMN

Nothing out of the box that I could see. I've got a similar requirement and just created an overall task manually, and I update it as my subtasks finish using Task continuation callbacks.

It's a little messy but it works.

https://github.com/thomhurst/ModularPipelines/blob/main/ModularPipelines/Helpers/PipelineConsoleProgressPrinter.cs

thomhurst avatar Jul 25 '23 18:07 thomhurst

Interesting. Could you post a snapshot of how it renders? Thanks :)

SuperJMN avatar Jul 27 '23 22:07 SuperJMN

Interesting. Could you post a snapshot of how it renders? Thanks :)

If you see my pull request, I posted some code to replicate my need.

https://github.com/spectreconsole/spectre.console/pull/1250

thomhurst avatar Jul 27 '23 23:07 thomhurst

Interesting. Could you post a snapshot of how it renders? Thanks :)

If you see my pull request, I posted some code to replicate my need.

#1250

Neat! thank you :D

SuperJMN avatar Jul 27 '23 23:07 SuperJMN