How do I make clicking an @mention open the usercard?

(Kane York) #1

Currently, clicking on an @mention is an ‘ejector seat’ - you’re taken out of the topic to the user’s activity page. We already have the ‘safety net’ with usercards - why not put them on the @mentions too?

This was brought up before: Show mini user profile popup when clicking on mentions or avatars within an expanded reply thread

I’m not quite sure how to write the code to do this, though. I can’t add an ember action in mention_dialect.js (I think?) because it isn’t Handlebars and I don’t have a reference to the user’s Ember object.

Also, what file should I write it in? I have no idea.

More info about user in mouse over when someneon is @post
Proposal: clicking on @user in a post content should open info box
Why do post authors nicknames link to the post instead of profile?
(Jeff Atwood) #2

Yeah, but links in the body of posts are also “ejector switches” and that’s expected. Why would usernames be different?

I would argue this is far more consistent, within the body every link takes you to a new page. The left gutter is a special area with special behaviors.

(Kane York) #3

Firstly, I can’t set them to open in new tab - they always go through the router. And they’re already styled differently. But more importantly:

When I’m reading a post, and I see a reference to @michaeld , the most pressing thing on my mind is “who was that guy, again?”, not “What’s he been doing on the forum?”. Showing the usercard would be an excellent way to remind me of who the person is - you’ve got the avatar, full name, and biography all right there.

(Dave McClure) #4

It doesn’t really look like a normal link though, so its already special - my expectations aren’t quite set the same way when i see @riking vs. riking.

And besides the only reason I want to click on the name ever is to answer the question:

And if I really want to go to their page, I can click again.

I wouldn’t press hard for this change in the run up to 1.0, but if @riking is willing to do it now, why not?

(Dave McClure) #5

Also, this thread kind of got hijacked. Perhaps the above replies should be moved to the original linked topic?

I have no idea how to answer the actual question:

Hopefully someone more familiar with the code will jump in.

(Jeff Atwood) #6

Not hijacked, it is unclear if this should be done at all.

(Michael - #7

Well, I’ll take that as a compliment, I guess? :slight_smile:

(Erlend Sogge Heggen) #8

Would still be nice for developers to know how to even access this feature though. Then we might at least get a plugin to put the supposed enhancement to the test.

(Sam Saffron) #9

This can be done as a plugin, today, without needing any core changes.

(Michael Downey) #10

Yeah at the time this was written that was true, but the user name is no longer in the left gutter. It’s right there with the rest of the content.

This pretty much says it all. It’s about consistency. A @downey mention is nothing like a hyperlink, and is everything like the grey user name just above my reply. So users expect it will do the same thing as every other user name around the site…

(Jeff Atwood) #11

So they expect clicking on it will take you to your user page, then. That’s the way more common behavior…

(Michael Downey) #12

So believe it or not I agree with you on this one. (As long as the behavior is consistent!) :wink: This is the behavior on Google+ & Facebook, although they both have a “user card” on hover.

Twitter is sort of in between, as there is no hover but it pops up something in-between the “user card” and “profile page” in terms of useful information. Not quite the full Twitter profile page, but it has the basics and will probably prevent someone from needing to the full page in most cases.

(Dave McClure) #13

I disagree.

Would you ever be disappointed if the user card came up first? You can always click the profile button to get there if you want to…

On the other hand, if you are expecting the user card to come up and you’re sent to the profile page, its much more disruptive.

That said, I’d rather see this debate take place after v1 unless someone wants to write a plugin. Until then, it doesn’t matter who’s right because its probably just not going to happen.

(Sam Saffron) #14

That is quite true. Eventually I see something like this becoming a site setting / plugin. Personally I prefer the current behavior.

(Michael Downey) #15

If using a hover-card like G+ or Facebook, this is exactly what’d happen. :thumbsup:

(Jeff Atwood) #16

As a part of some other fixes @eviltrout made this change, so clicking / tapping on his username should show his user card, even in the body of the post now.

I do think it is more consistent.

(Jeff Atwood) #17