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
  • 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 design

    Solved General nodebb
    2
    1 Votes
    2 Posts
    1k Views
    phenomlab
    @Panda said in Nodebb design: One negative is not being so good for SEO as more Server side rendered forums, if web crawlers dont run the JS to read the forum. From recollection, Google and Bing have the capability to read and process JS, although it’s not in the same manner as a physical person will consume content on a page. It will be seen as plain text, but will be indexed. However, it’s important to note that Yandex and Baidu will not render JS, although seeing as Google has a 90% share of the content available on the web in terms of indexing, this isn’t something you’ll likely lose sleep over. @Panda said in Nodebb design: The “write api” is preferred for server-to-server interactions. This is mostly based around overall security - you won’t typically want a client machine changing database elements or altering data. This is why you have “client-side” which could be DOM manipulation etc, and “server-side” which performs more complex operations as it can communicate directly with the database whereas the client cannot (and if it can, then you have a serious security flaw). Reading from the API is perfectly acceptable on the client-side, but not being able to write. A paradigm here would be something like SNMP. This protocol exists as a UDP (UDP is very efficient, as it is “fire and forget” and does not wait for a response like TCP does) based service which reads performance data from a remote source, thus enabling an application to parse that data for use in a monitoring application. In all cases, SNMP access should be “RO” (Read Only) and not RW (Read Write). It is completely feasible to assume complete control over a firewall for example by having RW access to SNMP and then exposing it to the entire internet with a weak passphrase. You wouldn’t do it (at least, I hope you wouldn’t) and the same ethic applies to server-side rendering and the execution of commands.
  • Unable to change icon in NodeBB navigation

    Tips navigation nodebb
    1
    7
    1 Votes
    1 Posts
    896 Views
    No one has replied
  • Setup OGProxy for use in NodeBB

    Moved Let's Build It ogproxy opengraph npm node
    110
    2
    21 Votes
    110 Posts
    55k Views
    phenomlab
    @crazycells said in Setup OGProxy for use in NodeBB: are they cached for each user separately? No. It’s a shared cache @crazycells said in Setup OGProxy for use in NodeBB: additionally, this is also handling youtube videos etc, right? No. This is handled by nodebb-plugin-ns-embed
  • 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
  • IRC Server/Client - Chat App with NodeBB

    Linux nodebb irc server client
    6
    1 Votes
    6 Posts
    3k Views
    phenomlab
    @Hari not sure from the consumer perspective, but Skype has been all but completely consumed by Microsoft Teams when it comes to business usage.
  • Adjusting the size of boxes in posts-list class

    Solved Customisation nodebb
    3
    3 Votes
    3 Posts
    2k Views
    crazycells
    @phenomlab thanks a lot, this combination works best .posts-list .posts-list-item .content { overflow: auto; max-height: 600px; }
  • [NodeBB] username cards

    Solved Customisation nodebb
    8
    5 Votes
    8 Posts
    3k Views
    Sampo2910
    @phenomlab Aha…nice to know. As always thank you for the reply and information.