-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
workbench.action.submitComment
not functional when first replying to a comment thread & confusing when editing comments
#151739
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.68.0. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
tl;dr: This would be achieved if:
|
Thank you for providing so many details! |
This bug has been fixed in the latest release of VS Code Insiders! @hermannloose, you can help us out by commenting If things still don't seem right, please ensure you're on version f1abeea of Insiders (today's or later - you can use Happy Coding! |
To verify:
|
Sorry for not verifying this earlier. In my test extension for Insiders it seems to work, contributed commands are picked from the correct menus and appear to honor |
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
CommentThread
withCommentThread.canReply = true
(the default) and some existingComment
s inCommentThread.comments
that haveComment.mode = CommentMode.Preview
(i.e. published comments by code reviewers; please let us know in case we hold this API completely wrong though ...).CommentThreadWidget
rendering a "Reply ..." button.Ctrl+Enter
/Cmd+Enter
(the default keyboard shortcut) to trigger aworkbench.action.submitComments
.Expected Result:
comments/commentThread/context
, as these are the actions visible under the reply editor at this point.Observed Result:
CommentThread.submitComment()
seesthis._body.activeComment
asundefined
and does not run anything.activeComment
is the firstCommentNode
whereCommentNode.editing
istrue
. This is set byCommentNode.switchToEditNode()
, i.e. when settingComment.mode = CommentMode.Editing
from the extension. However, the extension cannot selectively create such a comment in response to the user clicking "Reply ...", it could only do so for all visible comments preemptively, which would lead to bad UX.Another very surprising (buggy?) side effect of this: while actually editing such an existing comment,
Ctrl+Enter
/Cmd+Enter
does trigger a command, however it's the first command registered forcomments/commentThread/context
, all of which are not visible as buttons at that point in time. The expected result here would be that it would run an action fromcomments/comment/context
, i.e. related to the individualComment
, not theCommentThread
.The text was updated successfully, but these errors were encountered: