Skip to content

doc: show pn.state.sync_busy in the busy how-to#8564

Open
mvanhorn wants to merge 1 commit intoholoviz:mainfrom
mvanhorn:osc/2334-document-sync-busy
Open

doc: show pn.state.sync_busy in the busy how-to#8564
mvanhorn wants to merge 1 commit intoholoviz:mainfrom
mvanhorn:osc/2334-document-sync-busy

Conversation

@mvanhorn
Copy link
Copy Markdown

Closes #2334.

The busy how-to (doc/how_to/state/busy.md) only showed the manual pn.bind(indicator, pn.state.param.busy) pattern. pn.state.sync_busy has been on state.py for years and is listed in doc/api/state.md, but a user reading the busy how-to or the indicator gallery has no reason to discover it.

This adds a short second section to the how-to that demonstrates the direct API:

busy = pn.indicators.LoadingSpinner(value=False, size=30)
pn.state.sync_busy(busy)

Verified sync_busy signature in panel/io/state.py:1021 and confirmed the referenced indicator classes (BooleanStatus, LoadingSpinner) and their BooleanIndicator base still exist in panel/widgets/indicators.py.

The busy how-to only walked through the manual `pn.bind` pattern. Add a
second section demonstrating `pn.state.sync_busy(indicator)`, the
higher-level API that keeps a `BooleanIndicator` (e.g. `BooleanStatus`,
`LoadingSpinner`) in step with `pn.state.busy` without writing the
binding yourself.

Closes holoviz#2334.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pn.state.sync_busy maybe should be documented in the indicators?

1 participant