Adjust IOUPreview height based on description availability#18774
Conversation
|
@Julesssss @aimane-chnaif One of you needs to 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] |
| const sessionEmail = lodashGet(props.session, 'email', null); | ||
| const managerEmail = props.iouReport.managerEmail || ''; | ||
| const ownerEmail = props.iouReport.ownerEmail || ''; | ||
| const requestDescription = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')); |
There was a problem hiding this comment.
| const requestDescription = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')); | |
| const comment = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')).trim(); |
| )} | ||
|
|
||
| <Text style={[styles.colorMuted]}>{Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', ''))}</Text> | ||
| {requestDescription ? <Text style={[styles.colorMuted]}>{requestDescription}</Text> : ''} |
There was a problem hiding this comment.
| {requestDescription ? <Text style={[styles.colorMuted]}>{requestDescription}</Text> : ''} | |
| {!_.isEmpty(comment) && <Text style={[styles.colorMuted]}>{comment}</Text>} |
| )} | ||
|
|
||
| <Text style={[styles.colorMuted]}>{Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', ''))}</Text> | ||
| {_.isEmpty(comment) ? <Text style={[styles.colorMuted]}>{comment}</Text> : ''} |
There was a problem hiding this comment.
why ''? it should be null. also condition is wrong
This was my suggestion:
| {_.isEmpty(comment) ? <Text style={[styles.colorMuted]}>{comment}</Text> : ''} | |
| {!_.isEmpty(comment) && <Text style={[styles.colorMuted]}>{comment}</Text>} |
| const sessionEmail = lodashGet(props.session, 'email', null); | ||
| const managerEmail = props.iouReport.managerEmail || ''; | ||
| const ownerEmail = props.iouReport.ownerEmail || ''; | ||
| const comment = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')); |
There was a problem hiding this comment.
trim value:
| const comment = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')); | |
| const comment = Str.htmlDecode(lodashGet(props.action, 'originalMessage.comment', '')).trim(); |
Julesssss
left a comment
There was a problem hiding this comment.
Looking good! Would you mind just adding another test?
Test Bill Split
- Create a Bill Split with 3+ users
- An IOUPreview should display within the group chat
- // Same as the other test, no space should appear
|
Let's give @shawnborton an opp to review this as well. |
|
@Julesssss sure, will add those tests as well |
|
Looks good to me. Where are we addressing the other IOU preview card changes, like getting rid of the avatars and adding a right caret in the top right? |
|
Actually, good point. That was done here. Why does the OP tests have avatars still? 🤔 |
|
Good point Tom. @huzaifa-99 is this PR branching from the latest |
|
@Julesssss its actually a little before the last 8 hours. I probably forgot to pull. Adding fresh tests... Apologies guys. |
|
No worries, thank you! |
|
Was testing with main and Splitting bill creates an empty chat like this (an unrelated bug). Should I ignore this in the tests? @Julesssss |
This happens on main so out of scope.. I reported here - https://expensify.slack.com/archives/C049HHMV9SM/p1683816514449429 |
|
Thank you @aimane-chnaif. Will ignore the bug in tests |
|
Please raise that bug in expensify-bugs to claim the bug bounty. Agree it's a separate issue. |
|
Thank you @Julesssss. I just tried with latest HEAD and this issue is not there anymore |
|
@huzaifa-99 please merge |
|
@aimane-chnaif done! |
Reviewer Checklist
Screenshots/Videos |
|
@huzaifa-99 could you fix the conflicts please? |
|
@trjExpensify Thanks for the ping. Fixed merge conflicts! |
| }, | ||
| }), | ||
| )(IOUPreview); | ||
| )(IOUPreview); No newline at end of file |
There was a problem hiding this comment.
@huzaifa-99 can you add an empty line at the end of the file please?
There was a problem hiding this comment.
@luacmartins Thanks for pointing out. Fixed
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Pleasure to contribute guys. Thank you all! |
|
Thank you! @huzaifa-99 Hope to see many more PRs from you 🚀 |
|
Thanks @mountiny. I plan to contribute more, already have proposals underway. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.14-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.14-14 🚀
|









Details
Fixed Issues
$ #18770
PROPOSAL: #18770 (comment)
Tests
Offline tests
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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)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
Web
Safari
1-1 Chat
3+ user chat


Chrome
1-1 Chat

3+ user chat


Mobile Web - Chrome
1-1 Chat
3+ User chat

Mobile Web - Safari
1-1 Chat
3+ User chat


Desktop
1-1 Chat

3+ User chat


iOS
1-1 Chat

3+ User chat


Android
1-1 Chat
3+ User chat

