Skip to content

Conversation

lukeblevins
Copy link
Contributor

@lukeblevins lukeblevins commented Apr 27, 2022

Resolved / Related Issues
Items resolved / related issues by this PR.

Details of Changes
Add details of changes here.

  • Create the concept of virtual storage item to help with dragging outside of Files app window to another app

Special thanks to "High Caffeine Content" (@steventroughtonsmith) for making this and future PRs possible

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

@lukeblevins lukeblevins requested a review from d2dyno1 April 27, 2022 01:41
@yaira2 yaira2 changed the title feat: fix drag and drop with virtual storage items Improved drag and drop with virtual storage items Apr 27, 2022
@lukeblevins
Copy link
Contributor Author

@yaichenbaum Is this ready to be merged?

@yaira2
Copy link
Member

yaira2 commented Apr 28, 2022

@yaichenbaum Is this ready to be merged?

I think we should wait for Gave.

@gave92
Copy link
Member

gave92 commented Apr 28, 2022

Sorry can't review it on depth right now but looks good to me (actually, this trick is pure genius, does it work for copy/paste?). I'd make a couple of minor changes but it can wait a different PR.

@lukeblevins lukeblevins merged commit 8624d8c into main Apr 28, 2022
@yaira2 yaira2 deleted the dev/lubl/drag-fix branch April 28, 2022 22:59
yaira2 added a commit to d2dyno1/Files that referenced this pull request Apr 29, 2022
commit 8624d8c
Author: Luke Blevins <lukeblevins15@outlook.com>
Date:   Thu Apr 28 18:37:32 2022 -0400

    feat: fix drag and drop with virtual storage items (files-community#9014)

    Co-authored-by: Yair Aichenbaum <39923744+yaichenbaum@users.noreply.github.com>

commit 1e3b729
Author: Attacktive <66462458+Attacktive@users.noreply.github.com>
Date:   Thu Apr 28 23:53:10 2022 +0900

    Fix empty tooltip text preview pane (files-community#9028)

commit cd87249
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 27 10:09:22 2022 -0400

    Bump MSTest.TestFramework from 2.2.9 to 2.2.10 (files-community#9017)

    Bumps [MSTest.TestFramework](https://github.com/microsoft/testfx) from 2.2.9 to 2.2.10.
    - [Release notes](https://github.com/microsoft/testfx/releases)
    - [Commits](microsoft/testfx@v2.2.9...v2.2.10)

    ---
    updated-dependencies:
    - dependency-name: MSTest.TestFramework
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit da23054
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Apr 27 09:44:52 2022 -0400

    Bump MSTest.TestAdapter from 2.2.9 to 2.2.10 (files-community#9016)

    Bumps [MSTest.TestAdapter](https://github.com/microsoft/testfx) from 2.2.9 to 2.2.10.
    - [Release notes](https://github.com/microsoft/testfx/releases)
    - [Commits](microsoft/testfx@v2.2.9...v2.2.10)

    ---
    updated-dependencies:
    - dependency-name: MSTest.TestAdapter
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit ea98e63
Author: Marco Gavelli <marcogavelli2@gmail.com>
Date:   Wed Apr 27 15:44:27 2022 +0200

    [Refactor] Decouple FolderSizeProvider from UI (files-community#8997)

commit 64202f0
Author: Marco Gavelli <marcogavelli2@gmail.com>
Date:   Wed Apr 27 02:28:14 2022 +0200

    Fix crash due to concurrent list edits in sidebar (files-community#9002)

commit e59e06e
Author: Marco Gavelli <marcogavelli2@gmail.com>
Date:   Tue Apr 26 02:44:45 2022 +0200

    Properly maintain sidebar state (files-community#9004)
@gave92
Copy link
Member

gave92 commented May 1, 2022

Ouch I think this breaks dropping files into UWP apps (e.g Unigram), can someone double-check? Probably because (most/all) uwp apps try to cast the received items to either StorageFile or StorageFolder and VirtualStorageItem is neither.

@lukeblevins
Copy link
Contributor Author

@gave92 Yikes. We'll have to look into this and I will refund the sponsor over PayPal if needed.

@gave92
Copy link
Member

gave92 commented May 1, 2022

At worst we could put a settings switch called like "use drag&drop compatible mode" to use the old behavior if a user needs to drop to uwp apps..
PS: I think this also breaks dragging files from FTP:// but it's a minor problem and easily fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not performing simple cut/copy/paste drag n' drop I can't drag files to other apps
4 participants