Skip to content

Commit

Permalink
feat(displayNamesWithTooltips): avatar and login
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudpresser committed Jun 12, 2023
1 parent cb8c6ca commit 562244c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/DisplayNames/displayNamesPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ const propTypes = {

/** The Account ID for the tooltip */
accountID: PropTypes.string,

/** The login for the tooltip fallback */
login: PropTypes.string,

/** The avatar for the tooltip fallback */
avatar: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
}),
),

Expand Down
4 changes: 3 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ function getDisplayNameForParticipant(login, shouldUseShortForm = false) {
function getDisplayNamesWithTooltips(participants, isMultipleParticipantReport) {
return _.map(participants, (participant) => {
const displayName = getDisplayNameForParticipant(participant.login, isMultipleParticipantReport);

const avatar = UserUtils.getDefaultAvatar(participant.login);
const accountID = participant.accountID;

let pronouns = participant.pronouns;
Expand All @@ -895,6 +895,8 @@ function getDisplayNamesWithTooltips(participants, isMultipleParticipantReport)

return {
displayName,
avatar,
login: participant.login,
accountID,
pronouns,
};
Expand Down

0 comments on commit 562244c

Please sign in to comment.