In Panel is there a way to show a spinner when either 1) Python code is being executed 2) Javascript code like the layout engine at work is being executed?
For example I have a Column that I call app which takes a long time by the bokeh layout engine to figure out how to render because it contains multiple tabs and has sizing_mode=“stretch_width”. I would like to inform the user that the page is just loading and the application has not died.
where loading is just a Str pane with the text “loading…”. It works from the point of view that the “loading…” is shown, then after some time the app shows, and then the “loading…” is removed.
But it takes just as much time to remove the “loading…” element as it did to append the app element.
I’d merge the operations as much as possible, i.e. instead of clearing, appending, removing etc. I’d do something like:
page[:] = loading
# some computation
page[:] = app
It may be the case that this does not work well until #857 has been released or you downgrade to Tornado 5. Since Tornado 6 it seems events aren’t applied immediately anymore.
Currently we do not have a Spinner element but we have used a spinner gif instead in the past. Alternatively you could also use a Progress Bar in indeterminate mode.