Added buttons to collapse all reply comments and expand all comments
Another open-source contribution, this time from Jeff Kayser.
There are now two buttons at the top of the comments section, next to the header that says "X comments". The minus button will collapse all the reply comments, leaving only the top-level comments expanded, and the plus button will uncollapse any comments that have been collapsed.
This lets you browse the comments in kind of the "opposite" way of normal—instead of collapsing the conversations you don't want to read, you start out with only the top-level comments visible, and can un-collapse responses if you want to read more.
There will probably be some more work done along these lines in the future. A user setting would probably be nice so that reply comments are always collapsed by default, if that's what you prefer. And I'd also like to see the collapsed comments say how many comments there are in that chain, since right now there's not really any way to tell how large of a discussion you might be un-collapsing.
I was wondering if someone would call me out on that. It wasn't really a choice that I made personally, but I thought it made reasonable sense as a parallel to the existing collapse buttons on individual comments.
I think I'd rather have it be done with text labels though, especially since on mobile there's no way to hover the buttons and see the descriptions of them like you can on desktop. Maybe they'd be reasonable to move to the sidebar, especially once we have some more comment visibility controls as well? There are plans to add various other controls related to highlighting particular comments, collapsing some, probably eventually hiding ones with particular comment tags, etc. So we'll probably need more space and labels eventually.
Feel free to direct your displeasure at me -- it was my decision, and I was ignorant of previous discussion on it as well.
My intent was to keep things very similar to the existing expand/collapse paradigm, and I also thought placing the buttons in the "topic comments header" was logical, as that section conceptually applies to all comments in the current topic (i.e., total # of comments, comment sorting, and now collapse children comments and expand all comments).
It would be also handy to see if there are new comments inside a collapsed chain (before the option of collapsing all non-new comments is implemented).
Yeah, it might even work well to display it similar to how the topics themselves do. We could probably have a collapsed thread show something like "14 replies (3 new)".
Agreed, I think doing it how Reddit (or is it RES?) does it would be ideal (similar to what Deimos describes in this thread), particularly if/when the default comment collapse/expand state becomes a user-configurable setting. In fact I'd say it'd be an essential requirement for that feature.
There's an extension that provides that functionality, amongst other things.
Good thought.
Very cool, a feature I didn't even know I needed! I like it a lot, way easier to get a quick glance at the comments. Thanks Jeff! (Not sure his username.)
Note that the orange stripe for new comments will only be there if the collapsed comment itself is new, it won't show up if one deeper down the thread is the new one. It would definitely be nice for it to work that way, but it's not currently how it works.
Doesn't this somewhat go against the given reasoning for the reply field to be at the bottom, so that you're encouraged to read the thread and its conversations to join in rather than post your own top level comment.
A tiny bit maybe, but that's really just intended to be a nudge towards reading the existing comments first. We can't force people to read them, everyone on desktop can always just hit the End key and jump down to the bottom immediately anyway.
Thank you Deimos, very cool!