jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
14.19k stars 3.39k forks source link

JupyterLab MDI, notebooks can affect the output cells of other notebooks when you use HTML & Element IDs #13381

Open mcrutch opened 2 years ago

mcrutch commented 2 years ago

Description

Related to https://github.com/jupyter/notebook/issues/6598 but in JupyterLab. Rather than two cells in the same notebook, one notebook affects the DOM of the other notebook since they aren't self-contained in their own iframes

Reproduce

Notebook 1

from IPython.display import HTML 
HTML("<div id='output'>Loading...</div><script type='text/javascript'>document.getElementById('output').innerText='Changed this output from notebook 1';</script>")

Notebook 2

from IPython.display import HTML 
HTML("<div id='output'>Loading...</div><script type='text/javascript'>document.getElementById('output').innerText='Changed this output from notebook 2';</script>")

image

Expected behavior

I feel like each notebook in the MDI should be treated as it's own autonomous object (via iframe or some other way) rather than being treated as a part of the larger DOM of JuptyerLab. A user using DOM manipulation to make a fancy display in a notebook works fine in Notebook v6, Notebook v7 or the SDI/Simple view of JupyterLab, it doesn't work in JupyterLab in the MDI if multiple notebooks are open that use the same Element ID.

Now, I personally think it is a horribly way to go about things, but I feel like the Lab MDI should act the same as all of the single document interface in this regard. (I also feel like the way it is done in Notebook v6/v7/Lab Simple interface is the right way, but still just my opinion)

Just wanted to document this because I thought about this use case when I saw that other ticket on Notebook and wondered how it would act on JupyterLab.

Context

Troubleshoot Output
$PATH:
        //anaconda3/envs/jupyterlab/bin
        //anaconda3/condabin
        //.local/bin
        /usr/local/sbin
        /usr/local/bin
        /usr/sbin
        /usr/bin
        /sbin
        /bin
        /usr/games
        /usr/local/games
        /snap/bin

sys.path:
        //anaconda3/envs/jupyterlab/bin
        //anaconda3/envs/jupyterlab/lib/python310.zip
        //anaconda3/envs/jupyterlab/lib/python3.10
        //anaconda3/envs/jupyterlab/lib/python3.10/lib-dynload
        //.local/lib/python3.10/site-packages
        //anaconda3/envs/jupyterlab/lib/python3.10/site-packages
        //notebook

sys.executable:
        //anaconda3/envs/jupyterlab/bin/python

sys.version:
        3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:35:26) [GCC 10.4.0]

platform.platform():
        Linux-5.15.0-1019-aws-x86_64-with-glibc2.31

which -a jupyter:
        //anaconda3/envs/jupyterlab/bin/jupyter
        //.local/bin/jupyter

