Allow split bill for hidden user#32166
Conversation
| const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false); | ||
| return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, props.personalDetails); | ||
| }) | ||
| .filter((participant) => !!participant.login || !!participant.text) |
There was a problem hiding this comment.
Remove the _.chain and _.value. We only need _.map here
|
Bug: On Native the participant name is not visible Screen.Recording.2023-11-29.at.3.09.33.PM.mov |
|
@s77rt Updated. |
src/libs/OptionsListUtils.js
Outdated
| function getIOUConfirmationOptionsFromParticipants(participants, amountText) { | ||
| return _.map(participants, (participant) => ({ | ||
| ...participant, | ||
| text: participant.text || Localize.translateLocal('common.hidden'), |
There was a problem hiding this comment.
Why this seems to be only needed for Native?
There was a problem hiding this comment.
@s77rt Because in native DisplayNames component render the text which is fullTitle here. On other platforms, we use displayNamesWithTooltips props which already set Hidden for displayName field in getDisplayNameForParticipant function
App/src/components/OptionRow.js
Line 115 in a0b2197
App/src/components/OptionRow.js
Line 221 in a0b2197
There was a problem hiding this comment.
Ah I see. But the suggested solution does not fix the bug. I think the DisplayNames component on itself is inconsistent as the shouldUseFullTitle prop is only available on non-native.
There was a problem hiding this comment.
Do you have any suggestions? I think we only have the bug for the participant case so we can fix this in getIOUConfirmationOptionsFromParticipants function.
What do you think about add Hidden as default value here.
App/src/components/OptionRow.js
Line 114 in a0b2197
There was a problem hiding this comment.
Can we add the Hidden as a default in DisplayNames instead? I think that would make more sense
There was a problem hiding this comment.
So we will add Hidden as default in native DisplayNames right?
There was a problem hiding this comment.
Yes, that seems safer as OptionRow is a generic component where Hidden may not be wanted
| numberOfLines={numberOfLines} | ||
| > | ||
| {fullTitle} | ||
| {fullTitle || translate('common.hidden')} |
There was a problem hiding this comment.
For consistency please add the same to index.tsx
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chromemweb-chrome.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
@dukenv0307 we have conflicts |
|
@luacmartins Updated. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.7-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
|


Details
Since
displayNamedoesn't return for new user who doesn't change default display name, we change the condition in confirm page to allow split bill with new user.Fixed Issues
$ #31792
PROPOSAL: #31792 (comment)
Tests
Offline tests
Same as above
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2023-11-29.at.15.34.56.mov
Android: mWeb Chrome
Screen.Recording.2023-11-29.at.15.31.00.mov
iOS: Native
Screen.Recording.2023-11-29.at.15.37.40.mov
iOS: mWeb Safari
Screen.Recording.2023-11-29.at.15.28.03.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-29.at.15.26.11.mov
MacOS: Desktop
Screen.Recording.2023-11-29.at.15.43.52.mov