Skip to content

Threaded post support for NodeBB

Let's Build It
146 5 116.4k 1
  • wrote on last edited by phenomlab
    #1

    Based on the previous “threaded” capabilities Sudonix had in v2 of NodeBB, and despite me stating that it wouldn’t return… well - I’ve missed it! So much so, that I’ve completely redesigned and developed it.

    Those with eagle eyes might have noticed this toggle switch in the thread view - note that this will only trigger on desktops with a size of 1200px minimum for obvious screen estate reasons, so it won’t be available on mobile devices. I “could” make it available, but in my opinion, it would look horrible 🤢 (so I haven’t).

    So that does this “toggle switch” do?

    faa8375f-d823-44b0-9a3a-946a127f9ebb-image.png

    You’ll notice that to the left, you have a simple “bars” icon, and to the right, a “staggered bars” icon. This essentially means that if the toggle is off, the normal post view is presented -which looks a bit like this

    95922787-ecb2-48c0-a468-a22a06e71c7b-image.png

    Nothing new there you might say (apart from the timeline positioning perhaps…). Now toggle the switch…and you should see the “magic” happen

    d76fe017-2c01-4a63-a679-ca873e39f9d1-image.png

    You’ll (hopefully) notice that the post view becomes “threaded” in the sense that it takes the approach of whom is posting, and makes a decision to reposition those elements to give you a “threaded” view. This (well, I think so) significantly improves readibility on larger screens and makes the reading experience so much better on the eyes.

    Take a good long thread like the below to see it in full

    https://sudonix.org/topic/184/move-out-from-flarum-to-wordpress

    It’s hard to show you just how well this works without a video… So my advice is try it out for yourself 🙂

  • wrote on last edited by
    #2

    interesting.
    Can this code be adapted to the default view (without block per response)

  • interesting.
    Can this code be adapted to the default view (without block per response)

    wrote on last edited by
    #3

    @DownPW Not sure what you mean here - can you elaborate?

  • wrote on last edited by
    #4

    block like this :

    image.png

    And default view :

    image.png

  • block like this :

    image.png

    And default view :

    image.png

    wrote on last edited by
    #5

    @DownPW Something like this I think?

    b5104809-31c2-4548-86d5-0c0b6eceea85-image.png

    The answer is “yes”. I’m using custom styling on Sudonix, so the blocks won’t be seen by default - and that also means thaty the timeline needs to be moved also otherwise it looks terrible…

  • wrote on last edited by
    #6

    So, if you played around with the positioning a bit, and used psuedonym elements, you could get something a bit “reddit” like

    image.png

  • wrote on last edited by
    #7

    @DownPW better still…

    image.png

  • wrote on last edited by
    #8

    yes it’s good.
    I use default view for thread (not custom like you) so I don’t know what that would be like, I’ll have to try it to see.

  • yes it’s good.
    I use default view for thread (not custom like you) so I don’t know what that would be like, I’ll have to try it to see.

    wrote on last edited by
    #9

    @DownPW It might need some adaptions to work before I can release it based on the points you’ve raised. Leave it with me.

  • wrote on last edited by
    #10

    @DownPW developing against sudonix.dev currently so you have something to test. Almost done, but still needs some work.

  • wrote on last edited by phenomlab
    #11

    I’ll just leave this here 🙂

  • wrote on last edited by
    #12

    do you think it can be adapted for the stock default display of topics?

  • do you think it can be adapted for the stock default display of topics?

    wrote on last edited by
    #13

    @DownPW yes, but it’ll need a rewrite to be compatible with the stock NodeBB harmony theme. Sudonix makes a lot changes to the default layout so without those additional modifications, it’ll look odd.

  • wrote on last edited by DownPW
    #14

    ooh ok. I would have liked to apply it on my site too bad for me then 🙂

  • ooh ok. I would have liked to apply it on my site too bad for me then 🙂

    wrote on last edited by
    #15

    @DownPW not necessarily. I can still develop something for you to use as a base.

  • wrote on last edited by DownPW
    #16

    Oh really ?
    That would be super cool 🙂

    Have 2 versions maybe. One adapted to your personalized code and one adapted to Harmony (without customizing the appearance of topics (stock))

    I’m probably asking too much 🙂

  • Oh really ?
    That would be super cool 🙂

    Have 2 versions maybe. One adapted to your personalized code and one adapted to Harmony (without customizing the appearance of topics (stock))

    I’m probably asking too much 🙂

    wrote on last edited by
    #17

    @DownPW said in Threading support for NodeBB:

    I’m probably asking too much

    Nope. Not at all. I’m fact, developing one from stock Harmony is probably a better idea as it’ll work out of the box.

    Leave it with me.

  • wrote on last edited by
    #18

    I’ve set my DEV environment to vanilla and will develop a working solution for that.

  • wrote on last edited by phenomlab
    #19

    Hi All,

    Some very early (subject to the odd bug) code released in DEV. You will need an account there - let me know if you need a password reset

    https://sudonix.dev/topic/331/how-to-install-a-self-hosted-instance-of-iframely-for-use-with-nodebb

    This code is quite complex, and leverages some interesting CSS classes. The most important change is that it removes the stock timeline bar, and will replace it with it’s own. This is for a variety of reasons - mostly around cumulative layout shift and pseudo elements being used in the stock CSS.

  • wrote on last edited by
    #20

    I have tested but I don’t see switch on dev

    image.png


