Add an option to open the Notebook UI and Voici apps in a new tab via theNotebookLite
and Voici
directives
#223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements #165, but for the Notebook UI and the Voici interface, which come to life via the
..notebooklite::
and.. voici::
directives and notebooks can now be opened in a separate tab instead of within the documentation website. With it, we also receive the added benefit of a smaller button for both directives IFrames, instead of a larger-sized, framed 400px window element on the screen.Rationale
When running a notebook, the
JupyterLite
interface displays the entire JupyterLite Lab interface. The ability to use the Notebook UI in a new tab would be useful because it is more minimal and designed for those who do not need to display all the notebooks in the file browser drawer, need access to several other options, etc.Unlike in JupyterLab, the "Simple Interface" has not yet been directly implemented in JupyterLite (please see jupyterlite/jupyterlite#385). Thus, this change will allow us to offer a reasonable substitute for it at the time, and bring parity between both notebook interface spawners.
The
Voici
directive can currently open notebook files if a notebook is not supplied to it. However, it, too, occupies a lot of space and one has to first load Voici and then open a notebook. By adding a "new tab" button, we have the provision to skip this step and open the notebook directly, and save space on the screen similar to the "-Lite" directives. This brings parity between all three major directives (the Replite console is not relevant here).Changes made
JupyterLite
andNotebookLite
directives:new_tab:
option for theNotebookLite
directive and clarified the difference between both directive's "new tab" options:new_tab:
option for theVoici
directiveAdditional context
After this change, the NotebookLite directive can be used in place of the JupyterLite directive for many of SciPy's interactive notebooks under
scipy.stats
: https://scipy.github.io/devdocs/tutorial/stats/hypothesis_tests.html, so that a notebook, when opened in a new tab, can occupy the full width on the screen (and distracting elements such as other notebooks in the UI and extra buttons can also be reduced).cc: @melissawm, @steppi