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
Add ability to inline internal resources in Jupyter #3013
Comments
from panel/models/tabulator.py: JS_SRC = "https://unpkg.com/tabulator-tables@5.0.7/dist/js/tabulator.js" THEME_PATH = "tabulator-tables@5.0.7/dist/css/" none of this supports PANEL_INLINE from what I can tell.. |
This is a general problem that goes beyond just tabulator and affects all external components. We do not currently support inlining external resources. However since we a) bundle all external components and b) have a server extension for Jupyter that serves up the bundled resources we should be able to server them from that endpoint instead. |
Just for reference. Dove88 is also trying to use Tabulator and Plotly offline in a notebook without luck. See https://discourse.holoviz.org/t/panel-doesnt-show-output-in-the-jupyter-lab-notebook/5104. |
Yup working on this in the coming week. Technically this should already work on main but it's loading from an endpoint that isn't always defined so I'll experiment with inlining instead. |
We too have an isolated environments where having tabualtor working in offline context would solve most of Jupyter UI issues. |
@philippjfr I am still seeing requests being made to following URLs which fails on an isolated device. https://cdn.holoviz.org/panel/1.1.0/dist/panel.min.js Following are installed packages. bokeh 3.1.1 Was my understanding of this patch was incorrect that updated versions would work in offline context? |
Inline resources are very inefficient and therefore not enabled by default. If you want to inline resources you should request it explicitly with pn.extension(inline=True) |
Thanks for quick response @philippjfr . Got following warnings in browser console and table is not shown.
source import panel as pn
pn.extension("tabulator", inline=True)
tbl = pn.widgets.Tabulator(df, #df is already defined before
show_index=False,
sizing_mode = 'stretch_width',
)
tbl Same code works where internet is available. Running it on JupyterLab 3.4.6 |
@philippjfr Issue I reported just now has disappeared, but I am still seeing failed requests to following URLs which makes the rendered table illegible.
|
@philippjfr I was looking around in the source to see if putting css in the installation folder would work. Also, Could you please tell me if copying these files to the package installation directory will allow it server local copy? |
Hi @philippjfr , should I create a new issue for this? |
Please do, thank you! |
We are running a jupyter-lab application environment behind a strict firewall and users cannot access the internet. Hence for all panel work we have a default environment variable set for PANEL_INLINE
This works for most panels functions but not for tabulator as the code for models/tabulator.py has explicit dependence on the tabulator and moment CDNs. I think this is an issue for plotly functions too.
As a general feature request - PANEL_INLINE should inline all panel and included items like tabulator, plotly (bokeh seems to work)
The text was updated successfully, but these errors were encountered: