When sharing additional text or URLs to a chat, append it to existing draft

Note: I had previously opened this issue as https://github.com/deltachat/deltachat-android/issues/3901. I hereby open it as a feature request in the forum.

Recently, I had the following unexpected interaction with Delta Chat on Android:

  1. I start writing a message to PEER in Delta Chat but I do not send the message yet, so there is a DRAFT
  2. As part of what I am currently writing, there is some online documentation I want to share with PEER, so I switch to firefox to search for the URL
  3. Once I found the correct page, I use the “share” functionality to share that URL with PEER
  4. The DRAFT is replaced by URL

This was rather annoying as I had already put considerable effort into composing DRAFT, which was now completely lost. I also had a feeling from the start that this might happen, so I willingly took my chances here. Still, it would have been nice if I had not lost my draft; and other people might even lack that gut feeling that the interaction described above is risky. So my suggestion would be this:

If I share some URL (or anything else) with some PEER where there is already a DRAFT for that PEER: Instead of replacing that draft, simply append “URL”, so that instead of a message composition window displaying “URL” I get a message composition field displaying “DRAFT URL”. This way, I should be able to notice that there is a DRAFT and I can still decide whether or not I want to delete it.

One thing to keep in mind would be that I might have forgotten about the existence of DRAFT. So it would be nice if Delta Chat would ensure that DRAFT is actually visible in the message composition field, even if URL is very long. Maybe by doing something like placing the cursor at the beginning of URL rather than at the end? Still, for default behaviour, I would suggest that outright replacing an existing DRAFT is certainly bad UX.

Regarding bjoern’s and link2xt’s comments on the github issue: I agree with bjoern that Delta Chat is probably not well suited for writing novels. But then, losing the draft for a very short message can be annoying as well. I simply feel that appending the shared URL to the existing DRAFT would be less risky when it comes to user expectations. Both replacing the draft and appending to it could potentially surprise a user. However, if the URL is appended to DRAFT while the user expected DRAFT to be replaced, there is a very straightforward fix: The user can simply press and hold backspace. If the DRAFT is replaced by URL while the user expected it to be preserved, there is no straightforward way to get it back.

What hat are they talking through? DeltaChat is an excellent medium for writing epistolary novels, letter-game style. Well, except for the difficulty in exporting them when you’re done. :smile:

Trying to paste several URLs into a message is a plausible use-case.

There are other possibilities. Would sending the “shared” URL as a separate message, but retaining the unsent draft, make sense for you? Or a popup asking if you want to send, append to, or discard the draft?

I agree that this is bad UX. If you share an image/video/app to a chat, the draft text is added to the image/video/app, not simply discarded, therefore discarding the draft text when sharing a link is inconsistent and unexpected behavior.

For the record there are some other times when the draft input is also unexpectedly discarded. I wrote about edit input being unexpectedly discarded here:

@r10s clarified that this is a known problem but it costs too much implementation effort to be worth fixing at the moment.

Additionally, draft text is unexpectedly discarded when you edit a message in the same chat. I’m not sure if this is also a known issue which takes too much implementation effort to fix or if it is an unknown bug which is easy to fix.

If it costs too much implementation effort to make a comprehensive fix for these cases, maybe Delta Chat could for the moment at least display a warning dialog that the draft input will be lost, assuming this costs less implementation effort?

desktop version does this in most cases. (presenting confirmation dialog for draft replacement)