fix: hide To recipient when From and To recipient are the same#62288
Conversation
| participantFromDisplayName={participantFromDisplayName} | ||
| participantTo={participantTo} | ||
| participantToDisplayName={participantToDisplayName} | ||
| fromRecipientStyle={!shouldDisplayArrowIcon ? styles.mw100 : {}} |
There was a problem hiding this comment.
The original style uses mw50, so when we show only participantFrom, the width is too small. I’ve updated it to mw100. Please let me know if we should stick with mw50
|
Since this PR modifies the UI of |
| participantToDisplayName={participantToDisplayName} | ||
| /> | ||
| </View> | ||
| <View style={[StyleUtils.getWidthStyle(variables.w80)]}> |
There was a problem hiding this comment.
This is redundant StyleUtils.getWidthStyle(variables.w80), see this comment: https://github.com/Expensify/App/pull/62288/files#r2095739313
| Before | After |
|
|
|
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 @shawnborton has triggered a test app build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
Did a quick test on iOS and this is feeling really good to me, let's get it into final review cc @ikevin127 |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
mountiny
left a comment
There was a problem hiding this comment.
Thanks! @linhvovan29546 can you look into adding unit tests for this as a follow up? I think the logic around IOU x expense and to/from being defined or not would deserve unit tests that should be in this PR, but dont want to hold it so follow up will be the best
|
Sure, I can add unit tests as a follow up |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.48-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.48-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.49-5 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.1.50-0 🚀
|






Explanation of Change
This PR handles the condition to only show the "To" recipient for the expense type, and only when the "From" and "To" recipients are different. It also updates the UI accordingly.
Fixed Issues
$ #62109
PROPOSAL: #62109 (comment)
Tests
Pre-requisite: Use a mobile device, or make your screen narrow, or screen width less than 1024.
Offline tests
Same as test above
QA Steps
Same as test above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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.2025-05-19.at.19.49.34.mov
Android: mWeb Chrome
Screen.Recording.2025-05-19.at.19.52.16.mov
iOS: Native
Screen.Recording.2025-05-19.at.19.47.46.mov
iOS: mWeb Safari
Screen.Recording.2025-05-19.at.19.46.46.mov
MacOS: Chrome / Safari
Screen.Recording.2025-05-19.at.19.55.14.mov
Screen.Recording.2025-05-19.at.19.39.01.mov
MacOS: Desktop
Screen.Recording.2025-05-19.at.19.43.50.mov