Related Topics
  • NodeBB Twitter / X embeds

    Let's Build It twitter script
    34
    21 Votes
    34 Posts
    16k Views
    DownPW
    @phenomlab said: @DownPW thanks for spotting (and fixing) this issue. I admittedly threw this together quickly for @jac some time ago, and it hasn’t had any love since. If OK with you, I’ll merge these changes into the github repository? No problem dude
  • Extended functions for Q&A NodeBB plugin

    Let's Build It q&a panels cards
    3
    4
    5 Votes
    3 Posts
    3k Views
    DownPW
    Very good like always
  • Nodebb 3.2.0

    Bugs nodebb nodebb 3.2.0
    20
    1
    2 Votes
    20 Posts
    7k Views
    phenomlab
    @crazycells yes, I’m aware of that. Need to fix EDIT- fixed. Caused by the same CSS that is used to absolutely position the “verified” group badge in the posts view. Amended this CSS so that is specifically targets the post stream as below li[component="post"] a[href*="/groups/verified"] { position: absolute !important; left: 8px; z-index: 2; margin-top: 1px; border-radius: 999px !important; line-height: 14px; display: block; height: 22px; margin-left: 0px !important; }
  • SEO and Nodebb

    Performance nodebb seo
    2
    2 Votes
    2 Posts
    2k Views
    phenomlab
    @Panda It’s the best it’s ever been to be honest. I’ve used a myriad of systems in the past - most notably, WordPress, and then Flarum (which for SEO, was absolutely dire - they never even had SEO out of the box, and relied on a third party extension to do it), and NodeBB easily fares the best - see below example https://www.google.com/search?q=site%3Asudonix.org&oq=site%3Asudonix.org&aqs=chrome..69i57j69i60j69i58j69i60l2.9039j0j3&sourceid=chrome&ie=UTF-8#ip=1 However, this was not without significant effort on my part once I’d migrated from COM to ORG - see below posts https://community.nodebb.org/topic/17286/google-crawl-error-after-site-migration/17?_=1688461250365 And also https://support.google.com/webmasters/thread/221027803?hl=en&msgid=221464164 It was painful to say the least - as it turns out, there was an issue in NodeBB core that prevented spiders from getting to content, which as far as I understand, is now fixed. SEO in itself is a dark art - a black box that nobody really fully understands, and it’s essentially going to boil down to one thing - “content”. Google’s algorithm for indexing has also changed dramatically over the years. They only now crawl content that has value, so if it believes that your site has nothing to offer, it will simply skip it.
  • Where are widgets stored?

    Solved Configure nodebb
    3
    1 Votes
    3 Posts
    1k Views
    Panda
    @phenomlab Thanks, have DMed you
  • Setting up a beta NodeBB v3 environment

    Moved Let's Build It nodebb upgrades beta1
    14
    3
    11 Votes
    14 Posts
    6k Views
    phenomlab
    @dave1904 excellent news. Thanks for the feedback
  • background color of the footer area

    Solved Customisation nodebb
    7
    1
    7 Votes
    7 Posts
    4k Views
    crazycells
    @phenomlab thank you very much
  • unable to upvote on forum

    Solved Performance
    10
    1
    3 Votes
    10 Posts
    4k Views
    Hari
    @phenomlab yes, i can understand. it is working now