Add a specific class for wikis (when first post) at the topic list level

AI-generated summary

The discussion revolves around adding a specific class for wikis at the topic list level. Canapin suggests this feature, citing a previous discussion here. nathank proposes automatically tagging topics with wiki posts using Wiki, but Canapin prefers not to rely on tags.

nathank suggests using an emoji as the first character of the topic title or manually identifying topics with wiki posts using advanced search. Canapin considers this but finds no suitable emoji.

nathank offers to roll in code to identify topics with wiki posts if provided, but Canapin questions the query’s efficiency. nathank mentions using ActiveRecord for this purpose.

Canapin discusses emoji sets, preferring Twitter’s design, but decides against changing the forum’s emoji set. Instead, Canapin manually prepends wiki titles with “:scroll: [Wiki]” and adds a Wiki link to the top navigation using this method.

Canapin notices that searching for a customized wiki title is faster than using the in:wiki search query, with results taking around 1 second compared to 4 seconds.

Following the suggestion from @Johani here:

To which Johani replied:

Unfortunately, wiki is a post-level, not a topic-level property. So, It’s not added to the topic list item model. You can use a tag or create a feature request for Discourse to add that class.

I suppose the vast majority of wikis are first posts, but I understand the post level issue.

However, having the possibility of emphasizing wikis on the topic list would be a neat addition and may incite people to visit them and maybe participate in their content.

A simple way to achieve this would be by automatically tagging any Topic with a wiki post with Wiki or similar.

This can be done manually using advanced search, but I’d like to automate it in my Wikified Posts Component - but just don’t know how to.

But yes, having a wiki class that applies at the topic level would be enormously helpful!!

I prefer not to rely on tags at the moment (my forum doesn’t use tags and I won’t want it to be somewhat cluttered by tag selectors and fields only to filter by wiki tags and nothing else), but I do like your component that makes wiki more obvious on the posts list.

1 Like

Another thing that might work for you is manually putting an emoji as the first character of the Topic title, kind of like here:

Again, you can identify the Topics with wikis in them by using advanced search.

If someone shares some code to identify Topics which contain a wiki post or where the first post is a wiki (or both), I can roll that in to the component too.

1 Like

I thought about that, but couldn’t find any proper emoji for this use… :sweat_smile:

Wouldn’t that be a bit too much of a query?

Have you tried the other emoji sets? I’m not sure how it works but you might even be able to use a 3rd party one that you like.

That is what ActiveRecord is for apparently. But I’m very much a noob for that kind of thing!

This is an interesting suggestion again, but wouldn’t this change emojis all over the forum?

This is a very personal choice, but I find Twitter’s emoji designs fantastic. I mean… Look at the smirkiness of this smirk: :smirk:
Twitter’s emojis look way better than the other sets to me. I understand that my choice should be my community’s choice in this case, but since nobody complained… I’ll stick with Twitter’s set :grinning_face_with_smiling_eyes:

1 Like

I chose to manually prepend the wiki’s titles with:

:scroll: [Wiki]

I think it looks nice enough, and my community doesn’t have heavy use of wikis.

1 Like

Nice solution! Do you do that manually or have you automated it?

I did that manually.

1 Like

Since wikis on my forum aren’t overused and users don’t really know that they exist, In addition to have their title manually customized, I used Custom Top Navigation Links to add a Wiki link in the top navigation:

I also noticed that searching for "📜 [Wiki]" in:title" instead of in:wiki in:title is way faster!

By “way faster”, I mean something like three or four time faster!

You can see by yourself:

Slow: https://unicyclist.com/search?q=in%3Awiki%20in%3Atitle
Fast: https://unicyclist.com/search?q="📜%20[Wiki]"%20in%3Atitle"

So I chose the second link for my Wikis button.


I’d be interested to know why in:wiki is that slow. About 4 seconds on my computer to show the results.
Searching with the string "📜 [Wiki]" in:title" takes about 1 second.

(and of course, I understand that I can do such a wiki search based on title keywords because I only have first posts as wikis, and I customized all their title with the same prefix).

1 Like