status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
298 stars 79 forks source link

Feature request: Copy/paste multiple messages at once #2783

Open corpetty opened 3 years ago

corpetty commented 3 years ago

As a user, I would like to be able to copy and past more than just a single message at a time. Currently, I am confined to the text of a single message.

Expected behavior

I expect the behavior to work as Discord/Slack work. When highlighting multiple messages from multiple users, the text is transformed to the following:

<user 1 - timestamp 2>
<message 1>
<timestamp 2>
<message 2>

<user 2 - timestampe 3>
<message 3>
etc
michaelsbradleyjr commented 3 years ago

It's a very reasonable request. There's a challenge involved, to my understanding:

Discord and Slack are using Electron, which means that underneath what's displayed is the web DOM, and therefore it's possible to tap into the DOM and get e.g. the textContent of the nodes in the DOM. Likewise, since they're web DOM based, they get the familiar ability to click-drag-copy/paste (anywhere in a browser's displayed content) pretty much for free.

However, Qt/QML doesn't have the web DOM, it has its own concept of "scene graph", which works differently.

On the other hand, I just tried click-drag-copy/paste across multiple messages from multiple sources in Telegram Desktop (which is Qt based) and the result is very similar to Slack/Discord... so it should be possible somehow.