You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
Activity
[-]'Top answers' on issues[/-][+]'Top/Most Helpful Comments' on issues[/+]sindresorhus commentedon May 30, 2019
What would the heuristics be to detect when to highlight a comment?
fregante commentedon May 30, 2019
Small real life example: leafo/sticky-kit#201 (comment)
Probably just a comment that:
👍.count > comments.length * 0.8)👎.count < 👍.count / 2Also the question is: how do we highlight it?
What about this
color: orangebar? The whole bar would link to the comment at the bottomOr "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 labelsindresorhus commentedon May 30, 2019
Sounds good 👌
IssueHuntBot commentedon May 30, 2019
@IssueHunt has funded $40.00 to this issue.
lubien commentedon May 31, 2019
I've started working on this and I'm halfway done. Will make a PR soon.
lubien commentedon May 31, 2019
@bfred-it what's your take on this:
--
Edit: 1px border version
fregante commentedon Jun 1, 2019
Looks good
IssueHuntBot commentedon Jun 5, 2019
@sindresorhus has rewarded $36.00 to @lubien. See it on IssueHunt