fix: Transaction report shows multiline title for expense with multiline description#42631
Conversation
|
@DylanDylann 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] |
| formattedName += ` (${Localize.translateLocal('common.archived')})`; | ||
| } | ||
| return formattedName; | ||
| return formattedName.replace(/(\r\n|\n|\r)/gm, ' '); |
There was a problem hiding this comment.
Line 3155 in e8ae3c5
Should we apply the same fix in here?
There was a problem hiding this comment.
@nkdengineer Could we use formatReportLastMessageText function instead of replacing manually?
There was a problem hiding this comment.
Should we apply the same fix in here?
I think we can apply the same for this to prevent the same bug in the feature.
Could we use formatReportLastMessageText function instead of replacing manually?
Yes we can use this function.
|
@DylanDylann I updated. |
|
@DylanDylann Any update here. |
|
|
||
| if (formattedName) { | ||
| return formattedName; | ||
| return formatReportLastMessageText(formattedName); |
There was a problem hiding this comment.
I am not sure if it is necessary or not, could you explain why we need to update this?
There was a problem hiding this comment.
@DylanDylann The update here is to prevent similar bugs in the future if the formattedName variable ever contains a line break.
Reviewer Checklist
Screenshots/Videos |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
This PR is failing because of issue #41584 The issue is reproducible in: Web ( QA team is checked on Web for now) 42631.web.mp4 |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.79-11 🚀
|






Details
Fixed Issues
$ #41584
PROPOSAL: #41584 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov