Tuba icon indicating copy to clipboard operation
Tuba copied to clipboard

[Request]: Enhance the media support

Open gaussandhisgun opened this issue 2 years ago • 5 comments

Describe the request

So as I wrote in #468, pasting images is a nice feature. #413 (As It Obviously Turns Out) adds that, so I installed nightly flatpak to try it out. And IMHO, pressing Ctrl+V on the "Text" tab when an image is in the clipboard should go to the Image tab and do the paste there. Telegram for Android behaves exactly like this if you paste an image to it. Mastodon and Firefish (both of backends I've tried) do not require you to open the embed menu to paste an image either. Reddit, no matter how bad it is, just puts the image there if you Ctrl-V an image into the Text post. You name it.

Implementation Details

  • [ ] This should be an option in settings.
  • [ ] This should be only available to some fediverse backends. (Include which ones on the above field).
  • [X] This is client-only (and shouldn't sync with the instance).
  • [X] This follows the GNOME HIG.

gaussandhisgun avatar Sep 01 '23 11:09 gaussandhisgun

I'm not super-fond of this to be honest due to the way media-uploading works.

When you attach a file, it first gets uploaded to the server which returns an id that we later attach to the object we send when "Post" is clicked. I wasn't super-fond of Ctrl+V for the same reason but at least the user is somewhat aware by being on the Media page of the composer.

That means that if you accidentally press ctrl + v with sensitive media in your clipboard, they will be uploaded to your instance which has privacy issues. At the same time though, you are supposed to trust your instance somewhat and they do get cleaned-up after some time automatically.

However, when the new composer mockups drop, there probably won't be a "pages" system anyway. The solutions I propose are:

  • A dialog confirming the paste on Ctrl + V
  • Assume instances and their sysadmins do not lookup or keep the discarded media forever

What do you think?

edit: Keeping the media in memory and uploading only on post is not appropriate either btw, Media uploading can easily fail even though we already keep track of the instance limits (on size and media types) for two reasons:

  1. rate limits
  2. random Mastodon media processing errors like "422 Video has no video stream"

+ if the files are big, the user will have to wait for them to be uploaded on post which might seem like Tuba has frozen

GeopJr avatar Sep 03 '23 08:09 GeopJr

I like the option with confirmation better, but I think for some people that could be annoying

Maybe you can add an option to switch it off?

LukaszH77 avatar Sep 03 '23 15:09 LukaszH77

Maybe you can add an option to switch it off?

Obligatory link to Choosing our Preferences

bragefuglseth avatar Oct 07 '23 22:10 bragefuglseth

I do worry that creating a preference for this would be overkill. I'm not sure it's guideline compliant, but perhaps a confirmation dialogue with the yes option focussed by default. That way people can CTRL+V then ENTER to proceed.

jmaris avatar Oct 12 '23 16:10 jmaris