Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment panel not updating with onDidChangeCommentThreads event #65329

Closed
IlyaBiryukov opened this issue Dec 18, 2018 · 8 comments
Closed

Comment panel not updating with onDidChangeCommentThreads event #65329

IlyaBiryukov opened this issue Dec 18, 2018 · 8 comments
Assignees

Comments

@IlyaBiryukov
Copy link

Issue Type: Bug

  1. Register a WorkspaceCommentProvider and DocumentCommentProvider
  2. In DocumentCommentProvider.createNewCommentThread fire WorkspaceCommentProvider.onDidChangeCommentThreads event with the newly added thread in added property in the event.

Expected:
The comment panel is updated. This works in stable VSCode 1.30.0.

Actual:
The comment panel is NOT updated. It looks like an exception is thrown by the event handler, though I couldn't get the details of it from attached VSCode debugger.

VS Code version: Code - Insiders 1.31.0-insider (edf1090, 2018-12-17T10:06:30.031Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.92GB (4.48GB free)
Process Argv --folder-uri file:///c%3A/src/cascade1/vscode/extension
Screen Reader no
VM 0%
@IlyaBiryukov
Copy link
Author

cc @RMacfarlane

@RMacfarlane RMacfarlane self-assigned this Dec 18, 2018
@IlyaBiryukov
Copy link
Author

cc @lostintangent
Here is the data in the event:

{added: [vscodeThread], changed: [], removed: []}

vscodeThread = {
	threadId: "1", 
	resource: t, 
	range: e, 
	comments: Array(1)
}
comments: Array(1) 
0: {
	commentId: "1/0", body: e, userName: "Ilya Biryukov", …}
	body: e {value: "Comment text"}
	canDelete: true
	canEdit: true
	commentId: "1/0"
	userName: "Ilya Biryukov"}
range: e {_start: e, _end: e}
resource: t {scheme: "file", authority: "", path: "/c:/tmp/node/1/app.js" }
threadId: "1"
}

@IlyaBiryukov
Copy link
Author

Ping?

@IlyaBiryukov
Copy link
Author

@RMacfarlane Do you think you can fix this bug in April?

@RMacfarlane
Copy link
Contributor

@IlyaBiryukov Yeah, I'll look at this this week.

But, as an fyi, we are introducing a new version of the proposed commenting API and plan to deprecate the old proposal in the coming months. More info here: #68020

@IlyaBiryukov
Copy link
Author

@RMacfarlane Is the new API ready to be used? Maybe the issue is already fixed with the new API.

@RMacfarlane
Copy link
Contributor

Yes, it's available in the proposed.d.ts in the current VS Code Insiders. The GitHub Pull Request extension has just adopted it, there's also sample extension for it here: https://github.com/Microsoft/vscode-extension-samples/tree/master/comment-sample

@IlyaBiryukov
Copy link
Author

Comment panel is updating just fine with the new API. I'm going to close this issue then.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants