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.
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
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.
I think this is a case where we need to lazy load jupyterlab services.
Ian Huff (IanMatthewHuff)
left a comment
There was a problem hiding this comment.
Approved with lazy load of Jupyter, at least from my perspective.
There was a problem hiding this comment.
Rich Chiodo (@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!
|
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.