-
-
Notifications
You must be signed in to change notification settings - Fork 833
Copy formatted text to clipboard on selecting chat #7192
Conversation
I have a feeling there is an issue that should be fixed by this, can't find it though |
I've asked the design team to take a look at this. Code-wise, after a brief look, it looks pretty sane to me. Thanks for working on this! |
Looks like some type check is complaining @jaiwanth-v |
I had a quick chat with the team and apparently this is something @ara4n has asked for over a reasonably long period of time. |
element-hq/element-web#19726 being the latest issue |
@andybalaam it should be fixed now. |
Yep. Let's see what @janogarcia says about this, and then I'll get into reading the code properly. |
Just to be clear, definitely want this feature and thanks @jaiwanth-v for putting it together. From design @janogarcia would be great to just get quick sense checks and suggestions on the format of the text (date formats, where to use commas vs hyphens vs brackets, etc). |
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.
Pretty excited about this feature!
Thank you for working on it
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.
Looks good to me code-wise!
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.
@jaiwanth-v Thank you for working on such a useful feature! 👍
Could we please make the parsed range a bit less eager when selecting a full message line by double/tripe clicking on it?
Please check out the following screen recording for examples (e.g. double/tripe clicking on a message and then copying only works as expected when there's a single message by the user at that point in the timeline, but fails if there are multiple consecutive message by the same user)
double-click-selections.mp4
@jaiwanth-v @gsouquet
Also, can you guys please confirm if we're reusing here exactly the same rendering rules we use for regular chat exports (Room info → Export chat
) when selecting "Plain Text" as the export format? I did some test on different content types and it seems to be the case, but I'd like to double-check with you to make sure we're not maintaining separate/diverging specs.
This comment was marked as resolved.
This comment was marked as resolved.
Unfortunately the base code has changed in the meantime. After updating this PR to the current develop, the feature does not seem to work any more. @jaiwanth-v thank you for putting the work into this. Can you have another look at this PR? I've also moved this PR to draft until it is ready to be reviewed again. |
Fixes element-hq/element-web#19726
Fixes element-hq/element-web#17844
Fixes element-hq/element-web#893
Writes an irc style log to the clipboard on selecting and copying chat.
copy-format.mp4
Here's what your changelog entry will look like:
✨ Features
Preview: https://61a0cfde0b1968681b0d1619--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.