-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support Update Display Data #10874
Support Update Display Data #10874
Conversation
Debating with myself if I should add a functional test for this. Probably makes sense to |
const data: nbformat.ICodeCell = c.cell.data as nbformat.ICodeCell; | ||
const changedOutputs = data.outputs.map(o => { | ||
if ( | ||
o.output_type === 'display_data' && |
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.
Display data can update both execute_result and display_data outputs. I think you would need that here as well.
https://jupyter-client.readthedocs.io/en/stable/messaging.html#display-data
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.
Will fix
fdbc150
to
caeddae
Compare
Codecov Report
@@ Coverage Diff @@
## master #10874 +/- ##
===========================================
- Coverage 60.68% 26.02% -34.66%
===========================================
Files 580 328 -252
Lines 31525 17530 -13995
Branches 4479 2498 -1981
===========================================
- Hits 19130 4563 -14567
- Misses 11425 12933 +1508
+ Partials 970 34 -936
Continue to review full report at Codecov.
|
|
||
private async handleKernelMessage(msg: KernelMessage.IIOPubMessage, _requestId: string) { | ||
// Only care about one sort of message, UpdateDisplayData | ||
if (KernelMessage.isUpdateDisplayDataMsg(msg)) { |
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 think this is a case where we need to lazy load jupyterlab services.
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.
Approved with lazy load of Jupyter, at least from my perspective.
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.
@rchiodo do we need these changes even after my new ipywidget implementation?
I can see AML widget working.
However we have changes in our react code to deal with update display data
. Is that still required?
Yes for other reasons. This code doesn't work without it but it does in jupyter:
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
For #10873
We've never handled the update_display_data message correctly as it can affect other cells. This is necessary to get some ipywidgets to work correctly.