Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Create nodes on canvas drag/drop #5031

Merged
merged 3 commits into from
Aug 5, 2021

Conversation

ales-erjavec
Copy link
Contributor

Issue

Closes #4918

Description of changes

Uses:

Implements drop handlers for 'File', 'Load Model', 'Distance File' and 'Python Script' widgets.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #5031 (e8006ec) into master (c2b8582) will decrease coverage by 0.00%.
The diff coverage is 96.22%.

@@            Coverage Diff             @@
##           master    #5031      +/-   ##
==========================================
- Coverage   86.34%   86.34%   -0.01%     
==========================================
  Files         304      304              
  Lines       61619    61667      +48     
==========================================
+ Hits        53206    53247      +41     
- Misses       8413     8420       +7     

@irgolic
Copy link
Member

irgolic commented Nov 4, 2020

This is really cool, thanks. Changes like this go a long way, as minor as they may seem on the surface.

How hard would it be to support drag-and-dropping several files at a time to canvas?

As is right now though, most any file I try drag-and-dropping (.csv, .tab, .dst, .py) gives the option of using CSV File Import (alongside another). For .py, .dst, this shouldn't happen.
The point of this change is an intuitive way to load your data into Orange. But by dragging a file (.csv, .tab...) to canvas, a dropdown is (correctly) shown offering either File or CSV File Import – something totally confusing for a new Orange user, REALLY underscoring that #3997 needs to be fixed. I'd even wait with merging this before that's fixed.

Also, a nitpick, it gets laggy when holding a file over the window (this PR checked out on left, latest release on right)
ezgif-4-bc385bff6734
Any chance some caching could come into place for this to only lag the first time the file touches the window? (or not lag at all?)

@ales-erjavec ales-erjavec force-pushed the canvas-plugin-drop-handler branch 3 times, most recently from 66890cc to 0e6a2e1 Compare May 13, 2021 13:53
@ales-erjavec ales-erjavec marked this pull request as ready for review May 14, 2021 13:24
@markotoplak markotoplak merged commit 77f53fe into biolab:master Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Drag and drop' on canvas
3 participants