-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pass the WidgetManager to the WidgetRenderer #7
base: lab-based
Are you sure you want to change the base?
Pass the WidgetManager to the WidgetRenderer #7
Conversation
Co-authored-by: martinRenou <martin.renou@gmail.com>
This reverts commit ef54452.
Make the Voila package public
VoilaApp: Fix constructor
Not doing this will make the WidgetRenderer fail to render newly created widgets (In the case of Voilite which dynamically creates new widgets instead of using the build_widgets method)
@@ -42,7 +42,7 @@ export class WidgetManager extends KernelWidgetManager { | |||
{ | |||
safe: false, | |||
mimeTypes: [WIDGET_MIMETYPE], | |||
createRenderer: options => new WidgetRenderer(options) | |||
createRenderer: options => new WidgetRenderer(options, this as any) |
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.
Using as any
because our WidgetManager does not provide all the needed APIs. Would that be a problem @jtpio ?
At least it's not a problem for the WidgetRenderer itself.
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.
I guess it might, but worth trying it out.
Wondering whether the upstream typings could use LabWidgetManager
instead, similar to jupyter-widgets/ipywidgets#3561.
Thanks @martinRenou. Sorry I missed this and proceeded with a rebase of voila-dashboards#846 in the meantime to fix some conflicts. So there are some conflicts here as well now. |
39d1541
to
ec40d60
Compare
8f95dcb
to
3527577
Compare
877815b
to
f5995c9
Compare
Not doing this will make the WidgetRenderer fail to render newly created widgets (In the case of Voilite which dynamically creates new widgets instead of using the build_widgets method)