pip list:
        Package                       Version     Editable project location
        ----------------------------- ----------- -------------------------
        aiofiles                      0.8.0
        aiosqlite                     0.17.0
        anyio                         3.6.1
        argon2-cffi                   21.3.0
        argon2-cffi-bindings          21.2.0
        asttokens                     2.0.8
        async-lru                     1.0.3
        attrs                         22.1.0
        Babel                         2.10.3
        backcall                      0.2.0
        backports.functools-lru-cache 1.6.4
        beautifulsoup4                4.11.1
        bleach                        5.0.1
        brotlipy                      0.7.0
        certifi                       2022.9.24
        cffi                          1.15.1
        cfgv                          3.3.1
        charset-normalizer            2.1.1
        cryptography                  38.0.2
        debugpy                       1.6.3
        decorator                     5.1.1
        defusedxml                    0.7.1
        deprecation                   2.1.0
        distlib                       0.3.6
        docutils                      0.19
        entrypoints                   0.4
        executing                     1.1.1
        fastjsonschema                2.16.2
        filelock                      3.8.0
        flit_core                     3.7.1
        html5lib                      1.1
        identify                      2.5.8
        idna                          3.4
        importlib-metadata            4.11.4
        importlib-resources           5.10.0
        iniconfig                     1.1.1
        ipydeps                       2020.240.0
        ipykernel                     6.16.0
        ipython                       8.5.0
        ipython-genutils              0.2.0
        ipywidgets                    7.5.1
        jedi                          0.18.1
        Jinja2                        3.1.2
        json5                         0.9.5
        jsonschema                    4.16.0
        jupyter_client                7.4.1
        jupyter_core                  4.11.1
        jupyter-lsp                   1.5.1
        jupyter-nbgallery             2.0.0
        jupyter_packaging             0.12.3
        jupyter-server                1.21.0
        jupyter_server_ydoc           0.1.14
        jupyter-ydoc                  0.2.2
        jupyterlab                    4.0.0a30
        jupyterlab-nbgallery          1.0.5
        jupyterlab-pygments           0.2.2
        jupyterlab_server             2.16.0
        jupyterlab-widgets            3.0.3
        MarkupSafe                    2.1.1
        matplotlib-inline             0.1.6
        mistune                       2.0.4
        nbclassic                     0.4.7
        nbclient                      0.7.0
        nbconvert                     7.2.3
        nbformat                      5.7.0
        nest-asyncio                  1.5.6
        nodeenv                       1.7.0
        notebook                      7.0.0a7     //notebook
        notebook-shim                 0.1.0
        packaging                     21.3
        pandocfilters                 1.5.0
        parso                         0.8.3
        pexpect                       4.8.0
        pickleshare                   0.7.5
        pip                           22.3
        pkgutil_resolve_name          1.3.10
        platformdirs                  2.5.2
        pluggy                        1.0.0
        pre-commit                    2.20.0
        prometheus-client             0.15.0
        prompt-toolkit                3.0.31
        psutil                        5.9.2
        ptyprocess                    0.7.0
        pure-eval                     0.2.2
        py                            1.11.0
        pycparser                     2.21
        Pygments                      2.13.0
        pyOpenSSL                     22.1.0
        pyparsing                     3.0.9
        pypki2                        0.11.0
        pyrsistent                    0.18.1
        PySocks                       1.7.1
        pytest                        7.1.3
        pytest-check-links            0.7.1
        python-dateutil               2.8.2
        pytz                          2022.4
        PyYAML                        6.0
        pyzmq                         24.0.1
        requests                      2.28.1
        Send2Trash                    1.8.0
        setuptools                    65.5.0
        six                           1.16.0
        sniffio                       1.3.0
        soupsieve                     2.3.2.post1
        stack-data                    0.5.1
        terminado                     0.16.0
        tinycss2                      1.1.1
        toml                          0.10.2
        tomli                         2.0.1
        tomlkit                       0.11.5
        tornado                       6.2
        traitlets                     5.4.0
        typing_extensions             4.4.0
        urllib3                       1.26.11
        virtualenv                    20.16.6
        voila                         0.4.0
        voila-material                0.4.1
        voila-nbgallery               0.0.4
        wcwidth                       0.2.5
        webencodings                  0.5.1
        websocket-client              1.4.1
        websockets                    10.4
        wheel                         0.37.1
        widgetsnbextension            3.5.2
        y-py                          0.5.4
        ypy-websocket                 0.3.2
        zipp                          3.9.0

conda list:
        # packages in environment at //anaconda3/envs/jupyterlab:
        #
        # Name                    Version                   Build  Channel
        _libgcc_mutex             0.1                 conda_forge    conda-forge
        _openmp_mutex             4.5                       2_gnu    conda-forge
        aiofiles                  0.8.0                    pypi_0    pypi
        aiosqlite                 0.17.0                   pypi_0    pypi
        anyio                     3.6.1              pyhd8ed1ab_1    conda-forge
        argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
        argon2-cffi-bindings      21.2.0          py310h5764c6d_2    conda-forge
        asttokens                 2.0.8              pyhd8ed1ab_0    conda-forge
        async-lru                 1.0.3                    pypi_0    pypi
        attrs                     22.1.0             pyh71513ae_1    conda-forge
        babel                     2.10.3             pyhd8ed1ab_0    conda-forge
        backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
        backports                 1.0                        py_2    conda-forge
        backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
        beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
        bleach                    5.0.1              pyhd8ed1ab_0    conda-forge
        brotlipy                  0.7.0           py310h5764c6d_1004    conda-forge
        bzip2                     1.0.8                h7f98852_4    conda-forge
        ca-certificates           2022.9.24            ha878542_0    conda-forge
        certifi                   2022.9.24          pyhd8ed1ab_0    conda-forge
        cffi                      1.15.1          py310h255011f_0    conda-forge
        cfgv                      3.3.1                    pypi_0    pypi
        charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
        cryptography              38.0.2          py310h597c629_0    conda-forge
        debugpy                   1.6.3           py310hd8f1fbe_0    conda-forge
        decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
        defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
        deprecation               2.1.0              pyh9f0ad1d_0    conda-forge
        distlib                   0.3.6                    pypi_0    pypi
        docutils                  0.19            py310hff52083_0    conda-forge
        entrypoints               0.4                pyhd8ed1ab_0    conda-forge
        executing                 1.1.1              pyhd8ed1ab_0    conda-forge
        filelock                  3.8.0                    pypi_0    pypi
        flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
        html5lib                  1.1                pyh9f0ad1d_0    conda-forge
        icu                       70.1                 h27087fc_0    conda-forge
        identify                  2.5.8                    pypi_0    pypi
        idna                      3.4                pyhd8ed1ab_0    conda-forge
        importlib-metadata        4.11.4          py310hff52083_0    conda-forge
        importlib_resources       5.10.0             pyhd8ed1ab_0    conda-forge
        iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
        ipydeps                   2020.240.0               pypi_0    pypi
        ipykernel                 6.16.0             pyh210e3f2_0    conda-forge
        ipython                   8.5.0              pyh41d4057_1    conda-forge
        ipython_genutils          0.2.0                      py_1    conda-forge
        ipywidgets                7.5.1                    pypi_0    pypi
        jedi                      0.18.1             pyhd8ed1ab_2    conda-forge
        jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
        json5                     0.9.5              pyh9f0ad1d_0    conda-forge
        jsonschema                4.16.0             pyhd8ed1ab_0    conda-forge
        jupyter-client            7.4.1                    pypi_0    pypi
        jupyter-lsp               1.5.1                    pypi_0    pypi
        jupyter-nbgallery         2.0.0                    pypi_0    pypi
        jupyter-packaging         0.12.3             pyha770c72_0    conda-forge
        jupyter-server-ydoc       0.1.14                   pypi_0    pypi
        jupyter-ydoc              0.2.2                    pypi_0    pypi
        jupyter_core              4.11.1          py310hff52083_0    conda-forge
        jupyter_server            1.21.0             pyhd8ed1ab_0    conda-forge
        jupyterlab                4.0.0a30                 pypi_0    pypi
        jupyterlab-nbgallery      1.0.5                    pypi_0    pypi
        jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
        jupyterlab_server         2.16.0             pyhd8ed1ab_0    conda-forge
        ld_impl_linux-64          2.39                 hc81fddc_0    conda-forge
        libffi                    3.4.2                h7f98852_5    conda-forge
        libgcc-ng                 12.2.0              h65d4601_18    conda-forge
        libgomp                   12.2.0              h65d4601_18    conda-forge
        libnsl                    2.0.0                h7f98852_0    conda-forge
        libsodium                 1.0.18               h36c2ea0_1    conda-forge
        libsqlite                 3.39.4               h753d276_0    conda-forge
        libstdcxx-ng              12.2.0              h46fd767_18    conda-forge
        libuuid                   2.32.1            h7f98852_1000    conda-forge
        libuv                     1.44.2               h166bdaf_0    conda-forge
        libzlib                   1.2.13               h166bdaf_4    conda-forge
        markupsafe                2.1.1           py310h5764c6d_1    conda-forge
        matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
        mistune                   2.0.4              pyhd8ed1ab_0    conda-forge
        nbclassic                 0.4.7                    pypi_0    pypi
        nbclient                  0.7.0              pyhd8ed1ab_0    conda-forge
        nbconvert                 7.2.3                    pypi_0    pypi
        nbconvert-pandoc          7.2.1              pyhd8ed1ab_0    conda-forge
        nbformat                  5.7.0              pyhd8ed1ab_0    conda-forge
        ncurses                   6.3                  h27087fc_1    conda-forge
        nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
        nodeenv                   1.7.0                    pypi_0    pypi
        nodejs                    16.17.1              h96d913c_0    conda-forge
        notebook                  7.0.0a7                  pypi_0    pypi
        notebook-shim             0.1.0              pyhd8ed1ab_0    conda-forge
        openssl                   1.1.1q               h166bdaf_0    conda-forge
        packaging                 21.3               pyhd8ed1ab_0    conda-forge
        pandoc                    2.19.2               ha770c72_0    conda-forge
        pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
        parso                     0.8.3              pyhd8ed1ab_0    conda-forge
        pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
        pickleshare               0.7.5                   py_1003    conda-forge
        pip                       22.3               pyhd8ed1ab_0    conda-forge
        pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
        platformdirs              2.5.2                    pypi_0    pypi
        pluggy                    1.0.0           py310hff52083_3    conda-forge
        pre-commit                2.20.0                   pypi_0    pypi
        prometheus_client         0.15.0             pyhd8ed1ab_0    conda-forge
        prompt-toolkit            3.0.31             pyha770c72_0    conda-forge
        psutil                    5.9.2           py310h5764c6d_0    conda-forge
        ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
        pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
        py                        1.11.0             pyh6c4a22f_0    conda-forge
        pycparser                 2.21               pyhd8ed1ab_0    conda-forge
        pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
        pyopenssl                 22.1.0             pyhd8ed1ab_0    conda-forge
        pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
        pypki2                    0.11.0                   pypi_0    pypi
        pyrsistent                0.18.1          py310h5764c6d_1    conda-forge
        pysocks                   1.7.1              pyha2e5f31_6    conda-forge
        pytest                    7.1.3           py310hff52083_0    conda-forge
        pytest-check-links        0.7.1              pyhd8ed1ab_0    conda-forge
        python                    3.10.6          h582c2e5_0_cpython    conda-forge
        python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
        python-fastjsonschema     2.16.2             pyhd8ed1ab_0    conda-forge
        python_abi                3.10                    2_cp310    conda-forge
        pytz                      2022.4             pyhd8ed1ab_0    conda-forge
        pyyaml                    6.0                      pypi_0    pypi
        pyzmq                     24.0.1          py310h330234f_0    conda-forge
        readline                  8.1.2                h0f457ee_0    conda-forge
        requests                  2.28.1             pyhd8ed1ab_1    conda-forge
        send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
        setuptools                65.5.0             pyhd8ed1ab_0    conda-forge
        six                       1.16.0             pyh6c4a22f_0    conda-forge
        sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
        soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
        stack_data                0.5.1              pyhd8ed1ab_0    conda-forge
        terminado                 0.16.0             pyh41d4057_0    conda-forge
        tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
        tk                        8.6.12               h27826a3_0    conda-forge
        toml                      0.10.2                   pypi_0    pypi
        tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
        tomlkit                   0.11.5             pyha770c72_0    conda-forge
        tornado                   6.2             py310h5764c6d_0    conda-forge
        traitlets                 5.4.0              pyhd8ed1ab_0    conda-forge
        typing                    3.10.0.0           pyhd8ed1ab_0    conda-forge
        typing_extensions         4.4.0              pyha770c72_0    conda-forge
        tzdata                    2022e                h191b570_0    conda-forge
        urllib3                   1.26.11            pyhd8ed1ab_0    conda-forge
        virtualenv                20.16.6                  pypi_0    pypi
        voila                     0.4.0                    pypi_0    pypi
        voila-material            0.4.1                    pypi_0    pypi
        voila-nbgallery           0.0.4                    pypi_0    pypi
        wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
        webencodings              0.5.1                      py_1    conda-forge
        websocket-client          1.4.1              pyhd8ed1ab_0    conda-forge
        websockets                10.4                     pypi_0    pypi
        wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
        widgetsnbextension        3.5.2                    pypi_0    pypi
        xz                        5.2.6                h166bdaf_0    conda-forge
        y-py                      0.5.4                    pypi_0    pypi
        yarn                      1.22.19              ha770c72_0    conda-forge
        ypy-websocket             0.3.2                    pypi_0    pypi
        zeromq                    4.3.4                h9c3ff4c_1    conda-forge
        zipp                      3.9.0              pyhd8ed1ab_0    conda-forge
        zlib                      1.2.13               h166bdaf_4    conda-forge

