General development workflow for standalone customjs htmls

I’m a reasonably competent python user (primarily using jupyter and spyder) and have been utilizing bokeh to develop several interactive figures for clients. My JS knowledge is virtually non existent. I have been trying to avoid the use of bokeh server (goal is to have easy to pass around standalone html “figures”), so have been slowly but surely hashing out the necessary customjs callbacks to do so.

My current development workflow is as follows:

  1. dev the necessary data prep functions to turn my input data into a series of dictionaries
  2. intialize columndatasources for plotting etc from an intial key of that dictionary
  3. pass that whole dictionary as an args argument in for a customjs instance
  4. write out my best guess (or whatever snippets I can find on the internet) of the js code, using the dictionary to change datasources etc.
  5. show the figure in a web browser and hope the js works. if it doesn’t, look at the javascript console in the browser and try to glean info on why.

I’m a bit frustrated/tired of this trial and error process… still really feeling like i’m flying blind and just hoping the plane lands on the runway. I’m wondering if any devs/experts here could recommend a better workflow. Should I look into getting a javascript IDE, installing bokehjs and trying to learn more about the the customjs code from that? What I really want is a way to do the js equivalent of “dir(thisclassinstance)” or “help(thisclassmethod)” so I can see what’s available to me on the javascript side for bokeh objects that i’ve instantiated in python.

Any suggestions/idea much appreciated!

Using an IDE that supports JS would help but it’s not required. Most of the CustomJS code you can write with just superficial JS knowledge and some understanding of how to talk to BokehJS models. If you need something more advanced, BokehJS source code helps.

Thanks for the response! How can I gain a better understanding of “how to talk to the BokehJS models”? I think this is really what I’m after.

Alas I don’t have an answer better than “read all the documentation, read all the examples, collate JS and Python examples to understand what corresponds to what, read BokehJS source code and gain an understanding of how it works in general”.
The most important class is HasProps. The most important concepts are events and signals.