Investigate more immersive integration of interactive API examples, inspired by sphinx-thebe
#242
Labels
enhancement
New feature or request
sphinx-thebe
#242
Problem
The
TryExamples
directive currently reveals an iframe from a "Try it" button to showcase notebooks for a Pyodide kernel, which then displays the Notebook interface containing the example formatted in a cell with surrounding Markdown. While it is completely functional—of course—it is not "immersive" and does not fully integrate with the rest of the surrounding elements on the docs page.Proposed Solution
Enable connecting to a Xeus/Pyodide kernel more seamlessly, in a way that is less intrusive on the page, by reworking the UI similar to this example from the
sphinx-thebe
documentation: https://sphinx-thebe.readthedocs.io/en/latest/use.html#an-example.It can be used as a "MyST-NB" adapter of sorts as well, so that one does not need to open a new tab to run a notebook embedded as HTML separately – they can just connect to a kernel (which, by the way, is a single one for all cells on the page, see #2), and magically spring up the notebook cells into interactivity without leaving the page.
This would require a significant amount of work, around:
Additional context
sphinx-thebelab
extension? executablebooks/meta#68sphinx-thebe
connects to a kernel hosted via Binder instead of WASM kernels, and maybe it's possible to implement support for it there rather than here (I don't know at this time).xref: jupyterlite/jupyterlite#148 and #63
The text was updated successfully, but these errors were encountered: