Comfy-Org / Comfy-Org/ComfyUI_frontend
[Feature Request]: Provide progress bar API
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues and checked the recent builds/commits
### What would your feature do ?
This feature would provide an API for extensions to display a progress bar. It would be similar to the [toast feature](https://github.com/Comfy-Org/ComfyUI_frontend/blob/main/README.md#extension-api-toast), which has been well recieved and improved many extensions. The component would be the [PrimeVue progress bar](https://primevue.org/progressbar/#dynamic).
In addition to custom nodes, the progress bar could also be used by ComfyUI-Manager and the desktop app.
### Proposed workflow
1. Register a progress bar:
```typescript
app.extensionManager.progressBar.registerProgressBar({
value: () => myProgressStatus,
pollInterval: 50,
mode: 'determinate',
label: `Downloading ${customNodeName}`,
onComplete: () => {
console.log('Download complete')
},
dismissable: false,
position: 'top',
attrs: {
class: 'bg-blue-500 w-50'
}
})
```
2. The progress bar displays in a position and style familiar to user, as this feature is used by other extensions and components:
https://github.com/user-attachments/assets/fe893aa6-f7b6-4605-a5bd-43b95886bdd6
### Additional information
_No response_
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-2400-Feature-Request-Provide-progress-bar-API-18e6d73d365081819b7ae6f30fdfbed1) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.