Topic List Previews Theme Component

Yes I can confirm there is no other Components or CSS interfering with the Topic List, because I run the following code to reset Discourse:
rake db:drop
rake db:create
rake db:migrate
And then I only installed ‘Topic List Previews Theme Component’.

1 Like

I just created a brand-new discourse on my Mac, and the problem is still there.
I followed the instruction here to install the discouse: Install Discourse on macOS for development

I believe you should be able to reproduce it.

1 Like

Yes, after update there seems to have been a breaking change. Will address and revert.

1 Like

Thanks Robert. ‘Topic List Preview Theme’ is the most useful theme in my heart, because it can attract users at first glance.

1 Like

This should now be fixed:

Please let me know if you have any further issues.

2 Likes

It works. Thanks, Robert.

1 Like

The sidecar plugin and there this experimental setting topic list enable thumbnail black border elimination is messing avatar uploads.

Kind of more detailed case can be found here:

1 Like

Yeah, it’s messing with a couple of things. Just turn it off. It’s experimental. If it’s not default off I’ll fix that in a future release.

It’s very useful for Youtube videos that have black borders.

That was more or less FYI.

Very can be under debate if it breaks avatars at same time :wink:

1 Like

Just leave it off if you are not promoting YouTube videos to Topic List thumbnails and at the same time trying to calculate Dominant colour for the background.

If you want Dominant colour, you want this because without eliminating the black borders, the colour will often be extremely garish.

Presently i’m afraid you will have to toggle it for those instances.

1 Like

In the OP there is an example that has the titles and poster avatars above the masonry images.
However, all forums that use the TLP right now seem to have the title below the masonry image, so I assume this is something that changed over time?

Is there an (easy) way to get it (back) above the images?

1 Like

Yeah, the layout was changed some time ago.

You’d have to fork and edit topic-list-item.hbr and deal with the CSS Grid too.

That screenshot should probably be updated!

1 Like

Just a note to users of the “plugin sidecar”, the “Remove Black Borders” feature should be less required now due to this change in core: Changes in the way Youtube embeds and/or thumbnails are being handled? - #2 by renato, so my suggestion is to leave it off unless absolutely necessary.

You can still toggle it and rebuild if you need to.

1 Like

I’m curious if we could include an excerpt of the topic’s most recent post (also perhaps the most recent unread post). It’s a feature I have on my custom-built community that I really enjoy and I want to bring it to discourse. I believe the info is mostly there since we have the post ids and users, but I have not looked into potential issues with including the actual content. Since the goal here is to “preview” the topic, it seems like a good fit for this component otherwise I’ll look into creating my own. Thanks!

1 Like

Yes, I’ve recently been working on a similar feature for a client (but on a completely different component). It’s a good idea.

PR would be accepted to add this feature as an option.

It would need to support both tiles and non-tiles …

1 Like

I’ve just added this to the OP:

1 Like

Liking the configuration of this theme component so far. A few questions, if I may:

I have this setting checked:

But my topic list items still don’t show likes on the topic list item:

Could this be because I have a custom theme built by Discourse, and maybe it’s overriding something, or might it be another culprit?


The second question is, are there any options for me to ensure all topic list items adhere to the same height/size for consistency’s sake? I don’t like how these items aren’t the same height:

1 Like

This requires the sidecar plugin linked in the description to be installed. Otherwise none of the action buttons (including like) will show.

1 Like

I did try installing the sidebar as well but it looks like that’s not a standard theme component? I tried installing via the “install with github link” method, but there was no about.json in the project.

Unfortunately, since we are an enterprise user, we can’t manually install anything on the backend.

No. This is a masonry format which uses variable height to preserve both the aspect ratio of the image and the expanding area to accommodate the excerpt.

You can’t guarantee all images will have the same aspect ratio and that all excerpts will have the same length.

1 Like