4 ms·
Show HN: Show descendant count on Hacker News 'more' links
- sillysaurusx 5y agoHacker News recently introduced Reddit-style comment hiding when there are too many comments in a subthread. This Tampermonkey script modifies your HN so that you see how many comments are waiting for you at each 'more' link. I find it much easier to browse HN now. It's immediately clear whether I'm missing a large subtree. It's nice for distinguishing 'more' vs 'reply', too. (I originally didn't notice it was a new feature, and rushed off to report a new "hidden comment bug," ha.) If you don't want to install a Tampermonkey script, or you want to preview how it looks, you can open your browser console and run the JS directly. [...byTag(document.body, 'a')].filter(x => x.innerText == 'more').map(x => { x.innerText = `${byClass($(x.href.split('item?id=')[1]), 'togg')[0].attributes['n'].value - 1} more`; (Be sure to run it on a story with hundreds of comments, or else you might not see any 'more' links at all. E.g. without this script, you might miss the 9 comments near the top of the Bel Show HN, since it's indistinguishable from the subtree with only 3 comments: https://news.ycombinator.com/item?id=21231208#21232605 https://news.ycombinator.com/item?id=21231208#21232605) Enjoy.
- dang 5y agoThere's a variable called maxnest* in the HN code which determines the depth at which these 'more' links show up. It has been 20 for years but I set it to 3 the other day and didn't realize I hadn't changed it back. I only just noticed that now. That's why you've been seeing so many more mores. I'm going to revert it now. Sorry for the inconvenience—I didn't mean to leave things in a state that people needed to write code to compensate for. Some similar feature is likely to appear sometime soon because we badly need to do something about top-heavy pages. But if we use the 'more' links, they'll show number of descendants. It will either be 'more' links or starting off the sub-subthreads as collapsed. The disadvantage of the latter is that if there are 10 replies that need collapsing then you'd need to show 10 collapses, which is a pain.
- sillysaurusx 5y agoWait wait, I'm sorry! I had no idea that my Show HN would feel like a complaint. It's certainly not an inconvenience. I left you some encouragement here, if you missed it: https://news.ycombinator.com/item?id=27443967 https://news.ycombinator.com/item?id=27443967 This was just me being excited about having something small to do related to HN. I'm sorry I presented it badly. (It's not like I was like, "ughh, I have to write codeee..."; that's the best part for me. I just wish I could help you with the performance issues or the Common Lisp port, but I don't know if you're keen on that, and I doubt the codebase is modular enough to share it sans the sensitive bits anyway.) Some similar feature is likely to appear sometime soon because we badly need to do something about top-heavy pages. But if we use the 'more' links, they'll show number of descendants. It will either be 'more' links or starting off the sub-subthreads as collapsed. The disadvantage of the latter is that if there are 10 replies that need collapsing then you'd need to show 10 collapses, which is a pain. For what it's worth, having that number made all the difference. Seeing "9 more" vs "2 more" was a huge signal. If you haven't tested out HN in that form, I encourage you to try; it felt incredibly natural. I'm serious when I say it didn't feel like much of an inconvenience. But... if you start subthreads collapsed, it means it's loading all the comments, so I don't see why it would help with performance. So this seems like a social design issue. In that context, are you sure top-heavy pages are a problem? If so, alright, but for what it's worth the [-] button worked wonderfully for me. Maybe others feel differently. Anyway, just happy to see you trying new things once in awhile. Have a good evening.
- dang 5y ago> if you start subthreads collapsed, it means it's loading all the comments If we went with the collapse UI for this, we'd have to lazyload the comments on uncollapse. That would be a pain, which is another argument for using 'more' links rather than collapses to solve this particular problem. On the other hand, it breaks the UI paradigm to have to go to a different page to continue reading a subthread, and there would be strange consequences (e.g. if you click 'parent' to go to the parent subthread, then the 'more' links will switch to a different set of comments).
- 5y ago