-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Labels
debtCode quality issuesCode quality issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersnotebook
Milestone
Description
The NotebookTextModel is an important backbone of the notebooks model and therefore we should cleanup some debt that has accumulated:
-
NotebookTextModel#selectionsis a view/editor property and not a model property - the
this._onDidModelChangeProxy-event in combination withemitToExtHost. There should be no difference is model changes that go to the extension host and other subscribers/consumers. All events should be equal andmainThreadNotebookis just one of many consumers which special role is to manage a "copy" in the extension host - some duplication in how cells are inserted, removed, and edited. We should make
applyEditthe one-stop-shop. - a notebook text model knows if its dirty and emit corresponding events. One could argue that dirty-state manage is the business of
NotebookEditorModelwhich is already doing saving etc. - every change of the version id must be forwarded to the extension host (see Using applyEdit with replaceCellMetadata or replaceCellOutput fails with no output #105624 (comment))
Reactions are currently unavailable
Metadata
Metadata
Labels
debtCode quality issuesCode quality issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersnotebook