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

Pass the WidgetManager to the WidgetRenderer #7

Open
wants to merge 20 commits into
base: lab-based
Choose a base branch
from

Conversation

martinRenou
Copy link

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)

@github-actions
Copy link

github-actions bot commented Sep 2, 2022

Binder 👈 Launch a Binder on branch voila-dashboards/voila/pass_manager_to_widget_renderer

@@ -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)
Copy link
Author

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.

Copy link
Owner

@jtpio jtpio Sep 3, 2022

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.

@jtpio
Copy link
Owner

jtpio commented Sep 3, 2022

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.

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.

2 participants