Topic list custom view

Hi,

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?

Thank you.

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.

You could fork TLP as a head start.

2 Likes

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?

2 Likes

Yes, you are right. There is created_at field and some more fields I need to show in the template.
Thank you!

1 Like