[Mainsite] Forum link for chapters isn't a link [Planned future change]

Fed-Kun's army
Joined
Sep 22, 2018
Messages
25
The forum link for a chapter appears to be handled using JavaScript instead of an actual link, so you can't middle- or right-click on it. It also doesn't get a shaded background when you hover over it like the other links within a chapter link.
 
Yuri Enjoyer
Staff
Developer
Joined
Feb 16, 2020
Messages
462
We have some technical constraints atm around that. Threads are created on-demand (to avoid pre-creating a bunch of empty threads, at least to some extent). So if something doesn't have a thread yet, we need to first trigger an API call to ask for the thread to be created, then open it.

Hence the fact that it's JS in most places atm. We're evaluating ways to improve it though.
 
Fed-Kun's army
Joined
Sep 22, 2018
Messages
25
That makes some sense, though it shows a comment count, so I'd think you could at least make the ones that you know have comments a link.
 
Banned
Joined
Dec 3, 2019
Messages
2,584
OK, so just have middle-click, shift-click, ctrl-click, etc, fire off the correct API calls, and then remain consistent with normative browser behavior... there's got to be libraries that help with this, if they'd even be needed.

really though it should just be a normal link, and the thread creation just handled server-side and then the client gets a redirect to it.
 
Yuri Enjoyer
Staff
Developer
Joined
Feb 16, 2020
Messages
462
really though it should just be a normal link, and the thread creation just handled server-side
That is in fact exactly what happens; which means that we don't have a link to put on the button prior to it being clicked. The alternative is eagerly creating all the threads, which would cause a lot of resource waste on hundreds of thousands of empty threads no one would ever write in...

and then the client gets a redirect to it.
yup, that's exactly how it's done right now; but since the link isn't there from the get go, that happens in Javascript, once the API replies with the newly created thread id 😅

Either way, we have some rough ideas of how to improve it, this is merely the very first version of the site with forums support at all, and we decided it was preferable to bring comments, even if suboptimally, rather than make everyone wait longer. But yes, we're well aware of the current limitations :thumbsup:
 
Banned
Joined
Dec 3, 2019
Messages
2,584
no, i'm saying that the button should be a normal link to the thread (if the thread exists) OR to an endpoint that creates threads and redirects (if the thread doesn't exist)

as long as it's an open issue and not a wontfix 🤷🏻‍♂️
 
Yuri Enjoyer
Staff
Developer
Joined
Feb 16, 2020
Messages
462
OR to an endpoint that creates threads and redirects (if the thread doesn't exist)
Can't have your href be a POST unless it's a form, which is a lot of issues
best we could do is an awkward GET endpoint that returns a 3XX, which also has many problems

as long as it's an open issue and not a wontfix 🤷🏻‍♂️
yup, we'll get to it
 
Fed-Kun's army
Joined
Sep 22, 2018
Messages
25
It looks like it's a link now for chapters that have a thread, though still a button otherwise.

Also I noticed a new thread that said it had 0 comments, but actually it had 2. I guess the comment count is cached for a bit?
 
File Attacher
Staff
Super Moderator
Joined
Jan 20, 2018
Messages
273
It looks like it's a link now for chapters that have a thread, though still a button otherwise.

Also I noticed a new thread that said it had 0 comments, but actually it had 2. I guess the comment count is cached for a bit?
I think i remember seeing somewhere about it being 15 minutes or so between updates..

found it
https://discord.com/channels/403905762268545024/404025002568974347/1061533630616322160

Tristan 9 — 01/08/2023 7:35 AM
yeah the count displayed on site updates every 15 minutes (at most) (edited)
 

Users who are viewing this thread

Top