Add a comment about avatar.js

This commit is contained in:
Danila Fedorin 2021-07-15 13:16:42 -07:00
parent c13daedcb0
commit f6f29adacc

View file

@ -54,6 +54,9 @@ function renderImage(imagePart) {
} }
function renderPill(pillPart) { function renderPill(pillPart) {
// The classes and structure are borrowed from avatar.js;
// We don't call renderStaticAvatar because that would require
// an intermediate object that has getAvatarUrl etc.
const classes = `avatar size-12 usercolor${pillPart.avatarColorNumber}`; const classes = `avatar size-12 usercolor${pillPart.avatarColorNumber}`;
const avatar = tag.div({class: classes}, text(pillPart.avatarInitials)); const avatar = tag.div({class: classes}, text(pillPart.avatarInitials));
const children = renderParts(pillPart.children); const children = renderParts(pillPart.children);