jams icon indicating copy to clipboard operation
jams copied to clipboard

notebook rendering does not work in jupyterlab

Open bmcfee opened this issue 6 years ago • 3 comments

Probably something changed dramatically in the CSS between jupyter notebook and jupyterlab.

Anyone interested in taking a look at this?

bmcfee avatar Feb 21 '18 22:02 bmcfee

Looked into this: the problem is that jupyterlab no longer uses bootstrap, so the CSS classes we used for rendering JAMS objects in juypter notebook are now missing; specifically panels and panel-groups.

This is related to these threads: https://github.com/jupyterlab/jupyterlab/issues/3200 https://github.com/jupyterlab/jupyterlab/issues/2693 . It sounds like the jupyter folks want to expose some common CSS classes for this sort of thing, but it's unclear whether that would include enough functionality to get the nesting/expansion behavior we use currently.

bmcfee avatar May 05 '18 15:05 bmcfee

I think we should hold off on fixing this. Jupyterlab seems to be a bit in flux about supporting styled outputs, so any fix we do in the short term would need to be revisited down the road anyway.

Going forward, I think a better long-term solution would be the following:

  • Implement #178
  • Write #19 as a jupyterlab extension along the lines of https://github.com/altair-viz/jupyterlab_voyager .
  • If possible, implement a magic that would let us directly leverage the jams extension to render the jams object (or any sub-components) through the extension, rather than reimplementing it in the library.

The above is generally blocked by jams 0.4 (at least) and jupyterlab 1.0, so we can punt it for now.

bmcfee avatar Jun 01 '18 14:06 bmcfee

For a quicker solution, we could do like xarray and just bundle our own CSS. This is probably the easiest and most reliable path forward.

bmcfee avatar Dec 01 '19 22:12 bmcfee