-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix copying submitted message copies nothing #32676
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] |
@@ -284,6 +284,9 @@ export default [ | |||
} else if (ReportActionsUtils.isChannelLogMemberAction(reportAction)) { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this logic in ReportUtils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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