Allusion icon indicating copy to clipboard operation
Allusion copied to clipboard

Dragging Images doesn't work

Open novaexpres opened this issue 2 years ago • 15 comments

Dragging images doesn't work anymore. For example if you click and drag an image from Allusion into PureRef.

novaexpres avatar Mar 09 '22 16:03 novaexpres

oof, yes, that is a problem. We made same last minute adjustments to drag-and-drop for the re-ordering of locations, that somehow must have broken this. Will take a look soon!

RvanderLaan avatar Mar 09 '22 19:03 RvanderLaan

Thanks for taking a look! Just tried the new version (1.0.0-rc7.2) and seem to be still having the same problem

novaexpres avatar Mar 18 '22 00:03 novaexpres

Hmm, strange, it works fine for me. I only found an issue for a few uncommon image types

Just to double check: you do need to select the images(s) before clicking and dragging them, not sure if that was changed recently. If you were aware of that already, could you provide some more info? E.g.

  • Your OS
  • Whether it applies to all or just some images
  • Are there any error messages in the DevTools console? (you can enable it in the settings panel in the Advanced tab)

RvanderLaan avatar Mar 19 '22 13:03 RvanderLaan

I can confirm this, happens to me also, latest version. It's not that it doesn't work at all, but I have to select, try to drag (doesn't work), then select again and drag and then it works. Happens to all images (but sometimes after successful drag and drop of image it will select and correctly drag and drop next few images in a row, then breaks again). Windows 10 user, no errors in DevTools console.

GruvoSmack avatar Mar 30 '22 12:03 GruvoSmack

I've tried out all kinds of scenarios but I can't reproduce this issue 😕 Could you perhaps post a screen recording?

RvanderLaan avatar Mar 31 '22 19:03 RvanderLaan

Sure:

https://user-images.githubusercontent.com/91463947/161133896-23c56a71-2f43-4e0d-9056-c6d6150f9c86.mp4

GruvoSmack avatar Mar 31 '22 19:03 GruvoSmack

Hey sorry for taking so long, think I figured it out.

I have a "~" in my main folder, "E:\~NextCloud\Img1\img.png" which I think is causing the issue. I tried a normal folder like "E:\Downloads\img.png" and it worked.

I'm running "Windows 10 Version 10.0.18363 Build 18363". Not seeing any errors pop up in the Console when I'm trying to drag.

novaexpres avatar Apr 06 '22 02:04 novaexpres

Hey sorry for taking so long, think I figured it out.

I have a "~" in my main folder, "E:~NextCloud\Img1\img.png" which I think is causing the issue. I tried a normal folder like "E:\Downloads\img.png" and it worked.

I'm running "Windows 10 Version 10.0.18363 Build 18363". Not seeing any errors pop up in the Console when I'm trying to drag.

This is not happening in my case.

It's very strange, I tried to add different folders now and it behaves completely strange. I added following folders:

H:\username=images=\stuff\illustrations\1 H:\username=images=\stuff\illustrations\2 H:\username=images=\stuff\illustrations\3 H:\username=images=\stuff\illustrations\4 H:\username=images=\stuff\illustrations\5 H:\username=images=\stuff\illustrations\6

All those six numbered folders have subfolders with specific artists. Folder named "2" and all it's subfolders works ok, every single image is drag and drop able without problems or hiccups. However, all other folders are completely not drag and drop able, and not like in video that I posted, where file will become dragable after 1 or two attempts, but completely not responding, no matter how many tries.

I'm really lost what could be the problem here, since location of all folders and folder depth is the same in folder number 2 and other.

GruvoSmack avatar Apr 06 '22 07:04 GruvoSmack

Sorry, can try with the "~"? I tried "E:\username=images=" and it worked for me too, I think it might be the "~" symbol in particular.

novaexpres avatar Apr 12 '22 01:04 novaexpres

Sorry, can try with the "~"? I tried "E:\username=images=" and it worked for me too, I think it might be the "~" symbol in particular.

I don't have tilde symbol anywhere in my path, not in folder names, not in file names.

GruvoSmack avatar Apr 12 '22 06:04 GruvoSmack

I'm having the same issue. I'm not sure about Windows, but it looks like my issue stems from "createThumbnailFromPath" not being supported on Linux. I don't really have any experience coding, so it's not elegant, but I was able to hack a solution by passing the raw fallback icon or the raw image instead of generating a thumbnail. This worked, and I could drag images to programs like PureRef again, but predictably the size is off.

BubbleVee avatar Sep 07 '22 21:09 BubbleVee

Ended up fixing this!

In the dev building I would get this error:

Could not create drag icon E:\~NextCloud\~ORD\~UNORD25\FjYv9rEVUAAv3YA.png Error: failed to get thumbnail from local thumbnail cache reference at C:\Projects\Allusion\build\main.bundle.js:30786:79 at IpcMainImpl. (C:\Projects\Allusion\build\main.bundle.js:28903:133) at IpcMainImpl.emit (node:events:527:28) at EventEmitter. (node:electron/js2c/browser_init:165:11237) at EventEmitter.emit (node:events:527:28)

Which was pointing to:

  previewIcon = await nativeImage.createThumbnailFromPath(absolutePaths[0], {

But it would still work with the allusion icon, so I assumed that even the fallback icon was failing too in the prod version.

So in the second try after "console.error('Could not create fallback drag icon', TrayIcon, e);" I added:

  previewIcon = await nativeImage.createFromDataURL(
    'data:image/png;base64,iVBORw0KGgoAAAAN.....
  );

As another fallback and it works now! Guessing it's some issue with Electron and paths, so I just gave it a DataURL.

novaexpres avatar Feb 18 '23 20:02 novaexpres

OK, i did some more testing now, since I reinstalled my system recently and this issue persisted with fresh Allusion install. It turns out that non draggable images are the ones from the OneDrive synced folders. Files located elsewhere on the computer are draggable just fine (including Dropbox synced folders).

I tried using Allusion with OneDrive app closed, and OneDrive folders worked just fine then - draggable like all the others, so obviously it's related to OneDrive app in some way.

GruvoSmack avatar Apr 04 '23 17:04 GruvoSmack

I can confirm that dragging images doesn't work on Linux. Not Pop! OS at least.

vg16855 avatar May 24 '23 05:05 vg16855

Operating System: EndeavourOS KDE Plasma Version: 6.0.3 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.3 Kernel Version: 6.8.2-arch2-1 (64-bit) Graphics Platform: X11

Drag & Drop also does not work here. I don't find any errors in console. Single nor double click work.

Skaifer avatar Apr 23 '24 16:04 Skaifer