Skip to content

After pasting, focus all pasted files/folders instead of just one #9299

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

Merged

Conversation

IgorKordiukiewicz
Copy link
Contributor

@IgorKordiukiewicz IgorKordiukiewicz commented May 30, 2022

Resolved / Related Issues
Fixes #8333

Details of Changes

Validation
How did you test these changes?

  • Built and ran the app

Before:

paste_selection_old.mp4

After:

paste_selection_new.mp4

@yaira2
Copy link
Member

yaira2 commented May 30, 2022

@IgorKordiukiewicz thank you for the pr, can you check the validation check box in the PR description?

@IgorKordiukiewicz
Copy link
Contributor Author

@IgorKordiukiewicz thank you for the pr, can you check the validation check box in the PR description?

Updated

Copy link
Contributor

@puppetsw puppetsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels May 31, 2022
@yaira2 yaira2 merged commit 0242df5 into files-community:main May 31, 2022
@jiejasonliu
Copy link
Contributor

I believe this introduces a bug where future pastes will focus on the previous ones since we never reset the itemsAdded list.
This may be a little tricky to fix since we flatten out multi-paste operations into sequential ones.

@IgorKordiukiewicz
Copy link
Contributor Author

Well, it kind of gets reset every time the ProcessOperationQueue is called sine its created there, so I don't think this will be a problem and I didn't notice this bug happening.

@puppetsw
Copy link
Contributor

I believe this introduces a bug where future pastes will focus on the previous ones since we never reset the itemsAdded list. This may be a little tricky to fix since we flatten out multi-paste operations into sequential ones.

I didn't notice this bug happening during testing, are you able to provide steps?

@jiejasonliu
Copy link
Contributor

Well, it kind of gets reset every time the ProcessOperationQueue is called sine its created there, so I don't think this will be a problem and I didn't notice this bug happening.

It's correct that it's reset whenever ProcessOperationQueue is called; however the lifetime of this method is one to the directory, meaning it's only called once per directory change.

I didn't notice this bug happening during testing, are you able to provide steps?

Sure, a way to reproduce is to copy and paste some files, and then in the same directory, copy and paste some other files.
You'll see the previous paste will be included as well. I've prepared a gif that demonstrates this issue.

step 1: copy-paste 5 files
step 2: copy-paste just 4.txt (i do this twice)
Files-9299-bug

@puppetsw
Copy link
Contributor

puppetsw commented May 31, 2022

Sure, a way to reproduce is to copy and paste some files, and then in the same directory, copy and paste some other files. You'll see the previous paste will be included as well. I've prepared a gif that demonstrates this issue.

Ah thank you. I was misunderstanding the method to replicate.

yaira2 added a commit that referenced this pull request May 31, 2022
@IgorKordiukiewicz IgorKordiukiewicz deleted the focus-items-after-paste branch June 8, 2022 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus on new items after pasting
4 participants