interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Cell collapsed state not persisted

Open hravnx opened this issue 5 years ago • 1 comments

Describe the bug

The collapsed state of cell input/output is not saved with the notebook to disk.

  1. Create a new notebook in VS Code insiders - enter and evaluate a cell
  2. From the cell context menu (see screenshot) select Collapse Cell Input - observe the input is collapsed.
  3. Save the notebook to disk and close it
  4. Load the notebook - observe the cell input is visible again.

This may be caused by the toVsCodeNotebookCellData function in the DotNetInteractiveNotebookContentProvider class, where the metadata field is always set to an empty object. This implies that other metadata is not persisted correctly, but I have not confirmed this.

Please complete the following:

Which version of .NET Interactive are you using? 1.0.160901+a5db2e2c034eb03ecb446220826ca6aacaa4cb84

  • OS
    • [ x] Windows 10
    • [ ] macOS
    • [ ] Linux (Please specify distro)
    • [ ] iOS
    • [ ] Android
  • Browser
    • [ ] Chrome
    • [ ] Edge
    • [ ] Firefox
    • [ ] Safari
  • Frontend
    • [ ] Jupyter Notebook
    • [ ] Jupyter Lab
    • [ ] nteract
    • [x] Visual Studio Code
    • [ ] Other (please specify)

Screenshots

image

hravnx avatar Dec 18 '20 08:12 hravnx

We now save the collapse state for cells in VS Code.

rebornix avatar Mar 02 '22 21:03 rebornix