Link preview is added after the message is sent
Link preview is added after the message is sent, we should probably do not allow to send message until link preview is generated.
Steps to reproduce:
- Paste a link into message input
- Send message immediately
Expected: message is sent after link preview is generated
Actual: message sent immediately without link preview, link preview is attached to the empty message
Connected to Huly®: UBERF-9191
Currently, this one is resolved by waiting while the attachment is loading.
The solution requires testing and feedback. It likely will not be UX, so as an alternative solution, we could attach an 'in progress link preview' that will be automatically resolved after it is sent.
Thoughts?
It is a bit annoying now that every time I want to send a link, I have to wait for preview to be loaded. It is sooo slow
Agreed, I think the best solution is to add an ‘in progress’ link preview state to allow sending messages quickly. Thoughts?
In the current code a late link preview can no longer end up on an empty follow-up message: plugins/communication-resources/src/components/input/MessageInput.svelte ignores preview results for a draft that was already sent, and createMessage in plugins/communication-resources/src/actions.ts attaches pending previews to the sent message. The legacy input (plugins/attachment-resources/src/components/AttachmentRefInput.svelte with ReferenceInput) blocks sending while previews are loading. It was checked against the current Platform-Collective develop code. If maintainers agree this covers the report, please consider closing.
@aonnikov — based on the check described above, this looks resolved in the current code. Could you please close this issue if you agree? If you think it is not fixed yet, please describe what still goes wrong (steps, expected vs. actual behaviour), so it can be looked at again.