Refined-github: 'Top/Most Helpful Comments' on issues

Created on 1 Apr 2019  路  8Comments  路  Source: sindresorhus/refined-github


Issuehunt badges

Hey!

Often, when debugging problems we run into when using open source tools, we end up on a relevant GitHub issue of the repository in question. These issues sometimes contain solutions to the problems in the comments, and users react to the most helpful comments using the 馃憤 and 馃帀 reactions.

I think a feature which would highlight the comments with a large amount of 馃憤 and 馃帀 would be really useful for quickly finding the most useful comments out of an issue. So instead of having to scroll through all of the comments, a user who ends up on the issue-page could instantly see the most 'upvoted' comments which most likely contain the information they are looking for.

You could think of this rather similarly to Stack Overflow answers. Stack Overflow sorts the answers by having the most helpful ones at the top. But we probably don't want to sort the comments, since that could be very confusing for the user.

Thus, I think a good option might be to have a small list of 'top comments' somewhere at the top of an issue-page, which would contain a small snippet of the comment (e.g. first 50 characters), and by clicking the comment listed there it would scroll the user to the full comment.

If people agree that this would be a good feature, I could try to sketch a UI for it and make a PR :)




IssueHunt Summary

lubien lubien has been rewarded.

Sponsors (Total: $40.00)

Tips


Rewarded on Issuehunt enhancement help wanted

Most helpful comment

@sindresorhus has rewarded $36.00 to @lubien. See it on IssueHunt

  • :moneybag: Total deposit: $40.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $4.00

All 8 comments

What would the heuristics be to detect when to highlight a comment?

What would the heuristics be to detect when to highlight a comment?

Small real life example: https://github.com/leafo/sticky-kit/issues/201#issuecomment-496910429

Probably just a comment that:

  • is the 5th or later comment (it doesn't make sense to highlight a comment that is right under the opening issue already)
  • has the most 馃憤 reactions
  • has at least 10 馃憤 reactions (or 馃憤.count > comments.length * 0.8)
  • is not controversial: 馃憥.count < 馃憤.count / 2

Also the question is: how do we highlight it?

What about this color: orange bar? The whole bar would link to the comment at the bottom

Screenshot 2019-05-30 at 17 33 08

Or "highest-rated comment", to avoid assuming that it's a question that requires an answer.

Or even it could copy the dom with the 15 馃憤 [avatars] as a label

Sounds good 馃憣

@issuehunt has funded $40.00 to this issue.


I've started working on this and I'm halfway done. Will make a PR soon.

@bfred-it what's your take on this:

image

--

image

Edit: 1px border version

image

Looks good

@sindresorhus has rewarded $36.00 to @lubien. See it on IssueHunt

  • :moneybag: Total deposit: $40.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $4.00
Was this page helpful?
0 / 5 - 0 ratings