Skip to content

Add submit-review-as-single-comment feature - #2188

Merged
fregante merged 14 commits into
masterfrom
submit-review-as-single-comment
Jul 10, 2019
Merged

fregante merged 14 commits into
masterfrom
submit-review-as-single-comment

Conversation

@fregante

@fregante fregante commented Jun 27, 2019 •

Copy link
Copy Markdown
Member

Closes #2063

Testing

This has to support various situations:

  • Multiple comment boxes open
  • Unified or split diffs
  • Multiple threads on the same line
  • New thread or reply to an existing thread

Example of what it should support

Screenshot

Helpful code for testing

// This will delete all the review comments on a PR
$$('[data-confirm="Are you sure you want to delete this?"]').map(el => {delete el.dataset.confirm; el.click()} )

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@fregante
fregante marked this pull request as ready for review June 28, 2019 14:17
@fregante

Copy link
Copy Markdown
Member Author

I updated the behavior to first show the new field with the comment and then try to delete it. This is less visually clean but safer because the comment is always on screen, should the operation go wrong.

Technically we can still hide the new field and show it only if there are issues. Thoughts?

@fregante
fregante requested a review from sindresorhus June 28, 2019 14:18
@sindresorhus

Copy link
Copy Markdown
Member

Technically we can still hide the new field and show it only if there are issues. Thoughts?

I would hide it. Currently, it feels a bit slow and jumpy. It's like 3 slow steps and it takes 3 seconds for me. Not a big issue, but could be smoother.

@sindresorhus

Copy link
Copy Markdown
Member

This works great though and it's super useful. I click the green Review button by accident almost every day.

@fregante

fregante commented Jul 6, 2019

Copy link
Copy Markdown
Member Author

I would hide it. Currently, it feels a bit slow and jumpy

Time isn't affected, we still need to wait for the original comment to be deleted before submitting a new one, otherwise we risk them being submitted at once (behavior described in #2063 (comment))

@sindresorhus

Copy link
Copy Markdown
Member

Ok. I would still hide it though.

@fregante
fregante merged commit 797034f into master Jul 10, 2019
@fregante
fregante deleted the submit-review-as-single-comment branch July 10, 2019 11:46
@fregante
fregante restored the submit-review-as-single-comment branch July 10, 2019 11:46
@fregante
fregante deleted the submit-review-as-single-comment branch July 10, 2019 12:36
notlmn pushed a commit to notlmn/refined-github that referenced this pull request Jul 11, 2019
@fregante fregante mentioned this pull request Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Submit pending review comment as "single comment"

2 participants