Yeah, this is unfortunately the best way to do it though. You've always been able to quote things this way (the "Follow-up" button has always used this), but I've changed the way they look now because it was needed to improve performance.
Since we render everything on the server, this quickly stacked up to a page containing 50 responses ending up with 100 responses. For every single response, we also fetch the author and its question (+ the question's author) if applicable. This means we were running over 200 SQL queries to load a single 50 response page.
This quickly tanked performance on profiles which uses "Follow-up" a lot, leading to >1500ms load times.
Since I've been splitting the templates/ directory into using "partials" (sub templates which are just a single component), I decided to add a partial for rendering responses:
(Note this is the same way chat messages are rendered! We still render everything on the server, just at different times now.)
The has taken load times on such heavy profiles from 1s+ to around 400ms on average. I had to change the template for follow-ups because:
I didn't really like it, I think the Twitter-like format looks a little better (although it can still be cleaned a little more here to make it more visually obvious)
Everything is loaded through the include-partial custom element, which is like an iframe if it didn't use ShadowDOM. It's much easier to make a clean HTML template using this instead of the other solution
Anyway, hope that helps explain some things! Forum-style quoting has also been mostly supported, though, since that's mainly just on the Markdown parser (except for the interactions).
Yeah, this is unfortunately the best way to do it though. You've always been able to quote things this way (the "Follow-up" button has always used this), but I've changed the way they look now because it was needed to improve performance.
When we pulled responses previously, we did this:
Since we render everything on the server, this quickly stacked up to a page containing 50 responses ending up with 100 responses. For every single response, we also fetch the author and its question (+ the question's author) if applicable. This means we were running over 200 SQL queries to load a single 50 response page.
This quickly tanked performance on profiles which uses "Follow-up" a lot, leading to >1500ms load times.
Since I've been splitting the
templates/
directory into using "partials" (sub templates which are just a single component), I decided to add a partial for rendering responses:https://neospring.org/_app/components/response.html?id=7418214140306cbe06159b5770b62a853bfc09ed2deafe0d778f1b5392e0c15e&do_render_nested=false
(Note this is the same way chat messages are rendered! We still render everything on the server, just at different times now.)
The has taken load times on such heavy profiles from 1s+ to around 400ms on average. I had to change the template for follow-ups because:
include-partial
custom element, which is like an iframe if it didn't use ShadowDOM. It's much easier to make a clean HTML template using this instead of the other solutionAnyway, hope that helps explain some things! Forum-style quoting has also been mostly supported, though, since that's mainly just on the Markdown parser (except for the interactions).