Open minsa110 opened 1 year ago
I saw this a couple times, but it worked 95% of the time. When it breaks, we have a persisted state object, but collapsedInputCells
is empty. I'm wondering whether we could have disposed cell VM objects before the last call to getEditorViewState
. Any other ideas @rebornix?
Not sure if this covers persisting the collapsed cells in the saved ipynb file (the OP only mentions closing/opening VSCode so perhaps they expect persistence at the VSCode tab level) but right now in my current VScode/Jupyter set up cells are expanded every time I open an ipynb file in which I had collapsed cells previously and then saved and closed the notebook.
I am running Jupyter extension v2022.3.1000901801.
Looking at jupyterlab/jupyterlab#3981 it seems that the functionality is available on the jupyter end.
Possibly related to this, header sections collapse is not restored depending on the settings. Its worth noting that at least in my case the issue only happens when header arrows are set to display only on hover instead of always. Please see https://stackoverflow.com/questions/78722953/how-can-i-make-hidden-headers-preserve-their-state-in-vs-code for more details and a workaround for header sections collapse until its fixed.
Any updates on this? Would really like to see this implemented!
Collapsed cell inputs / outputs should persist between VSC sessions because conducting data analysis often span multiple days--many times with long inputs / outputs.
Steps to repro:
Cell collapse do work: