platform icon indicating copy to clipboard operation
platform copied to clipboard

Link preview is added after the message is sent

Open aonnikov opened this issue 1 year ago • 6 comments

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:

  1. Paste a link into message input
  2. 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

aonnikov avatar Jan 20 '25 10:01 aonnikov

Connected to Huly®: UBERF-9191

huly-github-staging avatar Jan 20 '25 10:01 huly-github-staging

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?

denis-tingaikin avatar Jan 24 '25 11:01 denis-tingaikin

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

aonnikov avatar Jan 24 '25 11:01 aonnikov

Agreed, I think the best solution is to add an ‘in progress’ link preview state to allow sending messages quickly. Thoughts?

denis-tingaikin avatar Jan 24 '25 11:01 denis-tingaikin

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.

MichaelUray avatar Oct 20 '26 13:10 MichaelUray

@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.

MichaelUray avatar Oct 20 '26 21:10 MichaelUray