Satellite-im / UplinkWeb

Frontend for Uplink
https://uplink.satellite.im
MIT License
6 stars 3 forks source link

bug(chats): copying a sticker/gif copies the URL instead of the actual sticker/gif #592

Closed luisecm closed 1 month ago

luisecm commented 2 months ago
  1. Go to any conversation
  2. Send a sticker
  3. Send a gif
  4. Open context menu on sticker sent and select "Copy"
  5. Paste inside chatbar input - You will see that URL from sticker is copied instead of actual sticker
  6. Open context menu on gif sent and select "Reply" - Reply modal shows unaligned
  7. Paste inside chatbar input - You will see that URL from gif is copied instead of actual gif

https://github.com/user-attachments/assets/b948be99-de18-4645-856d-34e6b4addc00

Jekrimo commented 1 month ago

Hey @luisecm ! I have a quick question on this one, I'm wondering about expected behaviors. When we paste a copy link from a gif or sticker it's always just that link text and in other apps it's always the link and not a rendered preview version of whatever the link is pointing to too.

Are we expecting the link to not show up and the gif is in the chatbar or the link is in chatbar and the gif or sticker is above it like this? image

(one is the gif link and i just put an attachment to show the area where all the previews happen)

luisecm commented 1 month ago

Hey @Jekrimo sorry I just saw the message. When I logged the bug I was referring only to the conversation, where I think the gif/sticker should render. What discord does for example is

  1. Right click and select copy link
  2. Automatically the url is pasted in chatbar
  3. If i just click on send message, gif link is sent and renders in chat conversation

I think that would be the way, although rendering in chatbar is a nice addon but probably not necessary imo cc @phillsatellite @stavares843

image

stavares843 commented 1 month ago

agree 🎉

Jekrimo commented 1 month ago

@luis I has more questions lol Sorry maybe I'm blind on this one. I checked discord and I can't get the copy-link to autofill the chatbar like you mentioned, (and maybe it shouldn't as user copying the link could be to send it in some other app possibly?), both ours and discord when you paste the link it's the link until sent and then it renders the gif. So is all we are looking for is the auto filling of the chatbar on copy click? Sorry for the wall of text and my ignorance!! Here is a vid of my branch with the gifs currently....

https://github.com/user-attachments/assets/90ecfe30-3294-4d26-aea7-73fab1527eb0

And here is me tryin on discord to get the copy behavior workin

https://github.com/user-attachments/assets/05c12b39-604b-4c50-8801-6cf0b2a50d3f

luisecm commented 1 month ago

Hey @Jekrimo actually the bug itself was this - after sending selecting "Copy" in sticker of gif, and then pasting and sending the link, it was shown as this: image

It seems its fixed in dev, and the video from your branch also looks good, so I am thinking we can just close this?

stavares843 commented 1 month ago

agree

Jekrimo commented 1 month ago

@luisecm and @stavares843 I say agree too! But I do have a styling fix for the reply gifs, (Which may be fixed on dev I'm not sure) I'm gunna test real quick and if it's on dev I'll open a little pr that's not related to this one

Jekrimo commented 1 month ago

reply gif bug on dev, pr for it incoming...

stavares843 commented 1 month ago

https://github.com/Satellite-im/UplinkWeb/pull/708

thanks @Jekrimo 🎉