In a discussion titled ‘Topic list custom view’ under the Dev category, vadim0426 seeks guidance on implementing a custom topic list layout resembling a timeline-based grouped view in a Discourse theme. They express concern about the complexity, particularly around server-side changes needed for timeline features. merefield recommends the Topic List Previews plugin, which includes a Masonry renderer and can be extended by overriding Ember components and templates with custom CSS. vadim0426 acknowledges the plugin’s quality but notes the steep learning curve without deep Discourse architecture knowledge. merefield reassures that most of the work is client-side, leveraging existing JSON data (like created_at) from endpoints such as /latest.json, and that server-side modifications are likely unnecessary. vadim0426 confirms the availability of required fields in the JSON and thanks merefield for the guidance.
I am developing new theme for Discourse forum. There are some feature I can’t understand how to do and is it possible.
Is it real to present topic list as on the screen?
Topic grouping by created date with timeline, etc…
If I understand correctly there will be a lot of code I have to override to show the list in this kind.
For instance loading topic behavior for loading (pagination) topic…
Somebody did something like that?
Take a look at the Topic List Previews plugin. I recently added a Masonry ‘renderer’ to it (and continue to enhance that). Your screen shot is not a million miles away from that work.
It’s surprisingly straightforward once you get into the groove.
You just need to override the topic-list and topic-list-item components and their templates and add your custom CSS.
Each of the internal elements in your above screenshot can just be divs you arrange in e.g. a CSS grid which you render for each topic.
Thank you. )) Your plugin is very nice. Good job!!
I am not new in EmberJS but there are lot of questions after looking your plugin code. I mean without good knowledges of the architecture of the forum is very difficult to create something similar. It would be not only css coding )). Timeline implementation for example: I’m sure the changes should be server-side related.
Well you can monkey-patch the server side too. But, not so sure you’d need to … presentation is largely the client side javascript & Ember (and the CSS, of course)… the Topics have date-time data in the json … I don’t think this will require much if any back-end changes.
Take a look at this site’s /latest.json … most if not all the data you’d need is there?