Is your feature request related to a problem? Please describe.
I maintain an open-source webapp [link] where you can run models and archive the results from your model runs. Many of the archived results are bokeh plots. I need a way to render archived Bokeh plots that were created with Bokeh version 1.4.0 or earlier, and I need to render new plots that are created with Bokeh 2.0. and newer.
Describe the solution you'd like
I would like a function that is similar to JQuery's noConflict() function for Bokeh that would work like the code in this Stack Overflow post:
Describe alternatives you've considered
I've considered reformatting archived results to meet the new API, but this doesn't seem like a sustainable solution. What do I do for future breaking changes or if it is not possible to reformat the archived results to meet the new API?
Another option is to set the correct Bokeh version in the HTML template when it is rendered on the server side. However, since the JSON output objects take some time to download from cloud storage, they are loaded dynamically after the page is rendered. This means that I'd have to reload the page if the Bokeh version for the outputs is mismatched. This isn't the end of the world, but it is a little clunky.
I've also begun implementing a one-off, quick-fix solution for my project that looks like this:
This would be a useful feature, but this proposal would make it usable only from bokehjs. It would be better to have this work in general across all bokeh's embedding types. I've been contemplating a solution where only the first instance would store global.Bokeh and all instances would store global.Bokeh[version]. This would be done on bokeh's bundle logic level, and should cover all cases. Though it would be also good to provide a solution for users who repack bokehjs' bundles with webpack, etc.
@mattpap Thanks for your reply! So I can get up to speed, what are the other embedding types?
I've been contemplating a solution where only the first instance would store global.Bokeh and all instances would store global.Bokeh[version].
For my use case, does this mean that I could access version 2.0 at window.Bokeh["2.0.0"]? Would the additional bokeh instances store a reference to themselves at window.Bokeh["x.y.z"]?
This would be done on bokeh's bundle logic level, and should cover all cases.
I'm pretty new to javascript. Can you elaborate a little more on what it means to do this at the bundle level?
Is your feature request related to a problem? Please describe.
I maintain an open-source webapp [link] where you can run models and archive the results from your model runs. Many of the archived results are bokeh plots. I need a way to render archived Bokeh plots that were created with Bokeh version 1.4.0 or earlier, and I need to render new plots that are created with Bokeh 2.0. and newer.
Describe the solution you'd like
I would like a function that is similar to JQuery's
noConflict()
function for Bokeh that would work like the code in this Stack Overflow post:Describe alternatives you've considered
I've considered reformatting archived results to meet the new API, but this doesn't seem like a sustainable solution. What do I do for future breaking changes or if it is not possible to reformat the archived results to meet the new API?
Another option is to set the correct Bokeh version in the HTML template when it is rendered on the server side. However, since the JSON output objects take some time to download from cloud storage, they are loaded dynamically after the page is rendered. This means that I'd have to reload the page if the Bokeh version for the outputs is mismatched. This isn't the end of the world, but it is a little clunky.
I've also begun implementing a one-off, quick-fix solution for my project that looks like this:
Additional context
@bryevdv discussed this with me in this discourse thread and suggested that I open an issue.
Also, if the Bokeh project is interested in this feature, then I'd be happy to help implement it. Thanks in advance for taking a look at this.
The text was updated successfully, but these errors were encountered: