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

Feature: Don't reorder files after renaming them #12034

Closed
wants to merge 11 commits into from

Conversation

Spid3rrr
Copy link

@Spid3rrr Spid3rrr commented Apr 9, 2023

This adds the feature that files should not be re-ordered after renaming them.

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes Feature: Don't reorder files after renaming them #4214

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?

Screenshots (optional)
Add screenshots here.

@yaira2
Copy link
Member

yaira2 commented Apr 10, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yaira2
Copy link
Member

yaira2 commented Apr 10, 2023

@Spid3rrr the CI automation tests are failing, can you look into this?

Copy link
Contributor

@ferrariofilippo ferrariofilippo left a comment

Choose a reason for hiding this comment

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

The feature itself works, but I think there are some little tweaks which may improve code readability

src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
@Spid3rrr
Copy link
Author

@ferrariofilippo I implemented the code suggestions in the latest commit. I am still figuring out why the automated testing is failing. I believe it may have been testing the previous behavior (renaming a file and trying to locate it at the bottom of the tab ?) but I'm still investigating.

@Spid3rrr
Copy link
Author

Update : The recent for the check failing was that the folder/file wasn't being selected after renaming. That should be fixed now.

Copy link
Contributor

@ferrariofilippo ferrariofilippo left a comment

Choose a reason for hiding this comment

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

LGTM and works for me!
(There's a small thing with code style)

src/Files.App/ViewModels/ItemViewModel.cs Outdated Show resolved Hide resolved
@yaira2 yaira2 requested a review from gave92 April 23, 2023 03:50
@yaira2
Copy link
Member

yaira2 commented May 9, 2023

@Spid3rrr how does this work if the user renames multiple files simultaneously (through an app like PowerToys or File Explorer)?

@Spid3rrr
Copy link
Author

Spid3rrr commented May 9, 2023

Well if the files are re-named through an outside app, Files will just update the view correctly. Since we cannot rename multiple files through Files right now, there shouldn't be an issue.

@yaira2
Copy link
Member

yaira2 commented May 9, 2023

This doesn't seem to help, files are still being reordered after renaming them.

@Spid3rrr
Copy link
Author

@yaira2 the files renamed are being re-ordered even from this pull request ?

@yaira2
Copy link
Member

yaira2 commented May 14, 2023

Yes

@yaira2
Copy link
Member

yaira2 commented May 29, 2023

@Spid3rrr I did some more testing and confirmed this PR does work in regular folders, however the issue is still present if you use a grouping option (eg group by date).

@Spid3rrr
Copy link
Author

Spid3rrr commented May 29, 2023 via email

@yaira2
Copy link
Member

yaira2 commented Jul 23, 2023

@Spid3rrr

@Spid3rrr
Copy link
Author

I apologize I haven't had time to look at it yet. I will update this week !

@yaira2 yaira2 closed this Aug 27, 2023
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.

Feature: Don't reorder files after renaming them
3 participants