Fix copying submitted message copies nothing#32676
Conversation
|
@shubham1206agra 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] |
| const logMessage = ReportUtils.getChannelLogMemberMessage(reportAction); | ||
| Clipboard.setString(logMessage); | ||
| } else if (ReportActionsUtils.isSubmittedExpenseAction(reportAction)) { | ||
| const submittedMessage = _.reduce(reportAction.message, (acc, curr) => `${acc}${curr.text}`, ''); |
There was a problem hiding this comment.
Can you move this logic in ReportUtils?
There was a problem hiding this comment.
I intentionally left it here because I see the other cases above have complex logic to get the message, so it made sense to move it to a util file, but ours is very simple.
I also think ReportUtils is not the place for such a task, so not adding a new one to ReportUtils would reduce the work when someone wants to move it from ReportUtils to ReportActionsUtils or other files.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-10.at.9.21.33.PM.movAndroid: mWeb ChromeScreen.Recording.2023-12-10.at.9.31.12.PM.moviOS: NativeScreen.Recording.2023-12-10.at.9.37.13.PM.moviOS: mWeb SafariScreen.Recording.2023-12-10.at.9.27.09.PM.movMacOS: Chrome / SafariScreen.Recording.2023-12-10.at.9.24.11.PM.movMacOS: DesktopScreen.Recording.2023-12-10.at.9.32.44.PM.mov |
|
LGTM 👍 |
|
✋ 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/lakchote in version: 1.4.11-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.11-25 🚀
|
Details
Our copy to clipboard logic is currently unable to handle the special case of a submitted message/action.
Fixed Issues
$ #32285
PROPOSAL: #32285 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite:
User is a member of a Collect workspace
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(theme.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-12-07.at.23.30.15.mov
Android: mWeb Chrome
Screen.Recording.2023-12-07.at.23.25.40.mov
iOS: Native
Screen.Recording.2023-12-07.at.23.27.29.mov
iOS: mWeb Safari
Screen.Recording.2023-12-07.at.23.19.08.mov
MacOS: Chrome / Safari
Screen.Recording.2023-12-07.at.23.12.54.mov
MacOS: Desktop
Screen.Recording.2023-12-07.at.23.17.20.mov