<link rel="stylesheet" href="/_merged_assets/_static/noscript.css">
Atom Community Logo Atom Community API Getting Started Toggle darkmode

Busy Signal GitHub

Busy Signal is a base package that provides an easy to use API to show your package is performing a task.

screenshot of busy-signal package

BusyMessage

Represents a particular busy signal.

Methods

dispose

Dispose of the signal when done to make it go away.

Returns

void

setTitle

Set or update the title of a signal.

Parameters

title
string

New title for the signal.

Returns

void

BusySignalOptions

Properties

debounce

(optional)
boolean

Debounce it? default = true for busy-signal, and false for action-required.

onDidClick

(optional)

  

If onClick is set, then the tooltip will be clickable.

onlyForFile

(optional)
string

Can say that a busy signal will only appear when a given file is open. Default = null, meaning the busy signal applies to all files.

revealTooltip

(optional)
boolean

If set to true, the busy signal tooltip will be immediately revealed when it first becomes visible (without explicit mouse interaction).

waitingFor

(optional)
"computer"|"user"

Is user waiting for computer to finish a task? (traditional busy spinner) or is the computer waiting for user to finish a task? (action required)

BusySignalProvider

busy-signal service.

Methods

add

Fires a did-add event.

Parameters

message
string

Name of the signal to notify regarding its addition.

Returns

void

clear

Fires a did-clear event.

Returns

void

dispose

Fires a did-dispose event and disposes of subscriptions.

Returns

void

remove

Fires a did-remove event.

Parameters

message
string

Name of the signal to notify regarding its removal.

Returns

void

BusySignalRegistry

busy-signal service.

Methods

create

Creates a busy-signal provider and adds it to the registry.

Returns

BusySignalProvider

BusySignalService

atom-ide-busy-signal service.

Methods

dispose

This is a no-op.

When someone consumes the busy service, they get back a reference to the single shared instance, so disposing of it would be wrong.

Returns

void

reportBusy

Activates the busy signal. Set the title in the returned BusySignal object (you can update the title multiple times) and dispose it when done.

Parameters

title
string

name of the busy signal to activate

options
BusySignalOptions

options for this signal

Returns

BusyMessage

reportBusyWhile

Activates the busy signal with the given title and returns the promise from the provided callback. The busy signal automatically deactivates when the returned promise either resolves or rejects.

Type Parameters

T

return type of the async function

Parameters

title
string

name of the busy signal to activate

f

  

Async function. When the promise resolves, the signal deactivates.

options
BusySignalOptions

options for this signal

Returns

Promise<T>