User Icons Testing
-
@xen So, somehow the other images are getting pushed down by
1px
, which is causing the whole card to have1px
more height.The thing is, I have no idea WTF is causing that. Fucking CSS.
-
Yup,
.user-icon
is the offending class andline-height
is the offending property. -
Interesting! Is this on master already?
-
Another bug is the sidebar on mobile login.
Seems like no default is set for a guest user. -
Simple fix.
Remove the
left: 22px
from
#menu .chat-list li a .user-icon+i, .header .chat-list li a .user-icon+i
...I think thats it.
-
I must say, its nice to see that NodeBB won't depend so much on outside resources by default.
-
@julian said:
You may have noticed I now have a user icon instead of an avatar... we're testing something new because we're looking to remove gravatar from core
New users will still show their old avatars (gravatars or not), so hopefully this isn't a breaking change. Please report any oddities here (such as user icons missing).
Will you keep gravatar as a plugin?
-
@exodo that sounds like an "of course" or "we'll keep it in core as an option" thing to me
-
@pitaj In general, we'll try to minimise core as much as possible, so gravatar will be a plugin. Whether or not we develop it, or a third-party developer, is still open.
When this is tested and merged, there won't be gravatar support for a little bit, until said plugin is created.
-
How will this work with plugins wanting to show a users' avatar?
-
The icons seem to be predominantly red in colour. Is the colour randomly generated?
-
Custom colors ftw. You should add the uid as a classname for custom colors with custom CSS.
Something like user-icon-[uid]
-
@julian you could get the colours to be more varied than that. In my project I used an MD5 hash of the person's username to get a hex colour that's highly likely to be unique. For ex:
$hash = md5( $username ); $hex_colour = substr( $hash, 0, 6 );
JavaScript obviously doesn't implement an
md5()
function but you could maybe use a library?