Skip to content

Conversation

@cheap-glitch
Copy link
Contributor

  1. LINKED ISSUES: Closes Expand but hide "1 similar comment" in hide-useless-comments #3830

  2. TEST URLS: LICEcap 1.3.0 does not compatible with macOS Big Sur. justinfrankel/licecap#97

Picked up where #3839 left off. This PR:

  • always hides "similar comment(s)" boxes
  • expand every one of them when the link to show useless comments is clicked

This is not exactly what was described in #3830, rather it's following this review comment: #3839 (comment)

The idea is to consider every similar comment as useless by default, and not expand them to actually check their contents, since there can be a lot of them (I remember seeing issues with 200+ similar comments). Thoughts?

Co-authored-by: paulocarneiro99 <paulo_carneiro@usp.br>
@fregante
Copy link
Member

Yes the logic in your post is correct

@cheap-glitch cheap-glitch marked this pull request as ready for review February 18, 2021 15:08
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.

Both new selectors are rather generic and need to be improved

@fregante fregante changed the title Hide and auto-expand similar comments in hide-useless-comments Hide and auto-expand Similar comments in hide-useless-comments Feb 19, 2021
@fregante fregante merged commit 5ece7b1 into refined-github:main Feb 19, 2021
@cheap-glitch cheap-glitch deleted the hide-similar-comments branch February 19, 2021 23:25
@fregante
Copy link
Member

Ouch, I think we got a problem:

Screen Shot

See the error in #3647

}

// Expand all "similar comments" boxes
for (const similarCommentsExpandButton of select.all('.js-discussion .Details-content--closed > span:only-child')) {
Copy link
Member

@fregante fregante Feb 23, 2021

Choose a reason for hiding this comment

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

Maybe

Suggested change
for (const similarCommentsExpandButton of select.all('.js-discussion .Details-content--closed > span:only-child')) {
for (const similarCommentsExpandButton of select.all('.pagination-loader-container .Details-content--closed > span:only-child')) {

Copy link
Member

Choose a reason for hiding this comment

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

We should fix this soon and I'll release an early version

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.

Expand but hide "1 similar comment" in hide-useless-comments

3 participants