studio icon indicating copy to clipboard operation
studio copied to clipboard

Fix proxy icon support

Open rgov opened this issue 3 years ago • 5 comments

Native document-based applications on macOS will use a "proxy icon" that shows where the file is on the filesystem, and can be dragged to other applications (for instance, if you wanted to attach it to an email). It would be nice for Studio to support them, if Electron provides a way.

rgov avatar Aug 24 '22 20:08 rgov

We already do this: https://github.com/foxglove/studio/blob/2fc162bd50c9f301b291178ce4ecbc4cf4aee9eb/desktop/main/index.ts#L173

It looks like a bug that the IterablePlayer does not set its _filePath.

https://github.com/foxglove/studio/blob/979f37d8fef2866425da7574bae523f7e8de7a77/packages/studio-base/src/players/IterablePlayer/IterablePlayer.ts#L104

jtbandes avatar Aug 24 '22 22:08 jtbandes

I've long wondered what this file path setting is for or about! I'll take care of this.

defunctzombie avatar Aug 25 '22 02:08 defunctzombie

This behavior was broken in https://github.com/foxglove/studio/commit/6d0e744df4581b5c97f1497d5c32c762bab34977#diff-8ff00f03f90dedeb147ca074f56cdc45867c552e8383a6c10710c7843ed1f7ceL30

jtbandes avatar Aug 25 '22 19:08 jtbandes

Upon further investigation this behavior was broken before these changes (likely with the changes to add recents list). The handles we use to work with files in the app don't have a reference to the original file path:

https://github.com/electron/electron/issues/33647

defunctzombie avatar Aug 25 '22 20:08 defunctzombie

We've explored a direct fix by adding this path feature for FileSystemHandle (https://github.com/electron/electron/pull/35604), but the Electron team is not interested in accepting this patch and would like to see a different approach. So this doesn't really fit as a bug here — more of a feature request that is blocked on upstream support (https://github.com/electron/electron/issues/33647).

jtbandes avatar Sep 12 '22 21:09 jtbandes