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

Improved handling of the bokeh root model and comm #3066

Merged
merged 6 commits into from
Oct 9, 2018
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Oct 9, 2018

On bokeh plots the root model is required to set up comm callbacks. Currently this is handled in some pretty terrible ways, e.g. after subplots set up a comm callback any layout plot or similar that is wrapping the plot has to then search and replace a placeholder root model id with the actual root model id. By allowing users to pass in a root model into a plot we can at least avoid having to replicate this logic on upstream libraries like panel.

Similarly this PR also allows passing in a Comm instance, so that upstream libraries do not have to patch all plots manually.

@philippjfr
Copy link
Member Author

Ready to review and merge.

@philippjfr philippjfr changed the title Improved handling of the bokeh root model Improved handling of the bokeh root model and comm Oct 9, 2018
@@ -236,7 +236,7 @@ def __init__(self, keys=None, dimensions=None, layout_dimensions=None,
self.current_key = None
self.ranges = {}
self.renderer = renderer if renderer else Store.renderers[self.backend].instance()
self.comm = None
self.comm = params.pop('comm', None)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not make this an explicit keyword argument?

@jlstevens
Copy link
Contributor

Looks good to me. Merging.

@jlstevens jlstevens merged commit aae1590 into master Oct 9, 2018
philippjfr added a commit that referenced this pull request Oct 25, 2018
# Conflicts:
#	holoviews/plotting/bokeh/callbacks.py
#	holoviews/plotting/bokeh/plot.py
@philippjfr philippjfr deleted the root_handling branch November 12, 2018 18:01
Copy link

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 Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants