Commit d665222
PY-89751 Restore cell rendering after collapse/expand of markdown headers
When a markdown header section is expanded, the previously hidden cell views are
recreated but only their folding is set up (createCellView), so their outputs and
inlays stay uninitialized until an unrelated event such as a scroll triggers
NotebookVisibleCellsBatchUpdater. This is a regression from the lazy output
initialization introduced in KTNB-812.
Refresh a cell view right after it becomes visible again in updateCellVisibility
(update + checkAndRebuildInlays + updateIfInVisibleRect) when the cell is inside the
viewport, so an expanded section renders immediately. Cells outside the viewport keep
being initialized lazily.
The previous attempt added an isUnfolded listener on EditorCell that called
updateIfInVisibleRect, but the cell view is always null at that point (it is disposed
while folded and only recreated by NotebookCellInlayManager afterwards), so it was a
no-op; it is removed.
Add a deterministic regression test (JupyterMarkdownFoldingRenderingTest) that inspects
the model right after the expand, and an end-to-end UI test in
JupyterPolygonIPyKernelUiTest.
M-Session-Id: M-b082df5b-7e57-46f6-aa59-496eef7d6cbe
GitOrigin-RevId: ef66dc9979025f9d4f0df472f96e8c032465a3e51 parent 618c0bb commit d665222
2 files changed
Lines changed: 12 additions & 6 deletions
File tree
- notebooks/visualization/src/com/intellij/notebooks/visualization
- ui
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
215 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
216 | 228 | | |
217 | 229 | | |
218 | 230 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 42 | | |
49 | 43 | | |
50 | 44 | | |
| |||
0 commit comments