Very great š
Threaded post support for NodeBB
-
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.
-
I have tested but I donāt see switch on dev
-
@DownPW It only triggers at
1200px
and above - do you have your browser size set smaller? -
Just added some transition effects. Note that depending on how many elements there are on the screen, this might cause layout shift.
-
oh yes Iām on 1920 x 1080 screen
oups
-
@DownPW Does it work now? By
1200px
I meant wide -
hmmmm nope
-
Odd. Seems to work for me.
-
nope itās normal, iām on 1080px height
-
@DownPW Iām going to reset your DEV password and login as you to check
-
I see why. Let me fix that
-
@DownPW can you log back into DEV and try again? Should be working now.
-
Hereās a video of the threading code working on stock Harmony on NodeBB.
However, itās important to note that the timeline bar is removed and recreated. There is a good reason for this, as without taking this route, it would mean that the timeline bar will look out of place. Itās certainly possible to use the existing bar and use a variety of CSS to move it around, although this is VERY inconsistent in my testing, and lands up being far too complex when it comes to having multiple CSS classes that do not include a specific scenario etc.
In this case, itās so much quicker to hide and replace the existing one - we do this in the default view also with the threaded view disabled, and Iām sure you wonāt notice the difference For obvious reasons, this code is configured to only fire on displays of
1200px
or more - obviously, firing on a mobile device wouldnāt look very good at all.Hereās the video
If you like what you see, hereās the code.
https://github.com/phenomlab/nodebb-harmony-threading
Final note - The code you see in the video is designed to work with stock Harmony. The code running on Sudonix is VERY different and uses a variety of CSS to render the view you see here. Itās āpossibleā to emulate this look, although it does mean that you will have to replace your custom CSS with that of Sudonix.
-
@phenomlab wowā¦ that looks really cool. I need to fire up a NodeBB box and test.
-
NOTE: Minor bugfixes applied
-
this is very cool. Thanks @phenomlab
-
Very cool like as already said above and a big thanks for hard work (I see the th function.js and woowwww )
I test it now and I have see this with plugin user-browsers :
Do you know where it could come from?
This also breaks the display of the site title
Can we do the same thing but without expanding the topic toolbar on header ?
EDIT :
I see that you seem put other things in the function.js on github like banner, logo, fancyboxā¦
I said to myself that I found this file way too long without asking too many questions !ā> But I have the bug display with user browsers plugin which I will try to solve
-
@DownPW hmm. Not sure why I copied all of that code, but will change asap. I also have a fix for the browsing users plugin issue but didnāt include it because others might not be using it.
Iāll get to this as soon as I can.
EDIT - Done
EDIT 2 - I just noticed on your DEV box that you have (thanks to me - sorry) a ton of JS code you donāt need. You should probably clean that up. -
@DownPW said in Threading support for NodeBB:
Can we do the same thing but without expanding the topic toolbar on header ?
Yes, but then youāll have elements that are wider than the sticky bar which looks odd on scroll.
-
@DownPW said in Threading support for NodeBB:
Do you know where it could come from?
Yes, just fixed it in your dev environment. I assumed (probably incorrectly) that people may not have this installed, so omitted it. I fixed it in prod because I do have it there, but wanted to keep DEV as vanilla as possible.
Iāll need to write a function that checks for the existence of this plugin then determines where to inject the toggle switch
For now, see the below
$('.topic .sticky-tools ul .hidden-xs').append(threadView); // If you have browsing users plugin, comment out the above line and uncomment the one below //$('.topic .sticky-tools ul [component="topic/browsing-users"]:last-of-type').append(threadView);
Result (might need some position tweakingā¦)