You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume we have Cells a, b, c in an ipynb file (raw notebook).
Each of the cells have their own metadata
Extension returns instances of NotebookCellData to VS Code from NotebookContentProvider:
A, B, C
The objects returned are NotebookCellData
Later VSC creates its own representation and uses NotebookCell (for other API, execution, edits, etc).
Assume user Copies cell A and add its below A or above A
Assume user moves cell A below B
As NotebookCell is not a subclass of NotebookCellData (there's no link between the two), its impossible for extensions to identify which is which.
Why do we need this:
Running cell B, could result in updates to Cell A
At this point we need a way to uniquely identify Cell A from the NotebookCells.
Using metadata to identify a cell will not work as copying/pasting cells also copies the metadata
Possible solutions
Expose finer grained events when cells are modified
User adds a new cell, notify extension about this (at this point we can update the metadata as we see fit, to ensure we do not get confused between the two cells).
@rebornix I believe adding finer grained events is a WIP, hence please feel free to close this issue.
The text was updated successfully, but these errors were encountered:
When copy and paste cells, I think we should only copy language/content, metadata will not be copied and cell Uri will be a new one, this will solve your problem, right? @DonJayamanne
As NotebookCell is not a subclass of NotebookCellData (there's no link between the two), its impossible for extensions to identify which is which.
Why do we need this:
Possible solutions
@rebornix I believe adding finer grained events is a WIP, hence please feel free to close this issue.
The text was updated successfully, but these errors were encountered: