Glitch with username link in profile card

AI-generated summary

A bug has been reported regarding the username link in the profile card, where hovering over a username or avatar shows the current topic URL instead of the user profile URL, and CMD + click opens the topic in a new tab instead of the profile. bts noticed this behavior across multiple forums and browsers, suggesting it’s a recent regression. zogstrip questions why the href attribute was removed in a previous commit. j.jaffeux explains that the issue was due to conflicting routing actions and notes that recent changes have made it possible to fix this. j.jaffeux confirms the issue and indicates it will be addressed.

Just noticed the following behavior:

  • In any topic or PM, click username or avatar to open profile card
  • Hover over username/avatar — URL destination preview (i.e. in lower left in Chrome) shows as current topic URL, not user profile
  • Despite the wrong URL showing on hover, clicking directly still brings me to the user profile
  • However CMD + click opens the current topic (same page) in a new tab, rather than the user profile as expected

I tend to use CMD + click to open user profile in a new tab pretty often so I think this is a recent regression. This happens on two different forums I run + Meta, and in multiple different browsers.

5 Likes

@Johani any idea why you removed the content of the href attribute in the user card?

1 Like

There was some weird things going on because you had both an action doing some routing and a href doing something else, can’t remember exactly but something was not right. Will look at this.

2 Likes

Ok, I think it was misbehaving before (mostly some tests were failing), but other changes we made in this PR actually make it possible to have this.

https://github.com/discourse/discourse/commit/974007a3cc3e0bef9ec2c2f5d11cf55fece66724

Thanks.

8 Likes