This package provides:
This package consumes:
Made for Pulsar!
This package was written specifically for Pulsar and did not exist in the Atom package repository.
Show a progress dot in the status bar. A base package that provides an easy-to-use API for other packages to signal they are performing a task.
Fork of busy-signal.
atom-ide-busy-signal (recommended, async-friendly) and busy-signal (lower-level, multi-message) service contracts.To install progress-dot search for progress-dot in the Install pane of the Pulsar settings or run ppm install progress-dot. Alternatively, you can run ppm install asiloisad/pulsar-progress-dot to install a package directly from the GitHub repository.
Two service APIs are available. Use atom-ide-busy-signal for new packages: async lifecycle is handled automatically and each message is independently disposable. Use busy-signal when you need multiple concurrent messages from a single provider or fine-grained add/remove/clear control, or for compatibility with older packages.
atom-ide-busy-signal (recommended)High-level API that manages busy messages tied to async operations.
In your package.json:
{
"consumedServices": {
"atom-ide-busy-signal": {
"versions": {
"0.1.0": "consumeBusySignal"
}
}
}
}
In your main module:
module.exports = {
async consumeBusySignal(api) {
// Automatically shown while the promise is pending:
const result = await api.reportBusyWhile("Downloading data...", () => fetch("https://..."));
// Or manage the message manually:
const message = api.reportBusy("Formatting...");
await format();
message.setTitle("Writing to disk...");
await writeToDisk();
message.dispose();
},
};
| Method | Returns | Description |
|---|---|---|
reportBusy(title) |
BusyMessage |
Show a busy message, returned handle must be disposed when done |
reportBusyWhile(title, fn) |
Promise |
Show a busy message for the duration of the async fn |
| Method | Description |
|---|---|
setTitle(title) |
Update the message text |
dispose() |
Remove the message |
busy-signalLow-level API that allows adding and removing busy messages via a Provider instance.
In your package.json:
{
"consumedServices": {
"busy-signal": {
"versions": {
"1.0.0": "consumeSignal"
}
}
}
}
In your main module:
const { CompositeDisposable } = require("atom");
module.exports = {
activate() {
this.subscriptions = new CompositeDisposable();
},
consumeSignal(registry) {
const provider = registry.create();
this.subscriptions.add(provider);
provider.add("Building project");
// ... later:
provider.remove("Building project");
},
deactivate() {
this.subscriptions.dispose();
},
};
| Method | Description |
|---|---|
add(title) |
Show a busy message with the given title |
remove(title) |
Remove a previously added message |
clear() |
Remove all messages from this provider |
dispose() |
Remove all messages and dispose the provider |
Got ideas to make this package better, found a bug, or want to help add new features? Just drop your thoughts on GitHub. Any feedback is welcome!