Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use real events for patching and streaming #12781

Open
gmerritt123 opened this issue Feb 5, 2023 · 3 comments
Open

Use real events for patching and streaming #12781

gmerritt123 opened this issue Feb 5, 2023 · 3 comments
Milestone

Comments

@gmerritt123
Copy link

Software versions

N/A

Browser name and version

N/A

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

Pretty minor but cost me some time figuring out today. Specifically under https://docs.bokeh.org/en/latest/docs/user_guide/interaction/callbacks.html#customjs-for-model-property-events :

... For example, the ColumnDataSource also supports "patch" and "stream" events, for executing CustomJS callbacks whenever the data source is patched or streamed to.

First of all, it's kinda misleading to use the word "events" when the setup is to actually use js_on_change, NOT js_on_event.

Secondly, it's NOT

js_on_change("patch"/"stream", CustomJS(...))

it is actually

js_on_change("streaming"/"patching",CustomJS(...))

I trawled through a number of issues/discourse posts and have seen the js_on_change('stream',...) several times, not sure if this has changed historically or it's just been overlooked.

Observed behavior

N/A

Example code

N/A

Stack traceback or browser console output

No response

Screenshots

No response

@bryevdv
Copy link
Member

bryevdv commented Mar 25, 2023

Sorry this slipped through the cracks for triage. Agree js_on_change is unfortunate, it's historical baggage at this point. Will at least update the docs but will also try to see if any more concrete improvements can be made.

@bryevdv bryevdv modified the milestones: 3.2, 3.3 Jun 18, 2023
@bryevdv
Copy link
Member

bryevdv commented Oct 8, 2023

@gmerritt123 I am just going to remove these docs entirely in the 3.3 update for now, and re-purpose this issue for adding a proper solution with bokeh.events events.

@bryevdv bryevdv modified the milestones: 3.3, 3.x Oct 8, 2023
@bryevdv bryevdv changed the title [DOCS] - Correction required in User Guide --> CustomJS Interaction Section Use real events for patching and streaming Oct 8, 2023
@gmerritt123
Copy link
Author

@bryevdv thanks for addressing! I imagine this'll be a pretty big "breaking" change from previous version so I'll definitely have to pay attention. My main work stuff is still back in bokeh 3.1 but I think 3.3 migration will definitely happen w all the new great stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants