-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add labels to comments by OP #376
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
Add labels to comments by OP #376
Conversation
This adds labels similar to GitHub's existing ones (Owner/Contributor/Collaborator) to comments posted by the user who opened the issue or PR.
extension/content.js
Outdated
| </span> | ||
| `; | ||
|
|
||
| const comments = $('.js-comment').toArray(); |
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.
const comments = $('div.js-comment').toArray();
Without the specificity for a div this feature doesn't work when someone has the ability to edit another users comments. (The first item in the array is a form.)
|
Also, see #375 (comment) Thanks for another PR! 🙌 |
|
Any comments on this PR or are we OK to 🚢 ? |
|
I don't think we should add "Original Poster" to the initial issue/PR as it's already obvious, but rather only on additional comments by OP. Merge conflicts needs resolving. @jgierer12 Can you add it to the readme, like I did here: b695fc4 |
59fbce1 to
8990ae3
Compare
@jgierer12 Can you please resolve this? I think we're good otherwise. Thanks! |
|
I've also noticed now that if you switch between the "Conversation" tab and "Files" tab in a pull request, it will re-add the OP badge each time you go to "Conversation". |
|
Could we change Edit: Probably not an option since it won't work for AJAX'ed comments. I think I'll just add a data attribute to comments that already have the label. |
|
Just add a custom class to the HTML you inject and check for that before injecting. We do that with many of the other features. Could be |
|
@sindresorhus anything else? |
|
Really good work @jgierer12 :) |
This adds labels similar to GitHub's existing labels (Owner/Contributor/Collaborator) to comments by the user who submitted the issue/PR.
Timeline comments:
With multiple labels:
Review comments:
Fixes #365