-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Feature: Added support for dragging recent files #15555
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
Conversation
added drag and drop feature into Recent
Removed using Microsoft.Extensions.Logging since not using Co-authored-by: Lukáš Laštůvka <84145589+XTorLukas@users.noreply.github.com>
added Lambda expressions Co-authored-by: Lukáš Laštůvka <84145589+XTorLukas@users.noreply.github.com>
Co-authored-by: Lukáš Laštůvka <84145589+XTorLukas@users.noreply.github.com>
Lambda expressions Co-authored-by: Lukáš Laštůvka <84145589+XTorLukas@users.noreply.github.com>
Removed a function that was not necessary
CanDragItems="True" can be applied here
XTorLukas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Lukáš Laštůvka <84145589+XTorLukas@users.noreply.github.com>
Co-authored-by: Lukáš Laštůvka <84145589+XTorLukas@users.noreply.github.com>
|
I'm trying to drag some text files into Notepad and while they can be dragged, dropping them into Notepad isn't opening the file. |
|
Interesting, I will try to simulate that, I know that it works with google drive the web version |
hishitetsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be possible to perform operations other than copying? Ideally, the process should be common to this.
| public async Task DragOverAsync(DragEventArgs e) |
That is a known issue. It would be great if we could fix it. #11735 |
|
@hishitetsu Correct I checked with downloads and documents and they don't work when copying to notepad or text editor applications as well but I found I way to fix this |
|
@yaira2 @hishitetsu dragging text files into Notepad or any text editor should work now for recent files |
What other operations you got in mind? I believe the reason windows file explorer only uses copy for recent files is because recent files contain multiple files or folders from different paths/directories, so in case an accident happen the user is just copying and never messing with the original path/directory. |
|
@hishitetsu added limit for reading text file to 50 mb, and added a new method for ReadFileContent, felt that there was many ifs in one section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found that it inserts text into the already open tab rather than newly opening the dragged file when dragging a file into Notepad. I'll wait for @yaira2 to decide if this is fine.
|
I have also found that I can't drag from recent files on the home page in Explorer to Notepad, even though I can drag from normal folders. So, I guess WinUI 3 doesn't support dragging files to Notepad. |
Co-authored-by: hishitetsu <66369541+hishitetsu@users.noreply.github.com>
That's correct and is not the expected behavior. the expected behavior is to open the file into notepad with the text on the tab. righter than creating a new file. |
Correct. explorer doesn't let dragging from recent files to text editor applications. whenever WinUI 3 dosen't support it I am not so sure. |
|
The only problem now with this PR is drag-and-drop to Notepad. I think it would be better to delete those codes so that this PR can be merged. |
|
I agree since dragging to notepad doesn't work anywhere else in the program and no helpful source was found. so one step at time. |
|
Deleted text to be dropped into text editor for example notepad because of an unexpected issue causing the texteditor to open a new file instead of editing in the same file. moreover FileExplorer also doesn't allow Recent files to drop text into notepad or texteditor apps. |
hishitetsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a new problem. When dropping on the desktop I can only copy or link, but when dropping on the sidebar I can move the item.
Co-authored-by: hishitetsu <66369541+hishitetsu@users.noreply.github.com>
|
@hishitetsu I see it is because the SideBar also have a drag code that changes the operation to move hmmm to fix this a solution would be in the sidebar.cs add a if estatment that if the file is coming from recent, change the operation to copy |
I agree. |
|
What's the status of this PR, ready for merge? |
|
This issue hasn't been fixed. #15555 (review) |
2e4f94d to
98eb6b4
Compare
@Krytan are you still planning to work on this? |
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.
Closes #8282
Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.
1 - Open Files app
2 - Go to Home
3 - Scroll down to Recent files
4 - Dragging files should be possible
How does dragging work?
Dragging recent files to other programs or outside Files will trigger "copy" similar to windows File explorer, drags files to the desired location without changing the main path.
Dragging recent files inside the app Files will trigger "Move to", drags files to the desired location changing the main path to the new desired path, similar to when dragging files from Documents or Downloads.
file explorer uses "Copy" instead of "Move to" for this.
I can change to copy as well if it makes more sense.