Conversation
|
@alexr00 FYI, to support comments in notebook editor, I decoupled the comment widget from the |
alexr00
left a comment
There was a problem hiding this comment.
I took a quick look, but it's a large change so I couldn't be super thorough.
|
|
||
| private readonly _threads: Map<number, MainThreadCommentThread> = new Map<number, MainThreadCommentThread>(); | ||
| public activeCommentThread?: MainThreadCommentThread; | ||
| private readonly _threads: Map<number, MainThreadCommentThread<IRange | ICellRange>> = new Map<number, MainThreadCommentThread<IRange | ICellRange>>(); |
There was a problem hiding this comment.
Should MainThreadCommentController also be templated so that IRange | ICellRange can be a T?
| if (matchedZones.length) { | ||
| let matchedZone = matchedZones[0]; | ||
| matchedZone.update(thread); | ||
| if (thread.isDocumentCommentThread()) { |
There was a problem hiding this comment.
We now need to have these checks in various places. Would it make more sense to have a separate notebook comments service?
There was a problem hiding this comment.
or, at the very least, separate onDidUpdateCommentThreads events for documents and notebooks?
There was a problem hiding this comment.
💯 for filtering through onDidUpdateCommentThreads.
This PR fixes #144850. The changes included:
CommentThreadWidgetfromZoneWidgetand make it reuseable for Notebook.CommentThreadtoCommentThread<T>whereTis eitherIRangeorICellRange.CellCommentscell part in notebookOriginally I thought we should at least introduce a new API to allow contributing comments to notebook cells but at the end I took a shortcut: extensions contribute comments to notebook cells and we render comments in notebook cells instead of inside the cell editor.