Render dynamic content in Jupyter Notebooks
Why
Users can see rendered versions of Jupyter Notebooks when opening them on GitLab, but only as static content. Jupyter notebook can also render interactive elements, like plots and maps, that allow for a richer experience, and libraries like plotly and altair are commonly used for that
Example:
- Expected: dynamic content rendered as nbviewer https://nbviewer.org/urls/gitlab.com/gitlab-org/incubation-engineering/mlops/ipynb-test-projects/jupyter_table_test/-/raw/main/interactive_3.ipynb
- Current: https://gitlab.com/gitlab-org/incubation-engineering/mlops/ipynb-test-projects/jupyter_table_test/-/blob/main/interactive_3.ipynb
Docs: https://docs.gitlab.com/ee/user/project/repository/jupyter_notebooks/
Feature proposal
Render embedded dynamic content of Jupyter notebooks.
This will not run the python content that generated the image, only what is already embedded into the Jupyter file.
Security concerns
Executing user created javascript within the context of GitLab can be dangerous, as we've already experienced in the past. A common solution to this problem is to serve this content from an iframe that uses a different url (eg usercontent.gitlab.com), which would block interactions with the rest of the GitLab page.