-
Notifications
You must be signed in to change notification settings - Fork 947
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
Add migration guide for 8.0 #3405
Add migration guide for 8.0 #3405
Conversation
599fa5d
to
26086ba
Compare
3b571d0
to
3160041
Compare
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've made a phosphor/lumino message processing compatibility implementation in a package like this. Any input on the implementation itself? Any suggestions for where to best put it in the migration guide?
class MyWidget extends DOMWidgetView {
_processLuminoMessage(msg: Message, _super: (msg: Message) => void): void {
_super.call(this, msg);
switch (msg.type) {
case 'after-attach':
// Auto-sizing should be updated when attached to DOM:
this.onChange();
break;
}
}
processPhosphorMessage(msg: Message): void {
this._processLuminoMessage(msg, (DOMWidgetView as any).processPhosphorMessage);
}
processLuminoMessage(msg: Message): void {
this._processLuminoMessage(msg, (DOMWidgetView as any).processLuminoMessage);
}
}
We should make sure we include some notes about what we recommend in terms of depending on phosphor / lumino . This is probably important in terms of which version of |
cc. @mariobuikhuizen @maartenbreddels We discussed Phosphor/Lumino (and ipywidgets 7/8) compatibility with @ibdafna yesterday. Some open questions raised:
Sorry I didn't join the widgets meeting for some time, I'll join the next one. |
Here is another example of a migration to 8.0, which was only complicated by the fact that it tried to use display_model in an unconventional way: jupyter-widgets/jupyterlab-sidecar#86 |
ipyleaflet also seems very easy to upgrade: jupyter-widgets/ipyleaflet#968 Edit: Oh, it also needs the processPhosphorMessage shim: see jupyter-widgets/ipyleaflet#969 |
We may need to put the message compatibility shim in the base widget package itself so that widget packages will inherit it and be able to work under both 7 and 8. Then the widget packages will be able to work under both an ipywidgets 7 manager (which calls processPhosphorMessage) and an ipywidgets 8 manager (which calls processLuminoMessage). |
3a1449d
to
149fcd9
Compare
149fcd9
to
158f4b4
Compare
@vidartf @jasongrout This should be good for another review, thanks for your comments! |
No description provided.