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

Unable to drag and drop files into file explorer #5266

Closed
isabelizimm opened this issue Nov 4, 2024 · 6 comments
Closed

Unable to drag and drop files into file explorer #5266

isabelizimm opened this issue Nov 4, 2024 · 6 comments
Labels
area: ui Issues related to UI category. regression usability

Comments

@isabelizimm
Copy link
Contributor

Noticed on Positron Dev on 10/31, but not sure when this started occurring. I believe this worked in the past?

Steps to reproduce the issue:

  1. have any file on desktop
  2. try to drag into Positron. it will look like it succeeded, but no file will populate

Expected or desired behavior:

folders/files to appear in file explorer

Interpreter details:

N/A

Were there any error messages in the UI, Output panel, or Developer Tools console?

None

@isabelizimm isabelizimm added area: ui Issues related to UI category. usability labels Nov 4, 2024
@jmcphers
Copy link
Collaborator

Notes:

  • this is on macOS
  • we think this used to work
  • works in VS Code

@jmcphers jmcphers added this to the Future milestone Nov 12, 2024
@wahalulu
Copy link

wahalulu commented Jan 6, 2025

same in Mac, can't copy a file from Finder into the Explorer pane (or cmd-C/paste for that matter.). It does work when dragging/dropping files from one Positron window to another.

MacOS Sequoia 15.2

Positron Version: 2025.01.0 (Universal) build 39
Code - OSS Version: 1.93.0
Commit: c7ef34f
Date: 2024-12-09T02:49:50.608Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.2.0

@sidviny
Copy link

sidviny commented Jan 15, 2025

I have the same on Windows 11. I cannot drop from File Explorer into the project. Type of file, size of file, nothing seems to matter why not.

Positron Version: 2024.12.0 (system setup) build 96
Code - OSS Version: 1.93.0
Commit: c5ce275
Date: 2024-11-28T02:50:45.229Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.26100

@petetronic
Copy link
Collaborator

I can Cmd+C copy the file from Finder on mac, and Cmd+P paste the file when focused on Positron Explorer folder, but not dragging with the mouse. Dragging does work in VSCode, and this is indeed a Positron regression.

@juliasilge juliasilge modified the milestones: Future, Release Candidate Jan 15, 2025
@petetronic
Copy link
Collaborator

petetronic commented Jan 15, 2025

I believe this regressed in 2024.09.0 build 62. At this time, we merged upstream Code OSS v1.93 as well as PWB details.

It may be that isEnabledFileUploads is not set for Desktop, as if I manually set this to true, drag copying a file into the explorer view works:

if (this.environmentService.isEnabledFileUploads) {

petetronic pushed a commit that referenced this issue Jan 18, 2025
This change addresses an issue that prevents file drag-n-drop from
working in the Explorer view.

The problem was that there was no Electron implementation of the
accessors that Posit Workbench uses to check for file upload/download
permissions. Consequently, in desktop mode these accessors did not work.

The fix is to add accessors to the native (Electron) version of the
environment service.

Addresses #5266.


### Release Notes

#### New Features

- N/A

#### Bug Fixes

- Fix file drag and drop into the Explorer view (#5266) 

### QA Notes

This change doesn't touch the logic for Workbench so testing desktop
should be sufficient.
@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2025.02.0-79
OS Version          : OSX

Test scenario(s)

Drag and drop works now.

Link(s) to TestRail test cases run or created:

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: ui Issues related to UI category. regression usability
Projects
None yet
Development

No branches or pull requests

7 participants