Feature: Screenshot copy to clipboard#9042
Feature: Screenshot copy to clipboard#9042Shadorc wants to merge 8 commits intoFreeTubeApp:developmentfrom
Conversation
|
Please use the standard web navigator.clipboard API, like we do for copying text, rather than going to the main process and using the Electron specific APIs. Copying to the clipboard should be possible in FreeTubeAndroid too just like prompting for a save location (only the save to default folder is electron only). I agree with you that "both" is odd, please remove it. Additionally rather than replacing the enable screenshot switch it would be better if you replaced the prompt for save location one. That dropdown would still default to prompting for the save location, in Electron builds it should have 3 options (the two existing ones plus copying to the clipboard) outside of Electron e.g. in FreeTubeAndroid it should only have prompting for the save location or copying to the clipboard. As you already discovered it only makes sense to write PNGs to the clipboard, that id because images sit on the clipboard in operating system specific bitmap formats, not PNGs or JPEGs, so writing a PNG avoids losing details that would be lost in the lossy conversion to JPEG. As copying to the clipboard will always use PNG, the format and quality options should be hidden or at least disabled when the clipboard option is selected. Testing an actual FreeTubeAndroid build is a bit more involved, so you can check the settings UI outside of Electron with |
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
|
Thanks for your review! I have applied the requested changes and updated my initial messsage accordingly. |
Head branch was pushed to by a user without write access
Pull Request Type
Related issue
closes #8641
Description
Screenshots
After:




Testing
Copy to Clipboard:
Desktop
Additional context
I'm not really satisfied of the "both" option, not really future proof if more modes are added. It could be two toggles, but again not really sure what the UI would look likle with more modes. Let me know what you think.Electron Clipboard API only supports JPEG and PNG but from my tests it seems that ultimately the image ends up as PNG anywaysThis feature is breaking backward compatibility as the "enable screenshot" option is gone. Not sure if there are migrations code or if retrocoompatibility should be kept no matter what.I'm new to this project so I still have a bit to learn about!