OC Improved Collapsible Comments - Script that lets you collapse replies by clicking a line to the side of each comment

Download it from greasyfork

This userscript for kbin enhances the comment section adjusting the layout and adding a line to the left of each comment and its replies that lets you collapse them. The design is inspired by some custom subreddit stylesheets, and new reddit surprisingly enough (you know what they say about broken clocks)

Personally, I think this is the best way to handle collapsing comments here's a screenshot.

A video of it in action

If you don't have a userscript manager extension installed, you can install Tampermonkey, and then open the greasyfork link.

ernest,
ernest avatar

@artillect Love it

Wintar,
Wintar avatar

I'm having an issue where clicking anywhere on the comment will collapse it; Not just the line on the left. I couldn't figure out why myself, looking in the code, and it seems no-one else is having the issue?

artillect,
artillect avatar

That's a feature I added a bit later on, you should be able to disable it in the settings menu in the top right. However, this userscript is no longer supported, and has been added to KES (which you can install here), with some more config options added as well.

Wintar,
Wintar avatar

Perfect, thank you; Hadn't heard about KES yet

BananaTrifleViolin,

I love this, thanks so much for your hard work in making this, it's a huge UX improvement.

Velskadi, (edited )

Sorry for triple posting, but just wanted to test this out real quick. The script seems to basically work, but I've found a couple issues; After my second post it showed the line only on the first post. The second post didn't get a collapse line until I collapsed/uncollapsed the first post.
Second, when I edited a comment it removed the collapse line from that post until I edited a second time. This doesn't seem to be consistent.
Third, and this might just be on my end, at some point while editing the posts, the second post is now on the far right of the comments window, instead of just slightly to the right of its parent comment.

I don't think these issues will be a huge deal, and I'm still looking forward to using this. Thanks for making it!

EDIT: Should also mention I'm on Firefox as well, incase that matters.

artillect,
artillect avatar

Thanks for the feedback! I'll see what I can do about fixing those issues. I think I might have partially fixed the first one, but the new comment isn't nesting properly.

Edit: this is a test to see if editing is working
Edit 2: my change didn't fix that, I'm on it

JohnEdwa,
JohnEdwa avatar

For configuration, instead of the new button I think you should integrate them into the Kbin sidebar like is done by the kbin enhancement script.

artillect,
artillect avatar

I like the way that kbin enhancement does its config, but I plan on releasing the configuration for this script as a library that everyone can use in their userscripts, to make configs easy (and work cross-platform). I just need to finish it up and separate it into its own script

Spoonraker, (edited )
Spoonraker avatar

Edit: The issue was resolved, so please ignore this message. Thanks u/artillect!

There was an issue where the parent comment was in a column on the left side and its children were all on the right, but I adjusted the CSS:

   .entry-comment .children {
        /* grid-area: children; */ /* disable or delete this */
        display: flex;
        flex-direction: column;
    }

   .entry-comment .comment-level--2:first-child {
        margin-top: 3rem; /* Edit: If the child comment is long then the text will get cut off, so setting the margin and/or parent height conditionally could work*/
   }
artillect,
artillect avatar

What browser are you using?

Spoonraker,
Spoonraker avatar

I'm using Firefox.

artillect,
artillect avatar

Glad to see it was just the issue with Firefox, lemme know if you run into any other issues!

SuaveBet,

Perfect, thank you!

Shortcake,
Shortcake avatar

After the fix, this is amazing!
Awesome work artillect!

jeebus,
jeebus avatar

Ahhhhhhh that's so much better now. Thanks so much!!!!

IBNobody,
IBNobody avatar

Yessssssss. This one is how I wanted it to be.

Noki, (edited )
Noki avatar

Edit: Already fixed, Thank you very much.
This is how it looks to me.
im on firefox kbin.social with kbin enhancement script an the optins for Show collapse comment Show collapse replies off

artillect,
artillect avatar

I think I know what the issue with that is, should be an easy fix!

artillect,
artillect avatar

I fixed the issue, try updating! Apparently Firefox doesn't support the experimental :has() selector by default

Noki,
Noki avatar

it worked, thank you very much

BaroqueInMind,
BaroqueInMind avatar

Yes. This script is amazing!

artillect,
artillect avatar

Thank you!

McBinary,
McBinary avatar

@artillect @ernest

So, I have been using this script for a couple of weeks, and I can honestly say at this point that I cannot fathom using kbin without it. I really hope this gets rolled into core in some way.

Thank you @artillect !

JohnEdwa,
JohnEdwa avatar

This script hides the "expand message" thingy that appears on long messages like on this one: https://kbin.social/m/kbinStyles/t/12515/Share-your-CSS-and-JS-snippets-here#entry-comment-52434

artillect,
artillect avatar

I just released an update that adds that back, thanks for pointing that out

fl4shback,
fl4shback avatar

Thank you so much for this script ! Improves readability and clarity so much !
Hope it inspires ernest to build something similar natively.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinStyles
  • rosin
  • osvaldo12
  • thenastyranch
  • DreamBathrooms
  • khanakhh
  • magazineikmin
  • InstantRegret
  • Youngstown
  • slotface
  • mdbf
  • love
  • kavyap
  • GTA5RPClips
  • everett
  • anitta
  • cubers
  • ethstaker
  • Durango
  • ngwrru68w68
  • tacticalgear
  • modclub
  • cisconetworking
  • Leos
  • provamag3
  • normalnudes
  • tester
  • megavids
  • JUstTest
  • All magazines