Skip to content

Enable edit-comments-faster on Discussions#4336

Merged
yakov116 merged 7 commits into
refined-github:mainfrom
darkred:enable-parse-backticks-on-Discussions
May 14, 2021
Merged

Enable edit-comments-faster on Discussions#4336
yakov116 merged 7 commits into
refined-github:mainfrom
darkred:enable-parse-backticks-on-Discussions

Conversation

@darkred
Copy link
Copy Markdown
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
Comment thread source/features/edit-comments-faster.tsx Outdated
Comment thread source/features/edit-comments-faster.tsx Outdated
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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 ).

Comment thread source/features/edit-comments-faster.tsx Outdated
@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