-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Inlined build for perspective-jupyterlab, improve PerspectiveWidget #1466
Conversation
…ake methods on psp_widget async
@@ -27,7 +27,7 @@ module.exports = { | |||
maxEntrypointSize: 512000, | |||
maxAssetSize: 512000 | |||
}, | |||
externals: [/^([a-z0-9]|@(?!finos\/perspective-viewer))/], | |||
externals: [/\@jupyter|\@lumino/], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this include jupyter widgets external?
Super keen to get this released so I can get my hands on the voila fixes! 🚀 |
Thanks for the PR! A couple post-review notes:
|
Unfortunately I can't help with the development or packaging but I'm happy to test the JupyterLab/Voila combo on our deployment and report back any issues... |
I have just tested the 0.10.0 release in a fresh virtualenv with |
This PR changes the
perspective-jupyterlab
build to inline its external dependencies on the main Perspective modules, and makes some long-overdue improvements toPerspectiveWidget
in order to enhance the user experience in Jupyterlab and Voila. Specifically:PerspectiveWidget
had a height of 0 when rendered inside Voila. The height now defaults to 520px, the same as in Jupyterlab.<perspective-viewer>
config panel now shows by default on all widgets when rendered.worker.terminate()
andviewer.delete()
is now called whenever the widget output is disposed of, which should make memory usage in Jupyterlab more efficient.PerspectiveWidget
now inherits fromipywidgets.DOMWidget
instead ofipywidgets.Widget
, which means thatlayout
should work out of the box:plugin_config
can now be passed in from Python, which should allow for much finer-grained control over styling of the datagrid and chart plugins. However, becauseplugin_config
cannot be read synchronously from the Javascript front-end (as it is not part of the attribute API and there is no asyncget
in Javascript), there is currently no way to read the currentplugin_config
from the widget unless it has been set by the user already. However, this is still very useful for developers to "pre-set" styles onPerspectiveWidget
:WebSocketServer
to strip out semver-like ranges from requests. This is helpful when debugging Voila locally, as I can just set the Voila CDN tolocalhost:8080/node_modules/
and all the CDN requests Voila makes will automatically be resolved against my local build.