Eric Hodel (drbrain) wrote,
Eric Hodel

  • Mood:

Comment Threading

Today I added pagination to the entry view pages. (We're starting to get entries with 100+ comments in them, and the pages are taking a bit too long to render.)

Next up is comment collapsing, but that feels a bit more difficult. Livejournal, for example, has some really fancy algorithm for doing it that looks really good.

Where there is a root comment with a reply that then has a bunch of replies, the root comment and its reply are not collapsed, but all of the 3rd-level children will be collapsed.

It seems that a thread can go as much as 5 deep before it is collapsed if it is linear.

Also, collapsing is only triggered if there's N comments, where I think N is 50.

I guess I should try to wander through the livejournal code base and see if any of it makes enough sense to figure out how they do things so awesomely.

There's just one other question I have... How do I fetch only the comments I need for a page? Right now I fetch all the comments then throw away the ones I don't need (this probably isn't a big deal).

  • (no subject)

    I dreamed I was in a grocery store with my mom reading Seattle Weekly from sometime late at night until 11AM. The Seattle Weekly had an article about…

  • Free Microwave! (and stuff)

    I have a convection oven microwave (this means you could bake a cake in a metal pan in it) I'd like to get rid of. If you or anyone you know would…

  • Tools!

    Today I used several of my tools. My new Collector Vehicle plate arrived, so I retired the 948-MPC plates to my closet and attached the new plate.…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.