-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: Added experimental support for flattening folders #15992
Conversation
This is amazing @devin-slothower! Just a heads-up, you only need to add the strings to the en-us file. The other files will automatically update when we sync with Crowdin |
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.
Using Actions is great idea!
@devin-slothower I pushed a commit to sort out the resource files. In short, the only resource file modified in this PR is now the en-us file. Thanks! |
src/Files.App/Data/Factories/ContentPageContextFlyoutFactory.cs
Outdated
Show resolved
Hide resolved
Fyi @Jay-o-Way |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
I think the resulting action needs to be clear: what files will end up where? Specifically - what will become the root folder? A reasonable expectation can be that, when applying this on one folder, all the the SUBfolders will be dissolved, but the selected folder will remain. In stead, everything is "dumped" in the above folder. But I suppose this behavior makes sense to generalize the different triggering scenarios: selecting one or more folders, selecting one or more files... |
Would an optional dialog with a preview of the changes help? |
@devin-slothower what's the behavior for duplicate files? |
The current behavior is just to keep the duplicate files where they are and move all non duplicates to their respective place, only removing flattened folders once they no longer contain anything. |
I don’t want to complicate things, so this isn’t a blocker, but it would be great if we could handle this better. Here are some ideas:
Personally, I lean towards the second idea, but I’m open to discussion. We should probably handle this in a separate PR once we agree on a solution. |
I think the best option would be to handle conflicts similar to the default file manager where the user is prompted for an action, should a conflict arise, prior to anything being moved. I would recommend the following options (with some tweaking to the names):
|
We already have a conflicts prompt with those options, so most of the work is already done. |
It's a bit confusing but here's how to use. The dialog class is shared among multiple file system operations and dialog conflict resolve is one of them. There's an enum property to get how to resolve for each. |
@devin-slothower I made some adjustments based on user feedback. I also updated the list in #12367 to track improvements to make at a later time.
From my perspective, this PR is ready to merge, but I’ll leave it open for a couple of hours to see if there is any other feedback. |
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.
Looks good!
Co-authored-by: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
using Microsoft.Extensions.Logging; | ||
using System.IO; | ||
using Windows.Storage; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Windows.Foundation.Metadata; | ||
using Files.Shared.Helpers; |
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.
using Microsoft.Extensions.Logging; | |
using System.IO; | |
using Windows.Storage; | |
using Microsoft.UI.Xaml.Controls; | |
using Windows.Foundation.Metadata; | |
using Files.Shared.Helpers; | |
using Files.Shared.Helpers; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.UI.Xaml.Controls; | |
using System.IO; | |
using Windows.Storage; | |
using Windows.Foundation.Metadata; |
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
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.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.
Menu Preview