Package: voila-gridstack
voila-gridstackA gridstack-based template for.Gitter channelVoilaJupyterLab extensionInstallationvoila-gridstackcan be installed with the mamba package managermamba install -c conda-forge voila-gridstackor from PyPIpip install voila-gridstackFormatThe template uses metadata defined in the notebook file (.ipynb) to configure the layout.
The specification of the metadata was defined by a now defunct projectjupyter-dashboards.
The specification is described injupyter-dashboardsdocs.The voila renderer behaves as a "display-only renderer without authoring capabilitiy" as defined in
the specs. However, there are a few differences compared to the original implmentation:if no metadata is found in the notebook voilà will render the notebook asgridlayout,it can not persist the state of the cells (i.e. the re-configuration of the layout will
be lost, when the user closes the voila page),if the cell does not contain view configuration for the particular view type (gridorreport) orhiddenattribute is not defined, voilà will treat it asvisible.UsageTo use thegridstacktemplate, pass option--template=gridstackto thevoilacommand line.By default the position of cells in the dashboard will be fixed. If you want them to be draggable
and resizable, you can launch voila with theshow_handlesresource set toTrue:voila --template=gridstack examples/ --VoilaConfiguration.resources="{'gridstack': {'show_handles': True}}"Note, however, that the state of the dashboard can not be persisted in the notebook.You can change the color scheme using thethemeresource:voila examples/ --template=gridstack --theme=darkDevelopmentTo install the template from source:# create a new `conda` environmentcondacreate-nvoila-gridstack-cconda-forgenotebookpython# activate the environmentcondaactivatevoila-gridstack# install the package in development modepython-mpipinstall-e.# start voila with the gridstack templatevoila--template=gridstackClassic Notebook Extensionvoila-gridstackprovides an extension for the classic notebook to edit the gridstack layout from the notebook interface.To install this extension in development mode:# activate the environmentcondaactivatevoila-gridstack# link the local filesjupyternbextensioninstall--sys-prefix--symlink--overwrite--pyvoila_gridstack# enable the extensionjupyternbextensionenable--sys-prefix--pyvoila_gridstack# check the extension is installed and enabledjupyternbextensionlist# start the notebookjupyternotebookThen edit the files invoila-gridstack/staticand reload the page to see the changes.JupyterLab ExtensionNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# activate the environmentcondaactivatevoila-gridstack# install JupyterLabmambainstall-cconda-forgejupyterlab# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension TypeScript source after making changesjlpmrunbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmrunwatch# Run JupyterLab in another terminaljupyterlabLicenseWe use a shared copyright model that enables all contributors to maintain the
copyright on their contributions.This software is licensed under the BSD-3-Clause license. See theLICENSEfile for details.