From 0933acd4cc4cc2ecae84ae7efe14d1e57d8bbacf Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 29 Nov 2021 13:37:54 -0800 Subject: [PATCH] move to drawio. --- .../browser/{ => docs}/notebook.layout.md | 4 +- .../docs/viewport-rendering.drawio.svg | 521 ++++++++++++++++++ 2 files changed, 524 insertions(+), 1 deletion(-) rename src/vs/workbench/contrib/notebook/browser/{ => docs}/notebook.layout.md (98%) create mode 100644 src/vs/workbench/contrib/notebook/browser/docs/viewport-rendering.drawio.svg diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.layout.md b/src/vs/workbench/contrib/notebook/browser/docs/notebook.layout.md similarity index 98% rename from src/vs/workbench/contrib/notebook/browser/notebook.layout.md rename to src/vs/workbench/contrib/notebook/browser/docs/notebook.layout.md index 83601355275..0d347c408e8 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.layout.md +++ b/src/vs/workbench/contrib/notebook/browser/docs/notebook.layout.md @@ -61,7 +61,9 @@ export abstract class CellPart extends Disposable { } ``` -![render in the core](https://user-images.githubusercontent.com/876920/142806570-a477d315-40f3-4e0c-8079-f2867d5f3e88.png) +![render viewport](./viewport-rendering.drawio.svg) + + When the notebook document contains markdown cells or rich outputs, the workflow is a bit more complex and become asynchornously partially due to the fact the markdown and rich outputs are rendered in a separate webview/iframe. While the list view renders the cell/row, it will send requests to the webview for output rendering, the rendering result (like dimensions of the output elements) won't come back in current frame. Once we receive the output rendering results from the webview (say next frame), we would ask the list view to adjust the position/dimension of the cell and ones below. diff --git a/src/vs/workbench/contrib/notebook/browser/docs/viewport-rendering.drawio.svg b/src/vs/workbench/contrib/notebook/browser/docs/viewport-rendering.drawio.svg new file mode 100644 index 00000000000..5145d713e8e --- /dev/null +++ b/src/vs/workbench/contrib/notebook/browser/docs/viewport-rendering.drawio.svg @@ -0,0 +1,521 @@ + + + + + + + + + + +
+
+
+ Render Viewport +
+
+
+
+ + Render Viewport + +
+
+ + + + +
+
+
+ Notebook List View +
+
+
+
+ + Notebook List View + +
+
+ + + + + + + + + +
+
+
+ Render Template +
+
+
+
+ + Render Template + +
+
+ + + + + + + + + +
+
+
+ Render Element +
+
+
+
+ + Render Element + +
+
+ + + + + +
+
+
+ Get Dynamic Height +
+
+
+
+ + Get Dynamic Height + +
+
+ + + + + + + + + +
+
+
+ Create Cell Templates/Parts +
+
+
+
+ + Create Cell Templates/Parts + +
+
+ + + + +
+
+
+ Toolbar +
+
+
+
+ + Toolbar + +
+
+ + + + +
+
+
+ Editor +
+
+
+
+ + Editor + +
+
+ + + + +
+
+
+ Statusbar +
+
+
+
+ + Statusbar + +
+
+ + + + + + + +
+
+
+ Code Cell +
+
+
+
+ + Code Cell + +
+
+ + + + + +
+
+
+ Render Cell Parts +
+
+
+
+ + Render Cell Parts + +
+
+ + + + + + + + + + + +
+
+
+ CellPart read DOM +
+
+
+
+ + CellPart read DOM + +
+
+ + + + +
+
+
+ Update layout info +
+
+
+
+ + Update layout info + +
+
+ + + + + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ + Toolbar.prepareLayout + +
+
+
+
+ + Toolbar.prepareLay... + +
+
+ + + + + + + + + + + +
+
+
+ Cell Layout Change +
+
+
+
+ + Cell Layout Change + +
+
+ + + + + +
+
+
+ Cell Part updateLayout +
+
+
+
+ + Cell Part updateLayout + +
+
+ + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ Toolbar.renderCell +
+
+
+
+ + Toolbar.renderCell + +
+
+ + + + +
+
+
+ + Toolbar.updateLayout + +
+
+
+
+ + Toolbar.updateLayo... + +
+
+ + + + +
+
+
+ Next Frame +
+
+
+
+ + Next Frame + +
+
+ + + + +
+
+
+ + DOM Read + +
+
+
+
+ + DOM Read + +
+
+ + + + +
+
+
+ + DOM Write + +
+
+
+
+ + DOM Write + +
+
+
+ + + + + Viewer does not support full SVG 1.1 + + + +