in packages/component/src/Activity/StackedLayout.tsx [137:159]
fromUser ? localize('ACTIVITY_YOU_SAID_ALT') : localize('ACTIVITY_BOT_SAID_ALT', botInitials || '')
).replace(/\s{2,}/gu, ' ');
const initials = fromUser ? userInitials : botInitials;
const nubOffset = fromUser ? bubbleFromUserNubOffset : bubbleNubOffset;
const nubSize = fromUser ? bubbleFromUserNubSize : bubbleNubSize;
const otherInitials = fromUser ? botInitials : userInitials;
const otherNubSize = fromUser ? bubbleNubSize : bubbleFromUserNubSize;
const hasAvatar = initials || typeof initials === 'string';
const hasOtherAvatar = otherInitials || typeof otherInitials === 'string';
const hasNub = typeof nubSize === 'number';
const hasOtherNub = typeof otherNubSize === 'number';
const topAlignedCallout = isZeroOrPositive(nubOffset);
const extraTrailing = !hasOtherAvatar && hasOtherNub; // This is for bot message with user nub and no user avatar. And vice versa.
const showAvatar = showCallout && hasAvatar && !!renderAvatar;
const showNub = showCallout && hasNub && (topAlignedCallout || !attachments.length);
return (
<div
aria-labelledby={activityDisplayText ? ariaLabelId : undefined}