jupyterlab-interactive-dashboard-editor icon indicating copy to clipboard operation
jupyterlab-interactive-dashboard-editor copied to clipboard

Added Voilà templates and multi-dashboard support

Open cameron-toy opened this issue 4 years ago • 0 comments

What's new

  • Added support for multiple embedded dashboards. To embed a dashboard in notebook metadata, create a dashboard then right-click -> Save Notebook To Notebook Metadata and choose a dashboard name. To load a dashboard, right-click on a notebook and select Open Metadata Dashboard and choose a dashboard from the list.
  • Added the presto template to serve embedded dashboards with Voilà. If you already have Voilà, installing the extension with pip install . -e should add the template, and running Voilà with --template=presto should use the new template. A dashboard besides default can be served by specifying the name or id of the dashboard with --VoilaConfiguration.resources='{"presto": {"dashboardName": "[DASHBOARD_NAME]"}}' or --VoilaConfiguration.resources='{"presto": {"dashboardId": "[DASHBOARD_ID" }}'.
  • "snap-to-grid" widget positions are described in terms of cells (4 cells wide, 2 cells tall, etc) in the metadata schema.
  • Dashboards now only automatically expand vertically and default width/height are determined by screen dimensions.

Fixed

  • Actually fixed the issue with widgets overflowing their container on the dashboard.
  • Bumping selected widgets with arrow keys now actually works.

Todo/issues

  • The drop-down selector for choosing which embedded dashboard to open is partially cut off. Seems like this could be a JupyterLab issue but I'll investigate a bit more before making an issue report. EDIT: this seems to be a Safari-specific issue.
image
  • Looking into ways to scale cell/dashboard sizes to fit different-sized monitors in Voilà.
  • Starting de-coupling of dashboards from notebooks in JupyterLab #103
  • Make parsing notebook metadata type-safe. Right now I'm getting the JSON as any and putting eslint-disabless on certain lines so I can cast the JSON to Object and check for certain keys which seems.... bad. So that's something that should be fixed in the next commit.

cameron-toy avatar Feb 26 '21 21:02 cameron-toy