Skip to content
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

Notebook diff: renderer support #112486

Closed
rebornix opened this issue Dec 14, 2020 · 4 comments · Fixed by #112602
Closed

Notebook diff: renderer support #112486

rebornix opened this issue Dec 14, 2020 · 4 comments · Fixed by #112602
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook on-testplan
Milestone

Comments

@rebornix
Copy link
Member

Current notebook diff editor only compares and presents the changes in text diff editors, we may also want to support renderers in the diff view just like what we did in the native notebook editor.

@rebornix
Copy link
Member Author

rebornix commented Dec 14, 2020

The first step is loading the static renderers in the diff view. It will come with following changes:

  • Add view models for notebook diff cell
  • Move the layout calculation and caching into the view models
  • Add container DOM node for renderers
  • Load the static renderers

image

The next step would be supporting multiple outputs in a single cell, which will require absolutely positioning every output and cache the output position with prefix sum.

@rebornix
Copy link
Member Author

rebornix commented Dec 15, 2020

In order to share the webview infra we had in the native notebook editor, we want to make backLayerWebview generic enough to support both output rendering in both editors. To archive that, we want to

  • Reuse CellOutputViewModel in diff editor
  • backLayerWebview would take a generic editor T and CellOutputViewModel as parameters to render an output

Currently I hacked around everything and have builtin renderers in webview

image

@rebornix
Copy link
Member Author

By making the webview module generic (I mean literally, `), we share the same code for rendering outputs in the webview. The missing part is loading kernel preload scripts but we can look into them at the end. Now we have output webview rendering on both sides

By making the webview module generic (literally, <T>), we now share the same output webview rendering code. With which we can render outputs on both side

image

@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@rebornix and others