Proposal for a (hash) tagging feature

(Sam Bauch) #1

Continuing the discussion from Shouldn’t you be able to tag with multiple categories?:

I agree with @weirdcanada that the categorization system works well for thematic organization but that we need a system of tagging. A trite example that illustrates how I’m thinking about it is categories of Fruit and Vegatable, with a goodreads tag. “Good Reads” wouldn’t be a great category because it isn’t really thematic, and then confuses users who want to share a great article about vegetables (where would it go?)

An idea I had was to implement Twitter-style hashtags, much in the same way Discourse @mentions function.

So a user could tag their post anywhere in the post body with a hashtag (which brings up the autocomplete with existing/popular tags).

It’s then rendered as a “chip” in their post, and other users can click that chip to be taken to a search results view that shows all of the posts with that tag. It would also be searchable via the existing search functionality for free.

What do others think of this idea? I think it would be much easier to implement via a PR than it would as a plugin, so I thought I’d get some ideas flowing before starting any work on it.

Paid gig: plugins and a theme
Tags or items associated to topics
Tagging a topic from email in
Discourse callback api
Looks good so far but need tags to subset the categories
(Jay) #2

I generally prefer to read properly punctuated English, things like this annoy me:

#IReckonItsGoodThat tomatoes are a #Fruit#justsayin.

Did you have to squint to figure out what the first bit said? Yes I thought so. I think the hash-tag suggestion would tend to encourage this sort of thing. So if this were to be a feature, I’d prefer to see a markup for it, something equivalent to (but simpler than) <span tag=“pleasing-things”>I reckon it’s good that</span> tomatoes are a <span tag=“fruit”>fruit. The main points being: a) properly formed sentences can still be used; b) the appropriate text can still be highlighted and used as a link if desired.

Anyway - my thoughts on the actual feature:
I like the concept of inline tags, but I’m not sure how tagging will work overall yet. Will forum admins have strict control over what tags are allowed or will free-form tags be used and the most popular ones will naturally bubble up? Maybe different solutions are desirable on different instances? I prefer that forum admins would moderate them so that the forum doesn’t develop a clique jargon that makes it more difficult for new users to fit in, but I guess that’s up to the individual site admins. Anyway, it seems like the hash-tag idea would only work in the free-for-all situation, something a bit more explicit would allow both approaches.

(Jeff Atwood) #3

Users are terrible at tagging, unfortunately, so efforts like this are doomed in my opinion. One simple, broad cannot-possibly-be-misunderstood category is about the best you can hope the average user to get approximately right.

If your categorization scheme is complex, and “make up your own tags” is complex, only your most experienced users will be able to categorize things correctly in my experience.

At least looking at what happened on Stack Overflow, and that’s with programmers, who are better at categorization than the average person. So it’d be even worse with average folks.

(Andrew Hunn) #4

What about only allowing tags to be attached to topics (i.e. first posts in threads), separating them from the post body entirely, and making them editable by any user at a defined trust level?

Editing tags on a per topic basis and sharing the burden of making them accurate among a trusted group of users would make them a lot more usable IMO.

(sparr) #5

Moderators, on the other hand, are good at tagging. I think SE demonstrated this.


+1 for tagging for some level of users (like moderators)

(Jeff Atwood) #7

Yes of course, and if you check the definition of trust level 3, you’ll find that users at trust level 3 can recategorize topics.

We have yet to implement trust level 3 but it is coming.

(sparr) #8

Per one of the general vibes of this thread, tagging and categories aren’t the same thing. Posts go in a single category, but can have multiple tags. If we are analogizing to SE, category:discourse::site:stackexchange while ___:discourse::tags:stackexchange

(Sam Bauch) #9

Well there doesn’t seem to be much consensus, but I’m going forward with my plan.

I see the tagging as less SE tagging and more Twitter hashtagging.

It’s not such a big deal to me if someone tags something ‘wrong’, makes up a silly hashtag, or doesn’t use it at all.

It doesn’t sound like a PR for this is wanted, but I can link to a commit that shows what I did if anyone is interested.

(Robbie Straw) #10

Please do link to it.

At the very least it’d be interesting to experiment with; and if the code isn’t too pervasive I wouldn’t mind trying it out in production for a bit.

(I’m usually merging the upstream master at least once a day at Fatal(Syntax), so I can’t afford to have that workflow cluttered up with merge conflicts; but otherwise I’d be happy to play with a feature like tagging.)

(Sam Saffron) #11

Can I please see that, I am curious to see what you did, also can you attach screenshots

(Sam Bauch) #12

sure so here is a screenshot of a hashtag in a post which has been clicked, submitting it as a search term:

Once a hashtag is used once, it get’s created in a Tags table, such that it shows up as an autocomplete for the next person:

Here’s the commit that contains this work. Honestly, it’s pretty shoddy/proof of concept. No tests, essentially duplicated the @mention portions of the codebase-

(Jay) #13

This looks really nice - could the display be a bit more subtle such that:

a) The border and colours are more subtle so it doesn’t break the flow of reading the text as much
b) The hash is removed from display and perhaps shown faded behind?

Also, could tags be multi-word with spaces? I guess you’d have to have #enclosing hashes# for tags in that case. I think this would make the content more readable.

(Sander Datema) #14

Looks good!

I agree with @jab’s a and b point. But I disagree with his last point. Hashtags have never had spaces in them and it would be quite confusing.

(Sam Bauch) #15

yeah im not thrilled with the presentation, been tinkering with the css.

I wanted something a bit distinct from the @mention chip, but still obviously clickable.

Was considering maybe just a dashed underline?

Definitely want to keep the # as I think its culturally important.

(Jay) #16

Well, hash-tags as used in twitter may not, but that’s because they’re usually abbreviations or otherwise designed to be quite short. A forum is quite a different medium in which to communicate and forum software (I think) should do its best to encourage good language use, especially as it will be used by people with many different language backgrounds (often not in their native tongue) to discuss a wide variety of subjects and interests each with their own jargon. Communication is the whole point of such software so I’m just trying to encourage developers of useful features like tagging to think about how to discourage end-users from degenerating whatever language the forum is using and creating unnecessary jargon specific to a particular forum that might make it harder for new people to get to grips with that forum.

(sparr) #17

bracket-tags on okcupid can have spaces in them:

Movies: [[Primer]], [[Watchmen]], [[Shawshank Redemption]]

Let’s not hold twitter up as the epitome of best practices, please?

(Sam Bauch) #18

I wouldn’t say I’m considering twitter the epitome of best practices, but rather it has the approach/functionality I think works best for my community.

I envision most of my users using snarky hashtags. Just because the whole Discourse thing is about civility and deep, stimulating conversation doesn’t mean individual forums can’t have their own culture.

I’ll not be using spaced tags, as again, culturally, #ThisIsAStupidHashtag fits what my forum is about.

(Sander Datema) #19

Well, it’s not about Twitter as the epitome of best pratices, it’s just that I myself like it simple as well. :smile:

Having a #hashtag in a phrase looks a lot less like clutter than having a #hashtag this way#.

I mean, it’s not bad, but I like simplicity. Markup should not be visible in a cooked text. So the ending # is out of place. Unless you mean to make it part of the markup (and hide it in the cooked version) in which case I’m afraid it would be the start of many exceptions to a normal Markdown syntax.

(sparr) #20

I think the ending # is no more out of place than the beginning #. And, like some others above, I think #hashtagthisway is hard to read and ruins the flow.

PS: it doesn’t have to be a hash tag. it could be a pipe tag, or a bracket tag, or whatever else. |Would this be less intrusive?|