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

Enable edit-comments-faster on Discussions #4336

Merged
merged 7 commits into from
May 14, 2021
Merged

Enable edit-comments-faster on Discussions #4336

merged 7 commits into from
May 14, 2021

Conversation

darkred
Copy link
Contributor

@darkred darkred commented May 9, 2021

Closes #4334

Test URLs

tophf/mpiv#50

Screenshot

Note to reviewers

  • The added selector .timeline-comment-actions details:last-child (or .timeline-comment-actions > div > details:last-child ) is for discussions

@darkred darkred changed the title Make parse-backticks work in Discussions Make edit-comments-faster work in Discussions May 9, 2021
@darkred darkred changed the title Make edit-comments-faster work in Discussions Enable edit-comments-faster on Discussions May 9, 2021
@@ -14,12 +14,12 @@ function init(): void {

comment
.closest('.js-comment')!
.querySelector('.timeline-comment-actions > details:last-child')! // The dropdown
.querySelector('.timeline-comment-actions > details:last-child, .timeline-comment-actions details:last-child')! // The dropdown
Copy link
Member

Choose a reason for hiding this comment

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

Did you check that this does not make issues in other places. There is probably a reason that we used such a specific selector.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@darkred darkred May 9, 2021

Choose a reason for hiding this comment

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

I only tested in issues, Discussions (all non-locked) and this PR page.
I don't have any locked conversation URL to have participated in.

As I wrote in the OP, I can only suggest a more specific alternative additional selector:
.timeline-comment-actions > div > details:last-child

Copy link
Member

Choose a reason for hiding this comment

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

Either way the 2 selectors currently overlap. The first one is unnecessary because the second one already covers that.

@yakov116’s notes still apply

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I kept only the second one. Thank you.

Copy link
Member

Choose a reason for hiding this comment

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

Did you check if locked issues work?

Copy link
Contributor Author

@darkred darkred May 9, 2021

Choose a reason for hiding this comment

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

Yes, I tried it in a test repo I have made:
I locked an issue, discussion and PR page, and it works ok in all
(with the selector I kept .timeline-comment-actions details:last-child ).

Co-authored-by: yakov116 <16872793+yakov116@users.noreply.github.com>
darkred and others added 2 commits May 9, 2021 18:19
Co-authored-by: yakov116 <16872793+yakov116@users.noreply.github.com>
@yakov116 yakov116 merged commit 6ec34e5 into refined-github:main May 14, 2021
@darkred darkred deleted the enable-parse-backticks-on-Discussions branch May 24, 2021 09:47
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.

edit-comments-faster not working in Discussions
3 participants