Voila: Notebook extensions not working in voila frontend?

Created on 24 Oct 2018  路  6Comments  路  Source: voila-dashboards/voila

Hi all,

I've been enjoying voila so far for rendering widgets as websites.

One issue I'm having is I seemingly can't use a notebook extension I use in a widget.

Specifically, my widget superintendent uses ipyevents for capturing keyboard keystrokes. ipyevents provites a jupyter extension that can capture keystrokes.

While it works in a notebook, it doesn't work when presenting that notebook using voila.

Example:

pip install git+https://github.com/janfreyberg/superintendent.git
jupyter nbextension enable --py --sys-prefix ipyevents
from superintendent import SemiSupervisor
import numpy as np

SemiSupervisor(
   features=np.random.randint(10, shape=(10, 3)),
   options=range(10),
   keyboard_shortcuts=True
)

This should allow the user to press e.g. the "1" key to label a row as 1, but this doesn't work in voila.

Is this intentional? Is there a workaround?

Most helpful comment

@mwcraig can confirm that it works with the latest version of ipyevents! Thanks for sorting this so quickly.

All 6 comments

Hey @janfreyberg sorry for the late reply. I could troubleshoot your issue

  • there was a minor bug in ipyevents which I am fixing here: https://github.com/mwcraig/ipyevents/pull/28. The specified frontend version, which is not used in the classic notebook (only in jupyterlab and in web embedding contexts) was not up to date.
  • I could check locally and it appears to be working.

superintendent

Closing as I am doing triage. Let me know if you have any other question.

Amazing, thanks for looking into this!

@janfreyberg -- I just put ipyevents 0.3.2 on pypi and 1.3.2 on npm. Could you please try updating? If it doesn't work please open an issue at https://github.com/mwcraig/ipyevents/issues

I'll get the conda-forge package updated later today.

@mwcraig can confirm that it works with the latest version of ipyevents! Thanks for sorting this so quickly.

馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

choldgraf picture choldgraf  路  8Comments

laserman781 picture laserman781  路  3Comments

paugier picture paugier  路  6Comments

pingme998 picture pingme998  路  5Comments

cornhundred picture cornhundred  路  4Comments