status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 988 forks source link

Allow user to edit link previews after messages are sent #15906

Open ilmotta opened 1 year ago

ilmotta commented 1 year ago

Feature

Depends on https://github.com/status-im/status-mobile/pull/15891

Users should be able to edit link previews after sending messages. Figma > Composer for Mobile

The previews displayed in the composer and in the chat after updating the message should reflect the current (edited) text, not the original one.

Implementation

The majority of the implementation will be in status-go, if not everything.

igor-sirotin commented 1 year ago

We discussed with @benjthayer and @jrainville that we might want to use functionality to "post-add the previews" to the sent message.

Currently when composing a message user could paste a link and very quickly send the message, before the preview has been fetched. We could fix this problem by blocking the sending, but this is a bad UX.

It would be nice if we could send the message immediately and when the previews are fetched, push them to the message. Direct "edit message" functionality is not good to use here, because it will contain the whole message, but maybe we could have a separate message type for updating link previews?

ilmotta commented 1 year ago

We discussed with @benjthayer and @jrainville that we might want to use functionality to "post-add the previews" to the sent message.

Currently when composing a message user could paste a link and very quickly send the message, before the preview has been fetched. We could fix this problem by blocking the sending, but this is a bad UX.

It would be nice if we could send the message immediately and when the previews are fetched, push them to the message. Direct "edit message" functionality is not good to use here, because it will contain the whole message, but maybe we could have a separate message type for updating link previews?

@igor-sirotin, while I agree this can be an interesting idea to explore, I can't help but think we should keep the overall feature as simple as we can and only solve this problem much later after the MVP, if ever.

WhatsApp and Signal in mobile devices do what we currently do i.e. attempt to unfurl the URL right before the message is sent, and if the URL couldn't be unfurled in time, both sender and receiver won't see previews. Of course we should be aware of differences, for instance, WhatsApp and Signal don't allow users to edit messages.

If we consider that WhatsApp & Signal users are happy with the way they behave, I think we'll be fine for a long time with the current behavior/implementation. But having said that, it's obviously up to other people to make such feature decisions.