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

[WebPDF] How to better detect that notebook & widgets have finished rendering #1408

Open
SylvainCorlay opened this issue Sep 21, 2020 · 2 comments

Comments

@SylvainCorlay
Copy link
Member

I had to tag a patch release (6.0.5) reverting the move to networkidle2, which prevented custom widgets to render when doing --to webpdf --execute because of the CDN requests.

However, this change causes the scotch_dashboard.ipynb to timeout in webpdf. Just adding page.waitfor(100) after the networkidle2 makes it work... So we should probably work on a better signal that the widgets have finished rendering.

cc @maartenbreddels

@mgeier
Copy link
Contributor

mgeier commented Sep 23, 2020

I'm not sure, but this might be to some degree related to #913.

@maartenbreddels
Copy link
Collaborator

I added a global promise window.widgetManagerPromise in this PR https://github.com/voila-dashboards/voila/pull/574/files so that we can wait for the manager to first build the widgets. But even then it can mean a widget is still doing work. For instance in #901 I hacked it by deep inspection of the widget, and wait for leaflet's layer.obj.on('load', ..) to trigger. I think this basically asks for an API from the widget manager, and a way to get access to all widget managers.

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

No branches or pull requests

3 participants