-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix split bill display / selection with new users #21113
Changes from 3 commits
cb4d866
badbbd0
98a739e
b22d585
45160f4
bcda417
1f09dde
e8644ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,18 +216,19 @@ function isPersonalDetailsReady(personalDetails) { | |
function getParticipantsOptions(report, personalDetails) { | ||
const participants = lodashGet(report, 'participantAccountIDs', []); | ||
return _.map(getPersonalDetailsForAccountIDs(participants, personalDetails), (details) => ({ | ||
keyForList: details.login, | ||
login: details.login, | ||
keyForList: details.login || details.displayName || String(details.accountID), | ||
Beamanator marked this conversation as resolved.
Show resolved
Hide resolved
|
||
login: details.login || details.displayName, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, why we fallback to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The user's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would go wrong if we keep the login field empty/undefined? (instead of falling back to displayName) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah I see, can we instead set a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Relaying on accountID instead of login seems to do it. const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(
(this.props.option.participantsList || this.props.option.accountID ? [this.props.option] : []).slice(0, 10),
isMultipleParticipant,
); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ooh that seems like a better fix - though I'm still surprised There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will be back in 45min or so, the above fix should be the correct fix, feel free to merge if this is critical There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isMoneyRequestReport is unrelated. this is true when the report is iou report or expense report, this has nothing to do with iou, it's used for other optionrow usage (not totally sure, but that's what I think) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. asking in slack for someone to test on all platforms for you |
||
accountID: details.accountID, | ||
text: details.displayName, | ||
firstName: lodashGet(details, 'firstName', ''), | ||
lastName: lodashGet(details, 'lastName', ''), | ||
alternateText: Str.isSMSLogin(details.login || '') ? LocalePhoneNumber.formatPhoneNumber(details.login) : details.login, | ||
alternateText: Str.isSMSLogin(details.login || '') ? LocalePhoneNumber.formatPhoneNumber(details.login) : details.login || details.displayName, | ||
icons: [ | ||
{ | ||
source: UserUtils.getAvatar(details.avatar, details.accountID), | ||
name: details.login, | ||
type: CONST.ICON_TYPE_AVATAR, | ||
id: details.accountID, | ||
}, | ||
], | ||
payPalMeAddress: lodashGet(details, 'payPalMeAddress', ''), | ||
|
@@ -857,12 +858,13 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { | |
function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { | ||
return { | ||
text: personalDetail.displayName ? personalDetail.displayName : personalDetail.login, | ||
alternateText: personalDetail.login, | ||
alternateText: personalDetail.login || personalDetail.displayName, | ||
icons: [ | ||
{ | ||
source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), | ||
name: personalDetail.login, | ||
type: CONST.ICON_TYPE_AVATAR, | ||
id: personalDetail.accountID, | ||
}, | ||
], | ||
descriptiveText: amountText, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why we're not returning
isMoneyRequestReport: true
here, but that's for another dayThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asked here, but it's been a few months so idk if there's a good answer, just checking