Topic List Previews

(Anton) #285

Okay, I tried the plugin again, but it turns out that your plugin turns OFF the “category” column in all categories - this is not expected nor intuitive, which was discussed above already. Had to switch the plugin off again.

Please let us know if you’re willing to fix it.

(Angus McLeod) #286

Hey, thanks for trying it out again.

There are two ways to use the plugin.

1 - Globally.

To set or unset the features globally, check or uncheck these items in the Plugins settings.

2 - Category by Category.

To set or unset the features on a per-category basis, check or uncheck these items in the ‘Settings’ panel of a category.

Please make sure the setting ‘universal list category badge move’ is turned off.

(Angus McLeod) #287

Generally, I need to update the description of this plugin. Will do that in a sec. edit: it seems as though I can no longer edit my original post for this topic :confused: I wonder what limit I’ve hit.

A sketch would be great. Thank you. The ‘mobile’ version is mainly a matter of style, so if someone can provide a good design, then I can do this relatively easily.

I have a general idea, but can you give me some more detail of what you have in mind.

The devil is in the detail on this one. Maybe give me some more detailed specifications of how you think it should work, i.e. who can set the image, where the image is set etc. An example of where this is done elsewhere would help as well.

(Tobias Eigen) #288

I can see two places where the default topic thumbnail image could be configured:

  • under admin settings, provide a universal list default image setting, which would be a URL similar to e.g. logo url setting. (incidentally: can these admin settings not be renamed to Topic List Previews? I always forget how to find them)

  • under category settings there is an images tab, where a category logo image and category background image can be set. Either just add an admin setting universal list use the category logo image to toggle using the category logo image as the default, or add another setting here like the others to allow the setting of a universal list default image for this category.

(Angus McLeod) #289

Yes I was just thinking this the other day. Done!

(Anton) #290

The author of the topic should be able to choose from the photos of any posts in that topic. Mods and admins should be able to change that as well - the same as they can do for the other topic content.

Any challenges here that you would like to discuss?

I support doing it in both places.

I did not check anything in the global configuration. I only checked the first two checkboxes for a single category. However, it ended up removing a “category” column from the whole forum.

(Angus McLeod) #291

@meglio Ok, I’ve tightened the category column show / hide logic. Please update to the latest commit and try again.

  1. Double check that the universal setting (Plugins > topic_list_category_badge_move) is in fact turned off.

  2. Keep in mind that in vanilla Discourse categories with no children do not have a category column. For example, the hosting category on meta.

Thanks for your patience.

(Tobias Eigen) #292

Hey @angus have an odd scenario on namati - take a look. The first post in the screenshot below initially had an image attached that somehow did not upload correctly and I deleted it. I then undeleted it and removed the image and pasted in the correct text for the post. For some reason the preview (which is missing) is still showing up on topic lists. Any ideas?

(Angus McLeod) #293

Hey, sorry for the tardy reply. I think I know what’s going on. I’ll fix it within the next day or so

(Tobias Eigen) #294

Thanks! Seems only to be on latest now.

(Angus McLeod) #295

Moving a discussion here from a PM with @Pad_Pors about further design changes to topic previews. (it’s in mid-stream).

I should have also mentioned that these three pieces of information I flagged as not being handled by topic previews are already shown on the topic row. So I guess the question I should have posed is whether there should be an option to move them.

Actually, the only differences in content between a medium topic preview and the topic previews plugin are

  • The naming of who liked it: “…recommended by Anil Dash and 396 others…”. I think Anil Dash is named because I follow him on Medium. You can’t follow people in Discourse. I doubt whether naming random likers would have much utility. Although it is true that forums typically have both leaders and ‘personalities’ whose opinions are valued.

  • The time it takes to read it. The question is whether this makes sense when the primary content is discussion (i.e. a Discourse topic), rather than a single opinion (i.e. the Medium article). Yes Medium also has a discussion section, however the time taken to read does not include the comment section. I don’t think this concept translates as a discussion is inherently varied in content. You don’t need to read every single post in a topic to consume it. Whereas, an article is a linear piece of content you’re meant to consume in a single sitting.

  • The user menu (down arrow) in the bottom right. This exists because Medium tries to curate your home feed with articles you’re interested in. It gives you feedback options to tweak that curation. This is perhaps the most interesting difference as it brings up the question of whether the default ‘home’ feed should be personalized in some way to each user’s interests or should be based on general criteria, like ‘latest’ as it is currently in Discourse. I’m sure this point has been discussed or at least thought about before with respect to Discourse. There’s an interesting discussion about the ‘Top’ criteria here. I think this is a slightly separate discussion however as it is more about the selection of topics, rather than their presentation in a discovery stream.

So with those three differences eliminated, the question of recreating the Medium style of topic previews with the topic previews plugin comes down to one of arrangement.

On that point, I would then introduce the Quora style of topic previews.

First, to dispense with the point that Quora previews have some different content, highlighted in the screenshot.

  • The social share options already exist in Discourse and could be added to topic previews. Personally, I’m not super excited about that idea, but am open to it.

  • The upvote / downvote feature in Quora seems to feature in to how topics are selected for promotion in your feed; i.e. it seems to equate to ‘interest’, however I’m not entirely sure as I rarely use Quora. I note that in addition to topics / questions have upvote / downvote, answers also have upvote / downvote. The utility of this feature in Quora is slightly different from that in a more technical site like Stack Exchange, as it is less about the ‘correctness’ of the answer (or topic) than its ‘desirability’ or ‘popularity’, whether of the content itself, or of the author of the content. Again, I think this is a separate discussion. I’d also flag this topic in this context.

This leaves us with arrangement per se. The distinguishing aspects of the topic previews in these more ‘media-like’ opinion and discussion platforms is that the content is presented in a single box / container, rather than columns. This single box typically has some version of this structure:

  1. Title and OP details.

  2. Full width preview image

  3. Topic actions (i.e. like, bookmark, downvote).

If you mentally envisage translating this single content box, or ‘card’ if you like, to Discourse you can quite quickly see the design problem it poses: The Discourse discovery stream is significantly wider than the discovery stream on sites like Medium and Quora. This is because those platforms all have sidebars with either personal or curated content and features.

It is possible to have sidebars in Discourse as well. There are some sidebar plugins. I also have made my own secret sidebar plugin which I haven’t released, largely because it’s hard to turn it into a plugin with translatable utility without requiring custom technical implementation for each context in which it is used. I don’t want to release features in a plugin of general application that assume the existence of other plugins or customizations.

Needless to say I’ve thought about this a fair bit and I don’t think the Medium or Quora topic preview design works without fundamental alterations to the Discovery stream. As such I don’t feel like it’s currently productive to pursue this line in the context of this plugin. I’m going to focus here on perfecting the current design and improving the current functionality.


  1. If anyone wants me to pursue further design changes to topic previews, I need a concrete proposal that would work within context of the normal Discourse discovery stream. For the reasons mentioned, I think the Medium / Quora design with a single content box does not translate without more significant alterations to the discovery stream which are outside the scope of this plugin.

  2. That said, if you are super keen on translating the Medium / Quora design, all of the content is already there. It’s a matter of rearranging it. There are two things you need to do to re-arrange the topic previews if you’re so inclined:

    1. Tweak the jQuery logic that Topic Previews runs on render to group and show/hide some elements. After much trial and error I found that this approach was the best way to handle arrangement without overriding the topic list template. The upshot of this is that it should be relatively easy to make alterations to the arrangement if you’re familiar with jQuery.

    2. Tweak the CSS.

  3. I’m personally going to focus here on bug-fixes and the features mentioned:

    • Mobile web

    • Manual preview selection

    • Video previews (maybe).


Thank you @angus. Would it be possible to extend Video Previews to also cover other oneboxes that Discourse currently supports?

Also, what do you think of supporting NSFW tags by blurring the preview/supporting spoiler blurs on the main page?

(Pad Pors) #297

Thanks Angus for the whole thoughts and discussion. i also think the design can become separated from the plugin, and more functional updates would be more important than ui changes.

meanwhile i’d like to discuss about the needs of the design here, since i don’t think the flat-horizontal discourse design works the best, especially after one uses topic-excerpt. plus the fact that design here is not just about the view but also the functionality.

so what are really the components of a topic to be shown in the topic-list of a discussion platform?

and if the same components as now are needed, i.e.

  1. topic subject,
  2. topic excerpt,
  3. topic image,
  4. bookmark,
  5. like,
  6. number of likes,
  7. number of posts,
  8. topic owner,
  9. last poster,
  10. last activity date;

then what would be a good arrangement regardless of the free space and other concerns and just based on the priority of these elements in a discussion forum?


Hi, how can you make the excerpts work in your discover/index/home page?

Mine only works on the per-category page.


(Philip Battin) #299

This is awesome!

Would love to try find time to give it at shot next week.

Correct, and this is something I’ve been hoping to utilize more in Discourse as it would be the perfect platform for this kind of paradigm. Read more about why I think Discourse would be great to power a hacker-news kind of site.

Currently working with @joebuhlig as well on a hot plugin, which will provide discourse sites with a new ‘hot’ page (which can also be the homepage) with topics that are popular at the moment (based on likes and time)

Topic List Previews fits perfectly into all of this!

Discourse Hot Topics

Go to plugin settings and enable global settings for this plugin. That will enable it for your home page as well.


Worked! Thanks a lot!

(Spooky) #302

I removed the plugin because I didn’t know to show users one thing and crawlers other thing. The topic list previews, at least for me, is not being shown to the crawler (with JS turned off).

(Angus McLeod) #303

Simply put, I think the current table arrangement works well considering the view space available for topic list items. Also, I think considerations of space, and the other things I discussed in my post above are connected to the ‘priority’ of the elements. I’m not clear on the distinction you’re drawing.

For example, we could stick the remaining columns into the same column as the preview image, title and excerpt. You’d then get something like Reddit, but more crowded. Reddit does not include a number of pieces of information about the discussion that you see in the Discourse stream, which reflects its nature of being more about immediate impressions, than about the discussion. In the context of listing discussions, as opposed to listing memes, I don’t see the utility of just moving every thing over to the left and leaving a large blank space on the right.

But, as mentioned, if you have any specific suggestions that make better use of the space for topic list items, I’m happy to entertain them.

(Angus McLeod) #304

Hey @idan, could you elaborate a bit on what you hoped to see in the web crawler?