From my understanding, we should be able to enable threaded comments on forum discussions, right? Currently, all comments to any post are all left aligned. I'd like to show replies to each comment as threaded (or indented). Is that possible? If so, can someone give me some guidance?
To enable threaded post, You can find these settings under Community Admin > Discussion style Tab > Posts & Topics > Topics to Display Tab >: Linear Format: Sorting order within topics
See Screenshot attached:
and Make them intended for each post you need to add custom CSS and some customization to add intended class.
Thanks for the information, @Parshant. I've already done what you've outlined, but we would want it threaded for each post. Would you, by chance, know how to implement the custom CSS?
We have this same exact issue. I can't believe threading isn't an out of the box functionality.
I know, right? I've been surprised (and a bit disappointed) by that.
Threading is literally a deal-breaker for us. We have to figure something out. ARGH!
@Nava_Schneider @calebmt - I know it is heartbreaking that this is not the OOTB feature - however, Lithium has been working on a lot of such updates since the JiveX acquisition, so these should be pretty much covered down the line. In the meantime, this is absolutely achievable via some customization and it works really well. We have implemented a lot of these for our customers. Here is a screenshot for one example -
I hope this helps.
This is great! Any chance you’d share that code? :-D. Also curious how it works for replies-to-replies (and beyond!).
I've shared the engineering approach here (Caveat: There is no code sample to copy though):
https://lithosphere.lithium.com/t5/Developer-Discussion/How-can-I-design-comments-differently-from-a...
From a styling perspective replies to replies indeed is the challenge as there's only so much indentation you can add. Most communities I've seen therefor rely on just adding a left hand margin to replies in general.
Here's two examples:
https://community.eu.playstation.com/t5/PlayStation-VR/Vr-and-next-gen/m-p/25755644
https://community.withairbnb.com/t5/Hosting/Plastic-bottles/m-p/652450#M152605
@VarunGrazitti wrote:@Nava_Schneider @calebmt - I know it is heartbreaking that this is not the OOTB feature - however, Lithium has been working on a lot of such updates since the JiveX acquisition, so these should be pretty much covered down the line. In the meantime, this is absolutely achievable via some customization and it works really well. We have implemented a lot of these for our customers. Here is a screenshot for one example -
I hope this helps.
@VarunGrazitti this is exactly what we're looking for! @LarryI, check it out!
Thanks for the info, @ClaudiusH!I will see if our developer can wrap his head around this.
Very helpful, @VarunGrazitti! I'll see what we can do to implement something similar.
Here's how Lithium Professional Services typically deals with indented replies:
1. Add a component named "forums.widget.message-view-two@override" in Studio with the following code:
<#assign exemptPages = ["ReplyPage","PostPage","EditPage"] /> <#if !exemptPages?seq_contains(page.name)> <#assign msg = env.context.component.getParameter("message") /> <#if (msg.uid)?has_content> <#if (msg.parent)?has_content> <#if (msg.parent.parent)?has_content> <#if (msg.parent.parent.parent)?has_content> <#assign msgDepth = 3 /> <#else> <#assign msgDepth = 2 /> </#if> <#else> <#assign msgDepth = 1 /> </#if> <#else> <#assign msgDepth = 0 /> </#if> </#if> <div class="<#if msgDepth?number gt 0>custom-reply custom-reply-indent custom-reply-indent-${msgDepth}</#if>"> <@delegate/> </div> <#else> <@delegate /> </#if>
2. Add these styles:
.custom-reply { padding-left: 0; &.custom-reply-indent-2 { padding-left: 30px; } &.custom-reply-indent-3 { padding-left: 60px; } } .lia-component-solution-list { .custom-reply-indent-2, .custom-reply-indent-3 { padding-left: 0; } }
Hope this helps!
Hey @TysonN,
I have a customer asking who is curious of this work around in the code. Right now, there is multiple customer requests about having threaded discussions being part of the out of the box product. There question is two fold:
Let me know when you can please and thank you!
1. I believe so, yes. Khoros Services is still using variants of this code in many communities.
2. It will apply to all discussions. It's an override of the out-of-the-box component which handles rendering for each message within the ForumTopicPage thread.
Tyson - have you ever implemented and do you have any screenshots you can share please?
If this is a true threading solution, I would love to implement. Where does this code get added - I am sure the majority of Lithium customers would like to implement.
Thank you,
Toby
I believe OOB threaded replies is on the community roadmap (according to a recent webinar). I don't recall the exact timeline, but I think it is still a bit far out. Was it beginning of H1 2020?
Hi @Wendy_S !
Thanks for popping in and you are correct: this is in the roadmap, but I believe for private messages rather than the open discussions - not sure why.
Cheers,
Toby
I have implemented this strategy for an indented threaded view on the community, however this is causing a lot of REST call usage when viewing the component in Toolbox. Is there a way I can implement this strategy without using so many context objects and reducing the amount of REST calls?
Sorry - to clarify, the reason there are so many REST calls is because I needed to check if a user had their settings set to threaded view on the forums.widget.message-view-two component to see if I needed to add this customization, and this was called on every single message.
It looks like Inline and Threading is for regular discussions (not just PMs) is indeed on the roadmap. PM threading will GA in 19.12 (stay tuned in release notes). Maybe @SohilM can give us a status on threaded messages for discussion posts.
This code throws a Freemarker error when used with the inline replies feature and you hit the Preview button there.
Specifically, this line:
<#if (msg.uid)?has_content>
The error is:
An error has occurred when reading existing sub-variable "uid"; see cause exception! The type of the containing value was: extended_hash+string (lithium.eval.velocity.MessageTemplateModel wrapped into f.e.b.StringModel)
I assume there is some way to error check for this condition, but I can't figure it out.
Any tips?
Today I learned what attempt/recover tags in Freemarker can be used for...which solves the problem I pointed out above.
Welcome to the Technology board!
Curious about our platform? Looking to connect on social technology? You've come to the right place!