How can I design comments differently from answers if I use threaded layout within topic?
- 8 years ago
Welcome Manuel and congrats to your first post on the Lithium Community :)
Right now there's no CSS class in the default DOM that Lithium creates that would allow you to determine the thread depths - and style accordingly - if the threaded layout is used. As you can see from Airbnb's DOM they worked around by overriding the default message view with a custom component and inserting an intermediate container that exposes the reply depth as a CSS class.
When going for a custom component you can use the message context object's message.parent method to determine if the current message is the root message or a reply. To determine multi-level depth you would need to check the Community API v2 "message" collection and the depth field for that message.