Skip to content

Threaded post support for NodeBB

Let's Build It
146 5 92.3k 1
  • @DownPW Let me have a look.

    @phenomlab said in Threading support for NodeBB:

    @DownPW Let me have a look.

    Thanks Mark 🙂

    @phenomlab said in Threading support for NodeBB:

    @DownPW seems fine, yes. Any obvious conflict with other elements?

    Besides, my solution above is only partial. It turns out that sometimes I can no longer click to reply to the post via quick Reply. Nothing happens when I click to enter text

    It’s a bit the same problem as the previous bug.

    It would be more interesting to act on the dropdown menu than the other elements one by one but my attempts are not fruitful for the moment.

    We could kill one stone/two birds

  • @phenomlab said in Threading support for NodeBB:

    @DownPW Let me have a look.

    Thanks Mark 🙂

    @phenomlab said in Threading support for NodeBB:

    @DownPW seems fine, yes. Any obvious conflict with other elements?

    Besides, my solution above is only partial. It turns out that sometimes I can no longer click to reply to the post via quick Reply. Nothing happens when I click to enter text

    It’s a bit the same problem as the previous bug.

    It would be more interesting to act on the dropdown menu than the other elements one by one but my attempts are not fruitful for the moment.

    We could kill one stone/two birds

    @DownPW I see the issue. Can you please make the below CSS changes - notice the ones commented out and their replacements (which you should follow)

    .page-topic .topic .posts.timeline .timeline-event, .page-topic .topic .posts.timeline > [component="post/placeholder"], .page-topic .topic .posts.timeline > [component=post] {
        border-left: none;
        /* transition: transform 0.3s ease !important; */
        transition: margin-left 0.3s ease, margin-right 0.3s ease !important;
        background: var(--bs-body-bg);
        border-radius: var(--bs-border-radius);
    }
    
    li[component=post].threaded {
        /* transform: translateX(-100px); */
        /* transition: transform 0.3s ease !important; */
        margin-left: -75px !important;
        transition: margin-left 0.3s ease, margin-right 0.3s ease !important;
    }
    

    My expectation is that this will still work (but using margin instead of transform), and also ensure that the reverse dropdown is not being hidden by the [component="post"] elements.

    When you use transform on an element, a new stacking order is created for it. As you are transforming a parent which doesn’t have z-index of it’s own, a new stacking order for itself and child elements is created. As a result, the child element with z-index remains below the [component="post"] elements.

    If you want to see this in action before applying the CSS, you can remove translateX(-100px) from the li[component=post].threaded class and then try the dropdown menu again. You’ll notice it appears correctly this time, although the content is not being shifted because the translate has been removed.

    We replace it with margin which is slightly less performant when it comes to animation, but the nature of NodeBB is to lazyload posts, therefore, this negates the overall impact to the DOM.

    Let me know if this works.

  • Thats work. Many thanks for resolve
    Thanks for the information, I understand better.

    Would have a working solution other than mine for this :

  • Thats work. Many thanks for resolve
    Thanks for the information, I understand better.

    Would have a working solution other than mine for this :

    @DownPW is that still an issue? I can’t replicate that on your dev site?

    aef70b6b-f702-4a8e-9bab-c0bfd8a34628-image.png

  • Besides, my solution above is only partial. It turns out that sometimes I can no longer click to reply to the post via quick Reply. Nothing happens when I click to enter text

    cache maybe. I have delete the bugfix because not bug fix 🙂

    image.png

  • Besides, my solution above is only partial. It turns out that sometimes I can no longer click to reply to the post via quick Reply. Nothing happens when I click to enter text

    cache maybe. I have delete the bugfix because not bug fix 🙂

    image.png

    @DownPW said in Threading support for NodeBB:

    cache maybe. I have delete the bugfix because not bug fix

    Yes, I can’t reproduce this.

  • I mean bug is present but my bug fix don’t work properly.

    test to delete my cache and tell you

  • phenomlabundefined phenomlab referenced this topic on
  • @phenomlab not cache 😞

  • @DownPW PM me the link to the post.

  • actually, I noticed that it’s not on all the posts.
    it seems that these are the posts where the last response is that of the user (selfpost)

    DONE

  • actually, I noticed that it’s not on all the posts.
    it seems that these are the posts where the last response is that of the user (selfpost)

    DONE

    @DownPW I’ll have a look at this later

  • no problem.
    I have resolve this bug with change/replace this CSS CODE (I have just delete transform directive) :

    li.pt-4.self-post:not(.self-post .topic-owner-post).threaded {
       /*transform: translateX(0px) !important;*/
       transition: transform 0.3s ease !important;
       background: var(--bs-body-bg);
       background: var(--bs-body-navbar)!important;
       padding-right: 30px;
       margin-left: 0rem;
       padding-bottom: 0rem !important;
     }
    

    I don’t know if is a goodfix or not.

  • no problem.
    I have resolve this bug with change/replace this CSS CODE (I have just delete transform directive) :

    li.pt-4.self-post:not(.self-post .topic-owner-post).threaded {
       /*transform: translateX(0px) !important;*/
       transition: transform 0.3s ease !important;
       background: var(--bs-body-bg);
       background: var(--bs-body-navbar)!important;
       padding-right: 30px;
       margin-left: 0rem;
       padding-bottom: 0rem !important;
     }
    

    I don’t know if is a goodfix or not.

    @DownPW yes, was just typing that!

  • ha ha 🙂

  • Quick note here for anyone who is using the Threaded Posts code and has recently upgraded to 3.7.0 - only to find the threaded posts is now broken 💔

    This is being caused by the HTML structure changes that 3.7.0 makes in the DOM, meaning the element we used to target pre this release no longer exists. To resolve this, locate the line (within the threaded JS function)

    $('.topic .sticky-tools ul.list-unstyled').append(threadView);
    

    And replace it with

    $('.topic .sticky-tools .thread-tools').append(threadView);
    

    That should make it re-appear.

  • Mark hi,
    I dont have this code in my js functions.

  • Mark hi,
    I dont have this code in my js functions.

    @cagatay Yes, because you have legacy code. The line you have is this

    $('.topic .sticky-tools ul [component="topic/browsing-users"]:last-of-type').append(threadView);
    

    This will work fine because you are using the browsing users plugin, but should you decide to remove it, the threaded utility will cease to function. I’ve replaced that line with the below on your forum.

    $('.topic .sticky-tools .thread-tools').append(threadView);
    

