Skip to content
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

Disable edit-comments-faster on hidden comments #3651

Merged
merged 2 commits into from
Oct 16, 2020

Conversation

kidonng
Copy link
Member

@kidonng kidonng commented Oct 15, 2020

@kidonng
Copy link
Member Author

kidonng commented Oct 15, 2020

I have mentioned that edit-comments-faster doesn't work if you unhide a comment. I've tried to find a simple way to fix that but failed. So here comes an alternative way to this issue: always append the edit icon before the three dots menu.

https://github.com/sindresorhus/refined-github/blob/149cddf538f1a53d716a45a9b4eb78ca49c30cdc/source/features/edit-comments-faster.tsx#L15

- comment.closest('.js-comment')!.querySelector('.js-comment-header-reaction-button')!.after(
+ comment.closest('.js-comment')!.querySelector('.timeline-comment-actions')!.lastElementChild!.before(

It may look like this:

image
image

Not sure if it is useful to edit hidden comments though, so thoughts welcome.

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current solution is perfect. As you mentioned, probably it’s not that useful to edit minimized comments.

@fregante fregante closed this Oct 15, 2020
@fregante fregante reopened this Oct 15, 2020
@yakov116 yakov116 added the bug label Oct 15, 2020
@yakov116 yakov116 merged commit 2fca2e2 into refined-github:master Oct 16, 2020
@yakov116
Copy link
Member

Thanks @kidonng!

You helped me confirm that wait-for-build is working too!

@kidonng kidonng deleted the edit-comments-faster branch October 16, 2020 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants