jupyter-widgets / jupyterlab-sidecar

A sidecar output widget for JupyterLab
BSD 3-Clause "New" or "Revised" License
252 stars 39 forks source link

Fill height of sidecar with HTML widget #113

Open banesullivan-kobold opened 2 months ago

banesullivan-kobold commented 2 months ago

Is it possible to fill the full height of the Sidecar output with any arbitrary ipywidget? I noticed ipyleaflet is handled incredibly well -- having a reasonable min-height in a standard cell output but filling the full Sidecar height

from IPython.display import display, IFrame
from sidecar import Sidecar
from ipywidgets.widgets import HTML

Sidecar.close_all()

with Sidecar(title="IFrame"):
    display(IFrame("https://www.jupyter.org/", "100%", "100%"))

with Sidecar(title="HTML"):
    display(HTML('<iframe src="https://www.jupyter.org/" style="width: 100%; height: 100%;"></iframe>'))
IFrame HTML
Screenshot 2024-09-05 at 4 11 11 PM Screenshot 2024-09-05 at 4 11 15 PM

Why? I'm trying to render other widget types like PyVista's (which is an HTML widget under the hood) or arbitrary Panel panes