Related Topics
  • 3 Votes
    2 Posts
    2k Views
    Very great
  • Block Domain

    Solved Let's Build It code javascript block domain nodebb
    26
    1 Votes
    26 Posts
    9k Views
    Yes ogproxy too is functionnal on dev
  • Threaded chat support for NodeBB

    Let's Build It threaded chat code
    35
    1
    19 Votes
    35 Posts
    12k Views
    @DownPW said in Threaded chat support for NodeBB: Better like this : add shadow and border-left on self answer Of course - you style to your own requirements and taste I’ll commit that CSS we discussed yesterday also
  • SEO and Nodebb

    Performance nodebb seo
    2
    2 Votes
    2 Posts
    1k Views
    @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.
  • who is read NodeBB

    Customisation read post nodebb
    6
    0 Votes
    6 Posts
    2k Views
    @cagatay You should ask in the NodeBB forums. Perhaps reference this post https://discuss.flarum.org/d/23066-who-read
  • Blinking text Effect

    Customisation nodebb text effect css
    3
    5 Votes
    3 Posts
    1k Views
    @phenomlab I love it too @phenomlab said in Blinking text Effect: Has that “broken neon light” look that you see in films. It’s exactly that, kind of old neon signs of bar or pubs a bit cyberpunk too
  • ineffecient use of space on mobile

    Solved Customisation nodebb
    10
    2
    7 Votes
    10 Posts
    3k Views
    @phenomlab Thanks
  • RSS parser script [NodeBB]

    Customisation nodebb rss script
    47
    9 Votes
    47 Posts
    19k Views
    @phenomlab said in RSS parser script [NodeBB]: @jac Not yet. Sorry. Have some other work commitments I need to prioritise. Hoping to get to this over the weekend. No worries at all mate, thanks