Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Enable SVG import destination options when dragging into canvas

Open kanishk6103 opened this issue 2 months ago • 6 comments

Closes #3253

kanishk6103 avatar Oct 13 '25 17:10 kanishk6103

Here is a video demo of the included changes:

https://github.com/user-attachments/assets/75157813-241f-45a8-898e-5adaf340faa9

@KeatonTech @timon-schelling

kanishk6103 avatar Oct 16 '25 15:10 kanishk6103

Here is a video demo of the included changes: 2025-10-16.21-10-43_muted.mp4

I think you meant to ping @Keavon

TrueDoctor avatar Oct 17 '25 10:10 TrueDoctor

Also we should probably zoom in on the imported svg once it is loaded right? similar to how that is done when creating a new document

TrueDoctor avatar Oct 17 '25 10:10 TrueDoctor

I can't review it yet but as a quick note, please use Title Case in menus.

Keavon avatar Oct 17 '25 10:10 Keavon

Note, Drag events are not forwarded to CEF on desktop (and I would prefer keeping it that way), this will basically not work on desktop. And other images files should work the same way.

A better flow would be:

  • Frontend (desktop or web) receives a file drop and sends a OpenImportDialogMessage
  • Editor responds with the corresponding dialog layout.
  • User selects new document or new layer from the dialog (maybe cancel could be an option).
  • Editor sends a import file message with a flag set for new document or new layer (or enum)
  • Frontend reads file and responds with a import file message passing along the new document flag.

This should also include unifying import via menu and via file drop.

timon-schelling avatar Oct 18 '25 14:10 timon-schelling

Note, Drag events are not forwarded to CEF on desktop (and I would prefer keeping it that way), this will basically not work on desktop. And other images files should work the same way.

A better flow would be:

  • Frontend (desktop or web) receives a file drop and sends a OpenImportDialogMessage
  • Editor responds with the corresponding dialog layout.
  • User selects new document or new layer from the dialog (maybe cancel could be an option).
  • Editor sends a import file message with a flag set for new document or new layer (or enum)
  • Frontend reads file and responds with a import file message passing along the new document flag.

This should also include unifying import via menu and via file drop.

oh, I understand, valid points. I'll try implementing this flow and make the required changes.

kanishk6103 avatar Oct 18 '25 20:10 kanishk6103