-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Missing buttons and errors when deleting or editing a comment #1723
Conversation
49ab4d1
to
c2d9214
Compare
@@ -592,6 +594,8 @@ public ITextDocument GetDocument(ITextBuffer buffer) | |||
CommitId = result.CommitId, | |||
DiffHunk = result.DiffHunk, | |||
Id = result.Id, | |||
//TODO: Populate this | |||
NodeId = string.Empty, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on why this needs to be created and why the TODO comment (I'm totally clueless on this part of the code)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is where Stanley got stuck. The problem is that we're currently mixing GraphQL and REST queries and each of them has a different concept of ID, so we currently need both. #1712 will fix this properly by moving to GQL for all this stuff, but in the interim I think we can convert the two "Add Comment" methods that currently use REST, to using GQL; though will be a bit messy because there's currently no way to actually do this in a single GQL mutation (this is what #1712 has to do too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
70a5347
to
b58ae5b
Compare
@StanleyGoldman I can edit/delete new comments I've made right away, but I noticed a few other things: |
As regards @meaghanlewis issues:
I'm not seeing this. Not sure what is needed to repro.
This is quite simple:
This is because Database IDs are being used as Node IDs here TIP: Don't just call |
Thanks @grokys for finding the errors. Yea, the |
@meaghanlewis I also am unable to repro the unable to missing delete button issue, I can pair with you on it today. |
So for the comment I complained about with the missing edit/delete button that was my fault 😞 i was using a test account |
@StanleyGoldman this is looking good, but 2 more things. I'm not sure if this is getting to be out of scope for this particular fix, so I'm okay with opening separate issues for these as well. What do you think? |
@meaghanlewis I replicated and fixed the first issue, replying to standalone comments should not show as pending anymore. As far as your second issue goes, I added functionality to display an error directly in that view. But I do not know how to fix the error you found. I'm going to try again tomorrow morning with a fresh brain. Also it seems you were able to identify another bug with @jcansdale in Slack last night. Would you happen to know how to reproduce the error. |
I suspect the inability to delete pending comments is a problem with the REST API, in that it refuses to accept the existence of pending comments. This is a problem because there's no way in GraphQL to delete comments. We spoke to someone on the API ecosystem team last week who suggested that the REST API not working with pending comments was in error, so my feeling is that we should work with them to get this fixed. |
@@ -517,7 +517,7 @@ public ITextDocument GetDocument(ITextBuffer buffer) | |||
OriginalCommitId = x.Comment.OriginalCommit.Oid, | |||
PullRequestReviewId = x.Comment.PullRequestReview.DatabaseId.Value, | |||
User = user, | |||
IsPending = true, | |||
IsPending = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is right? This method is PostPendingReviewCommentReply
, so doesn't this need to be set to pending?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
ToProperty
but I completely failed on the follow through.