Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Voilà templates and multi-dashboard support #116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cameron-toy
Copy link
Collaborator

@cameron-toy cameron-toy commented Feb 26, 2021

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 See widgets without having the notebook open #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant