Improve the user onebox in Discourse

User onebox is a bit thin on data per:

We should improve it so it has some more data from the user card.

12개의 좋아요

I have been looking at this. Improving user onebox would require creating a custom template for it, correct?

Hmm it is not terrible now, but I guess there are some improvements like possibly emulating a bit of:

Posted, Joined, Read, Location all seem reasonable for the card.

You would need a custom template, yes.

@codinghorror what do you think here?

5개의 좋아요

Oh I see yes sure the user onebox is pretty weak. Totally fine go for it.

1개의 좋아요

Also doesn’t seem to work for all of my users. Example:

https://se23.life/users/Helen_Thomson

https://se23.life/users/BovillDan

… but does work for me

https://se23.life/users/ChrisBeach

Is this another problem where there’s no description and Onebox fails to render anything?

2개의 좋아요

That would be my guess, yes.

2개의 좋아요

In theory we could have the onebox description here be synthesized from the user activity or something. "member since: 2017-1, 22 posts, last posted yesterday, avid reader"

The biggest omission there is that it’s not prioritizing “long name” which I think is correct for public shares. It should be “Chris Beach” in the public onebox, weird that the username is there.

3개의 좋아요

This is how it looks like with my changes. Thoughts?
I wonder if it’s really ok to include “posted” and “read recently” since it’s going to be out of date pretty soon after it’s baked?

8개의 좋아요

Looks good!

Yeah, great point, we try to avoid highly time-specific data in oneboxes as they are typically baked only at the time of posting. Perhaps some other stats would be less time dependent here? Join date seems safe enough at least.

4개의 좋아요

I have added a PR add a custom user onebox by majakomel · Pull Request #5542 · discourse/discourse · GitHub, slightly different than the screenshot above, without the time specific stats. Other stats that could be relevant (like created posts/topic count) are also changing fast, so I haven’t included them.

15개의 좋아요

This looks excellent to me! Thanks @maja

8개의 좋아요

방금 다시 이 내용을 보고 간단히 테스트를 해봤는데, 사용자 프로필 원박스(onebox)는 여전히 꽤 괜찮아 보입니다. 다만 커뮤니티에서 이 기능이 얼마나 많이 사용될지는 잘 모르겠네요. 개인적으로는 요즘에는 그냥 @로 사용자를 언급하고, 사용자가 사용자명을 클릭하면 더 정보량이 많고 실용적인 사용자 카드가 뜨는 방식이 훨씬 마음에 듭니다.

1개의 좋아요

네, 제 생각에는 이 기능 요청을 닫아도 될 것 같습니다 :+1:

2개의 좋아요

이 주제는 3일 후 자동으로 닫혔습니다. 더 이상 새로운 답변이 허용되지 않습니다.