conda env:
        name: jupyterlab
        channels:
          - conda-forge
          - defaults
        dependencies:
          - _libgcc_mutex=0.1=conda_forge
          - _openmp_mutex=4.5=2_gnu
          - anyio=3.6.1=pyhd8ed1ab_1
          - argon2-cffi=21.3.0=pyhd8ed1ab_0
          - argon2-cffi-bindings=21.2.0=py310h5764c6d_2
          - asttokens=2.0.8=pyhd8ed1ab_0
          - attrs=22.1.0=pyh71513ae_1
          - babel=2.10.3=pyhd8ed1ab_0
          - backcall=0.2.0=pyh9f0ad1d_0
          - backports=1.0=py_2
          - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
          - beautifulsoup4=4.11.1=pyha770c72_0
          - bleach=5.0.1=pyhd8ed1ab_0
          - brotlipy=0.7.0=py310h5764c6d_1004
          - bzip2=1.0.8=h7f98852_4
          - ca-certificates=2022.9.24=ha878542_0
          - certifi=2022.9.24=pyhd8ed1ab_0
          - cffi=1.15.1=py310h255011f_0
          - charset-normalizer=2.1.1=pyhd8ed1ab_0
          - cryptography=38.0.2=py310h597c629_0
          - debugpy=1.6.3=py310hd8f1fbe_0
          - decorator=5.1.1=pyhd8ed1ab_0
          - defusedxml=0.7.1=pyhd8ed1ab_0
          - deprecation=2.1.0=pyh9f0ad1d_0
          - docutils=0.19=py310hff52083_0
          - entrypoints=0.4=pyhd8ed1ab_0
          - executing=1.1.1=pyhd8ed1ab_0
          - flit-core=3.7.1=pyhd8ed1ab_0
          - html5lib=1.1=pyh9f0ad1d_0
          - icu=70.1=h27087fc_0
          - idna=3.4=pyhd8ed1ab_0
          - importlib-metadata=4.11.4=py310hff52083_0
          - importlib_resources=5.10.0=pyhd8ed1ab_0
          - iniconfig=1.1.1=pyh9f0ad1d_0
          - ipykernel=6.16.0=pyh210e3f2_0
          - ipython=8.5.0=pyh41d4057_1
          - ipython_genutils=0.2.0=py_1
          - jedi=0.18.1=pyhd8ed1ab_2
          - jinja2=3.1.2=pyhd8ed1ab_1
          - json5=0.9.5=pyh9f0ad1d_0
          - jsonschema=4.16.0=pyhd8ed1ab_0
          - jupyter-packaging=0.12.3=pyha770c72_0
          - jupyter_core=4.11.1=py310hff52083_0
          - jupyter_server=1.21.0=pyhd8ed1ab_0
          - jupyterlab_pygments=0.2.2=pyhd8ed1ab_0
          - jupyterlab_server=2.16.0=pyhd8ed1ab_0
          - ld_impl_linux-64=2.39=hc81fddc_0
          - libffi=3.4.2=h7f98852_5
          - libgcc-ng=12.2.0=h65d4601_18
          - libgomp=12.2.0=h65d4601_18
          - libnsl=2.0.0=h7f98852_0
          - libsodium=1.0.18=h36c2ea0_1
          - libsqlite=3.39.4=h753d276_0
          - libstdcxx-ng=12.2.0=h46fd767_18
          - libuuid=2.32.1=h7f98852_1000
          - libuv=1.44.2=h166bdaf_0
          - libzlib=1.2.13=h166bdaf_4
          - markupsafe=2.1.1=py310h5764c6d_1
          - matplotlib-inline=0.1.6=pyhd8ed1ab_0
          - mistune=2.0.4=pyhd8ed1ab_0
          - nbclient=0.7.0=pyhd8ed1ab_0
          - nbconvert-pandoc=7.2.1=pyhd8ed1ab_0
          - nbformat=5.7.0=pyhd8ed1ab_0
          - ncurses=6.3=h27087fc_1
          - nest-asyncio=1.5.6=pyhd8ed1ab_0
          - nodejs=16.17.1=h96d913c_0
          - notebook-shim=0.1.0=pyhd8ed1ab_0
          - openssl=1.1.1q=h166bdaf_0
          - packaging=21.3=pyhd8ed1ab_0
          - pandoc=2.19.2=ha770c72_0
          - pandocfilters=1.5.0=pyhd8ed1ab_0
          - parso=0.8.3=pyhd8ed1ab_0
          - pexpect=4.8.0=pyh9f0ad1d_2
          - pickleshare=0.7.5=py_1003
          - pip=22.3=pyhd8ed1ab_0
          - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_0
          - pluggy=1.0.0=py310hff52083_3
          - prometheus_client=0.15.0=pyhd8ed1ab_0
          - prompt-toolkit=3.0.31=pyha770c72_0
          - psutil=5.9.2=py310h5764c6d_0
          - ptyprocess=0.7.0=pyhd3deb0d_0
          - pure_eval=0.2.2=pyhd8ed1ab_0
          - py=1.11.0=pyh6c4a22f_0
          - pycparser=2.21=pyhd8ed1ab_0
          - pygments=2.13.0=pyhd8ed1ab_0
          - pyopenssl=22.1.0=pyhd8ed1ab_0
          - pyparsing=3.0.9=pyhd8ed1ab_0
          - pyrsistent=0.18.1=py310h5764c6d_1
          - pysocks=1.7.1=pyha2e5f31_6
          - pytest=7.1.3=py310hff52083_0
          - pytest-check-links=0.7.1=pyhd8ed1ab_0
          - python=3.10.6=h582c2e5_0_cpython
          - python-dateutil=2.8.2=pyhd8ed1ab_0
          - python-fastjsonschema=2.16.2=pyhd8ed1ab_0
          - python_abi=3.10=2_cp310
          - pytz=2022.4=pyhd8ed1ab_0
          - pyzmq=24.0.1=py310h330234f_0
          - readline=8.1.2=h0f457ee_0
          - requests=2.28.1=pyhd8ed1ab_1
          - send2trash=1.8.0=pyhd8ed1ab_0
          - setuptools=65.5.0=pyhd8ed1ab_0
          - six=1.16.0=pyh6c4a22f_0
          - sniffio=1.3.0=pyhd8ed1ab_0
          - soupsieve=2.3.2.post1=pyhd8ed1ab_0
          - stack_data=0.5.1=pyhd8ed1ab_0
          - terminado=0.16.0=pyh41d4057_0
          - tinycss2=1.1.1=pyhd8ed1ab_0
          - tk=8.6.12=h27826a3_0
          - tomli=2.0.1=pyhd8ed1ab_0
          - tomlkit=0.11.5=pyha770c72_0
          - tornado=6.2=py310h5764c6d_0
          - traitlets=5.4.0=pyhd8ed1ab_0
          - typing=3.10.0.0=pyhd8ed1ab_0
          - typing_extensions=4.4.0=pyha770c72_0
          - tzdata=2022e=h191b570_0
          - urllib3=1.26.11=pyhd8ed1ab_0
          - wcwidth=0.2.5=pyh9f0ad1d_2
          - webencodings=0.5.1=py_1
          - websocket-client=1.4.1=pyhd8ed1ab_0
          - wheel=0.37.1=pyhd8ed1ab_0
          - xz=5.2.6=h166bdaf_0
          - yarn=1.22.19=ha770c72_0
          - zeromq=4.3.4=h9c3ff4c_1
          - zipp=3.9.0=pyhd8ed1ab_0
          - zlib=1.2.13=h166bdaf_4
          - pip:
            - aiofiles==0.8.0
            - aiosqlite==0.17.0
            - async-lru==1.0.3
            - cfgv==3.3.1
            - distlib==0.3.6
            - filelock==3.8.0
            - identify==2.5.8
            - ipydeps==2020.240.0
            - ipywidgets==7.5.1
            - jupyter-client==7.4.1
            - jupyter-lsp==1.5.1
            - jupyter-nbgallery==2.0.0
            - jupyter-server-ydoc==0.1.14
            - jupyter-ydoc==0.2.2
            - jupyterlab==4.0.0a30
            - jupyterlab-nbgallery==1.0.5
            - nbclassic==0.4.7
            - nbconvert==7.2.3
            - nodeenv==1.7.0
            - notebook==7.0.0a7
            - platformdirs==2.5.2
            - pre-commit==2.20.0
            - pypki2==0.11.0
            - pyyaml==6.0
            - toml==0.10.2
            - virtualenv==20.16.6
            - voila==0.4.0
            - voila-material==0.4.1
            - voila-nbgallery==0.0.4
            - websockets==10.4
            - widgetsnbextension==3.5.2
            - y-py==0.5.4
            - ypy-websocket==0.3.2
        prefix: //anaconda3/envs/jupyterlab
Command Line Output
jupyter lab
Browser Output
Paste the output from your browser Javascript console here, if applicable.

welcome[bot] commented 2 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

krassowski commented 2 years ago

Thank you for checking the behaviour in JupyterLab. An alternative to iframes would be to attach main area widgets using closed shadow DOM (https://github.com/jupyterlab/lumino/issues/434). This is more likely to happen than encapsulation of individual outputs (by default) discussed in the linked notebook issues because it would not break most of the notebooks available out in the wild.

JasonWeill commented 2 years ago

Triage notes: Currently, JupyterLab is not designed to have ID elements be isolated to one view. Reclassifying this as an enhancement. This would require us to do a substantial amount of reorganization to get this to work. Thank you for your contribution!