Skip to content

support routing updating outputs with display_id#1879

Merged
rgbkrk merged 9 commits into
jupyter:masterfrom
minrk:display_data_update
Nov 16, 2016
Merged

support routing updating outputs with display_id#1879
rgbkrk merged 9 commits into
jupyter:masterfrom
minrk:display_data_update

Conversation

@minrk

@minrk minrk commented Nov 8, 2016

Copy link
Copy Markdown
Member

notebook implementation of jupyter/jupyter_client#209

  • display(id=...) always adds something to the page
  • update(id=...) updates only existing things on page

A single display_id can be used multiple times on the page, and all instances will be updated and kept in sync.

related: ipython/ipykernel#204 , ipython/ipython#10048

@minrk minrk force-pushed the display_data_update branch from 327632e to 0c90391 Compare November 9, 2016 01:39
@minrk

minrk commented Nov 10, 2016

Copy link
Copy Markdown
Member Author

An example notebook for testing with these messages (doesn't require IPython PRs): https://nbviewer.jupyter.org/gist/minrk/1a1e56a611f1ff1e2645f733bdd0e381

@minrk

minrk commented Nov 15, 2016

Copy link
Copy Markdown
Member Author

Only missing thing: updating execute_result.

@rgbkrk

rgbkrk commented Nov 16, 2016

Copy link
Copy Markdown
Member

Looking good!

@minrk minrk changed the title [WIP] support routing updating outputs with display_id support routing updating outputs with display_id Nov 16, 2016
make update_display handling clearer and separate from regular display_data
@minrk minrk force-pushed the display_data_update branch from ce5605f to c0a6e41 Compare November 16, 2016 15:44
@minrk

minrk commented Nov 16, 2016

Copy link
Copy Markdown
Member Author

No longer WIP, this should be all set, now.

}
} catch(err) {
console.log(err);
console.error(err);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

case 'update_display_data':
record_output = false;
json = this.validate_mimebundle(json);
this.update_display_data(json);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

json.transient = content.transient;
json.data = content.data;
json.metadata = content.metadata;
json.execution_count = content.execution_count;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rgbkrk rgbkrk merged commit 6df840e into jupyter:master Nov 16, 2016
@Carreau Carreau added this to the 5.0 milestone Nov 18, 2016
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants