-
Notifications
You must be signed in to change notification settings - Fork 948
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
Make widget managers completely in charge of loading widgets #1313
Conversation
Most custom widgets inherit from DOMWidget or just Widget. A hack to get around the above issue would be to just give the package on the core widgets. It's not quite clear where it puts Widget, DOMWidget, and LabeledDOMWidget. |
Okay, new thought: no package name stuff. The widget manager is responsible for loading correct versions of the models/views, full stop. Right now I'm thinking of three widget managers:
For each of these cases, the version of jupyter-js-widgets is special-cased to be the one we are extending. So I'll strip this PR down to some of the cleanup I've done, and then the major change will be:
|
If that means that views will not be loaded via require by default (in the notebook) I think that is a big plus for development, since that makes js 'reloading' via actually work, like what i do here. |
Views would still be loaded using require -that's how things are done in the classic notebook |
5a58662
to
ddc34ca
Compare
54126ca
to
6ef4903
Compare
@SylvainCorlay, @maartenbreddels - Any thoughts on this before merging? |
This is an iteration on fixing #1242.
The basic idea is that we now consider the module/version to be semantic namespace (i.e., the spec for the model or view implementation), and the package/version to be a concrete implementation that can be loaded. The original thought was that if the package/version was not specified, it would default to the module/version. However, since package/version will be set on basic widgets classes, they must be overridden in custom widgets to be consistent.