I really like this concept!
Two things that come to mind, not sure if currently possible but what I’d love to have:
-
The ability to use this for group mentions? I just tried it for my admins group but didn’t seem to work.
-
The ability for the user to choose their own emoji in their preferences and then it would show every time they’re mentioned. Maybe it could even be a perk to give to more engaged users at higher trust levels.
Edit:
- The ability to use this for group mentions? I just tried it for my admins group but didn’t seem to work.
I figured out how to do this but don’t know how to do a PR request so for now, I’ll just post the code below:
common.scss adds .mention-group:after and .mention-group:before
@if $show-after-mention == "true" {
.mention:after,
.mention-group:after {
content: attr(data-emoji);
display: inline;
}
} @else {
.mention:before,
.mention-group:after {
content: attr(data-emoji);
display: inline;
}
}
header.html adds this to the end:
$.each(emoji, function(key, value) {
api.decorateCooked($elem =>
$elem
.find("a.mention-group:contains(" + key + ")")
.attr("data-emoji", value)
.addClass("with-emoji")
);
});