Skip to content

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

Merged
philippjfr merged 1 commit into
holoviz:mainfrom
mvanhorn:osc/2334-document-sync-busy
Apr 23, 2026
Merged

doc: show pn.state.sync_busy in the busy how-to#8564
philippjfr merged 1 commit into
holoviz:mainfrom
mvanhorn:osc/2334-document-sync-busy

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

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.

@philippjfr philippjfr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much appreciated @mvanhorn!

@philippjfr
philippjfr merged commit 333b6ff into holoviz:main Apr 23, 2026
1 check passed
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Thanks for the doc merge, @philippjfr. Showing sync_busy in context helps a lot.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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?

2 participants