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

[build] add progress indication for task() #3384

Open
4 tasks done
zhangyx1998 opened this issue Dec 28, 2023 · 2 comments · May be fixed by #3385
Open
4 tasks done

[build] add progress indication for task() #3384

zhangyx1998 opened this issue Dec 28, 2023 · 2 comments · May be fixed by #3385
Labels
enhancement New feature or request stale

Comments

@zhangyx1998
Copy link
Contributor

zhangyx1998 commented Dec 28, 2023

Is your feature request related to a problem? Please describe.

This is especially useful if user has a lot of content and each stage took relatively long.

People love seeing progress.

Describe the solution you'd like

Can either be a square bracket like [Completed/Total] or a progress bar.

For simplicity I would recommend the prior.

Example:

✓ building client + server bundles - 23.69 seconds
⠹ rendering pages [349/1382]

Describe alternatives you've considered

No response

Additional context

I am currently working on it. Generally its going to expose a handler to each task so they can update their progress. It is optional.

Please feel free to leave comments.

Validations

@zhangyx1998
Copy link
Contributor Author

zhangyx1998 commented Dec 28, 2023

The above suggested feature has been implemented

PR3385Demo.mov

Note

  1. For tasks that do not report progress, the original format [task] ... will be shown.

  2. Each task will show its duration after completion.

@brc-dd brc-dd added the enhancement New feature or request label Dec 30, 2023
@zhangyx1998
Copy link
Contributor Author

zhangyx1998 commented Dec 31, 2023

The latest result: (20X playback speed)

vp-subtask-progress.mp4

The updateCurrentTask handle is exposed so any subtask can now report its progress, especially if it would take a lot of time.

P.S. From the video, you may notice that the MiniSearch plugin ran index twice for a single build. I'll try to fix that in another PR.

@github-actions github-actions bot added the stale label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
2 participants