Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

remove widget.register #90

Open
ianhi opened this issue Feb 18, 2021 · 2 comments
Open

remove widget.register #90

ianhi opened this issue Feb 18, 2021 · 2 comments

Comments

@ianhi
Copy link

ianhi commented Feb 18, 2021

As discussed in the Feb 18, 2021 meeting the default for widgets should be to not register themselves with widgets.register

So this will need to be removed:

and then I think there will need to be an _frontend.py file like in the ts-cookiecutter

@vidartf
Copy link
Member

vidartf commented Feb 19, 2021

For those not in the meeting, would anyone care to summarize the reasoning behind when something should be registered and why (not)?

@ianhi
Copy link
Author

ianhi commented Feb 19, 2021

For those not in the meeting, would anyone care to summarize the reasoning behind when something should be registered and why (not)?

woops that's definitely something I meant to include in this issue 😬

My understanding is that calling widgets.register on the widget will allow the typescript side to create a widget, otherwise the kernel has no way of knowing what to do with the comm it receives. The argument is that this should not be the default because it introduces a potential security risk (and maybe was a problem in voila??). So widgets.register should be treated as an advanced use case and not part of the default setup.

That was a paraphrase of what @maartenbreddels said, so I may have gotten some details wrong but I think that's the gist.

(and also documented: see jupyter-widgets/ipywidgets#3134)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants