-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add the ability to copy messages in Expensify.cash #1778
Comments
I'm trying to run it locally, don't know how to get API to run |
Hi, SolutionTo achieve copy to clipboard functionality, I will use the following techniques. Platform wise the functionality is different. Therefore, I will create a utility function under
Web, Desktop and mobile web
iOS and Android
Copying ImagesThis will be a tricky part.
In the native environment, will have to create a native bridge to enable this feature. Thanks. |
Hi, I would like to work on this issue. It has scope for me to learn the Native Modules. Proposal
{
text: 'Copy to Clipboard',
icon: Clipboard,
onPress: (action) => {
console.debug(action);
if(image message) {
// To be implemented with instructions in the next steps.
ClipboardAPI.setImage(action.message[0].html);
} else{
ClipboardAPI.setString(action.message[0].text);
},
},
...............
<ReportActionContextMenuItem
icon={contextAction.icon}
text={contextAction.text}
isMini={props.isMini}
onPress={() => contextAction.onPress(props.action)}
key={contextAction.text}
/>
ImagesCopying images is not supported by either react-native or the package. For Browser-based platforms
So we can extend the lib and create a Method same as the
For Native Platform IOS
For Native Platform Android
So In short
Questions:
Do we need to remove the HTML tags from it like we have done for the last message preview in the sidebar? |
@parasharrajat Your proposal looks pretty good, but I do have some comments:
Let's actually just replace the
Yep, this feature should just copy the whole message. On web/desktop, highlighting text and using
Yes, content copied to clipboard should have all HTML tags stripped first. Now, the most important caveat of this proposal's acceptance is that I think for now we should just focus on getting text copied successfully. We can worry about images in a separate issue. We really don't want to manage or maintain any native code in Expensify.cash if we can avoid it, so the only really acceptable solution there in my opinion would to be to:
AFAIK this isn't really something we've done yet. cc @marcaaron @tgolen @AndrewGable @Julesssss in case you guys have thoughts. |
Also @parasharrajat, after the text is copied to the clipboard, can we change the clipboard icon to a green checkmark and have the tooltip text display |
@roryabraham Thanks for clarifying the doubts. About the tick, surely we can do that. But where do you want to show that? On the context menu or hover menu. I think it will involve making the tooltip controlled. |
@roryabraham I like your proposal for the image support. I think we should contact the contributors directly and offer to pay them to do that issue, rather than just waiting for them to prioritize it on their own. |
Well, just to clarify the "context menu" and "hover menu" are just different manifestations of the |
@roryabraham Assigned to you since you'll be the one reviewing proposals |
I've already chosen a contributor, and he has a WIP PR up 🚀 |
Sorry for the confusion, but per our documented process:
So I'm actually re-assigning this to @parasharrajat |
Hi, This is Kaushik here and I would like to suggest a simple and effective explanation for this,
|
If you haven’t already, check out our contributing guidelines for onboarding!
Internal issue: https://github.com/Expensify/Expensify/issues/147479
Internal Upwork Posting: https://www.upwork.com/ab/applicants/1371557081012895744/job-details
Public Upwork Posting: https://www.upwork.com/jobs/~013badfb341950b5a6
Expected Result:
The "Copy to Clipboard" button in the
ReportActionContextMenu
should copy the text context of a report action / message to the clipboard.Actual Result:
The "Copy to Clipboard" button in the
ReportActionContextMenu
currently doesn't do anything:Action Performed:
true
so that theReportActionContextMenu
will show (see screenshots above).Copy to Clipboard
Workaround:
None.
Platform:
All platforms ->
Web
iOS
Android
Desktop App
Mobile Web
Notes/Photos/Videos:
The text was updated successfully, but these errors were encountered: