Skip to content
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 copy to clipboard button to the message action bar #10649

Open
dkasak opened this issue Aug 24, 2019 · 4 comments
Open

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

dkasak opened this issue Aug 24, 2019 · 4 comments
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely T-Enhancement X-Needs-Product More input needed from the Product team

Comments

@dkasak
Copy link
Member

dkasak commented Aug 24, 2019

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
Copy link
Member Author

dkasak commented Aug 24, 2019

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.

  • Selecting a message manually and pressing ctrl-C doesn't work because it similarly skips over bullets and numbers, and would not be correct anyway if what you want is to retrieve the original content, as sent by the sender.
  • Using "Quote" prepends every line with > which is inconvenient for this use case and also does not currently work due to Quoting a message with an ordered list makes the list disappear #10648.

@dkasak
Copy link
Member Author

dkasak commented Sep 1, 2019

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
Copy link

pedro-nonfree commented Aug 24, 2023

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
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely T-Enhancement X-Needs-Product More input needed from the Product team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants