element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.23k stars 2k forks source link

Add copy to clipboard button to the message action bar #10649

Open dkasak opened 5 years ago

dkasak commented 5 years ago

Is your suggestion related to a problem? Please describe. There is no easy way to copy a content of a message to the clipboard and it's something I need quite often.

Describe the solution you'd like An easy and accessible solution would be to add a "copy to clipboard" button to the action bar of message events, similar to the button that was added to code blocks. When clicked, this button would copy the message's body to the clipboard.

Describe alternatives you've considered An alternative would be to add a "Copy Message" item to the "Options" context menu of a message.

dkasak commented 5 years ago

Note that there is currently no way (that I'm aware of) to retrieve a message's content, manual or not, short of retyping it.

dkasak commented 5 years ago

Note: the PR at matrix-org/matrix-react-sdk#3370 would alleviate some of the pain around this but I still think a copy to clipboard button would be a better solution in some situations. For instance, when copying a single large message that's not a regular chat message, but something precisely formatted, such as an (inline, Markdown-formatted) article or tutorial. Manual selection is a hassle in such scenarios.

pedro-nonfree commented 1 year ago

Hi,

use case/user story: you contact someone for something, and that person responds to your request with a long response, which is enriched with bold, italic, code blocks, etc. What you want to do is to process it very fast (because we are overwhelmed with multiple and concurrent sources of information), maybe to another platform, extra info for a ticket (that would mean for you guys too, because I see the needs product tag; this is a general improvement for everyone). Markdown is becoming a very inter-exchange message for a lot of platforms (like csv for data science); and pandoc also helps on transforming the message if needed.

how bad is now the situation: if is your message, you can edit it, ok; but if the message is from someone, as stated by others, you loose the bulletpoints, etc. And if you try to get the source, you start with two clicks: (1) more, (2) view source;

image

and then: (3) select the body (start), (4) scroll, (5) select the body (end), (6) copypaste to a file (example: named myfile.txt), and then (7) this posix shell command:

cat myfile.txt | sed 's/\\n/\n/g'

conclusion: this is already possible, but the UX/UI is so complex and involves 7 interactions to make it possible (meanwhile let me know if you find a shortcut!)

And I am surprised that this is still not developed, because I feel this is needed to appropriate handling of communications from here to there (for example, someone carefully reports something in matrix, and you copypaste the report as part of an issue). Maybe the title, specially on the "action bar" part, hides it a little bit

On ChatGPT I saw they added "recently", they first added copy the code blocks (1), and then, they added the general copypaste button (2) that takes all the message in markdown format, I think that is very convenient and beatiful feature

image

pedro-nonfree commented 1 year ago

oh, and now imagine that you want to copy a conversation of bob and alice (you) of 7 messages, then multiply 7 interactions per message vs 7 clicks + their corresponding paste

... because it would also be appreciated facilitating the copy-pasting of a selection of messages (but yea, this is out of scope for this issue)