refined-github
refined-github copied to clipboard
Add ability to collapse entire comments
Description
- In the top-right of a comment, add a chevron icon that lets you collapse a comment to just the title bar.
- Preserver collapsed issue comments between pageloads
This is useful in issues where you need to reference only specific issues and are scrolling past intermediary ones.
This is not Hide Comment, which is used to hide comments from everyone. This is a convenience behavior.
I searched around and did not see that this exists yet, and I'm not seeing it somehow. If so, please point me at it.
Screenshot
I'd probably put this in the far right, despite the ellipsis begging to be the last item of a list.
Reason is, window management typically puts this minimize type behavior in the corner. Also I don't think its good jam something to the left of where the comment author is located.
Example URL
https://github.com/PostHog/posthog.com/issues/2018
One more use case: https://github.com/mdn/content/pull/15112 Here, the bot adds a huge comment in every PR. Getting to the reviews requires a lot of scrolling.
Minimize all and expand all buttons would be really nice.
Till this gets implemented, I've created a Tampermonky script that minimizes and adds a Minimize button to such comments. https://gist.github.com/OnkarRuikar/c323f320b3c858bfac40e577e6b73802
Here, the bot adds a huge comment in every PR.
The bot is made by humans. Tell the humans to tell the bot to wrap it all in a details tag. The UX of that bot is currently atrocious by default.
Tell the humans to tell the bot to wrap it all in a
detailstag.
The discussion is already underway. Use of the details tag and hide-comment-action has been suggested.
But it's been a long time, and I am afraid if the quorum is not reached they'll not make any changes. Also, every repo we contribute to may not want to change their practices.
@fregante can we add such a feature in refined-github, where we can provide user names in settings and their comments will be minimized?
where we can provide user names in settings
We don't do feature settings, but we could extend e.g. dim-bots to matching comments. But would that make sense as a default for every user? Not sure about that.
e.g.
dim-botsto matching comments. But would that make sense as a default for every user? Not sure about that.
Mostly bot comments are tagged with <span class="Label Label--secondary">bot</span> label, e.g. example1, example2, example3. Can we use that?
@OnkarRuikar your feature request is a nearly-exact duplicate of:
- https://github.com/refined-github/refined-github/issues/1629
- https://github.com/refined-github/refined-github/issues/2672
and it's not exactly what's being suggested here. I hid your comments for this reason.
See https://github.com/refined-github/refined-github/issues/2672 for a CSS-only alternative.
This is useful in issues where you need to reference only specific issues and are scrolling past intermediary ones.
We can implement this feature as it's similar to easy-toggle-files and toggle-files-button, no extra UI necessary though, just click anywhere to toggle the list. We'd also need this piece of UI though:
- https://github.com/refined-github/refined-github/pull/5653
Thanks for keeping this issue alive. Some clarifying questions:
We can implement this feature as it's similar to
easy-toggle-filesandtoggle-files-button, no extra UI necessary though, just click anywhere to toggle the list.
For reference, here's the UI behavior for easy-toggle-files.
I believe what you're saying is:
- Click anywhere in the
timeline-comment-headerclass that is not an existing visible element. ~"the white space". - Visibility of the (suspiciously potentially partially implemented) named
edit-comment-hideclass is toggled. - Toggle state is maintained between page loads.
We'd also need this piece of UI though:
* [Make `toggle-files-button` unforgettable #5653](https://github.com/refined-github/refined-github/pull/5653)
I believe you're saying add this label:

But have the copy read, "Comment Hidden
Too many feature requests, realistically we’ll never get there. I’m closing those I think aren’t worth it.
Okay. Thanks for the heads up. Maybe someday!