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

File Actions menu #31220

Open
wants to merge 199 commits into
base: main
Choose a base branch
from
Open

File Actions menu #31220

wants to merge 199 commits into from

Conversation

Aaron-Junker
Copy link
Collaborator

@Aaron-Junker Aaron-Junker commented Feb 1, 2024

Summary of the Pull Request

Adding a new menu invokable by selecting files in explorer and pressing a shortcut set in the settings.

Screenshots

image
image
image
image
image
image
image

PR Checklist

Detailed Description of the Pull Request / Additional comments

Things left to do:

  • Add installer
  • Add icon
  • DPI Awareness

Validation Steps Performed

</ui:MenuItem.Icon>
</ui:MenuItem>
<Separator/>
<ui:MenuItem Header="Copy path of files sperated by">

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[sperated](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@Aaron-Junker
Copy link
Collaborator Author

@niels9001 Do you have an idea why the contextmenu doesn't take the WPFUI style?

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

check-spelling found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

This comment has been minimized.

Copy link
Collaborator

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

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

Code LGTM!
Regarding changes I think we're still missing:
1 - Save file as acts as a "Move to" when there's a conflict and you select "Replace" and as a "Copy to" when there's no conflict. I assume the intended is acting as a "Copy to" everytime?
2 - It's crashing for me when I try to use it on some link files. One example is the shortcut .lnk file for "OBS Studio".
3 - The default Ctrl+Alt+A hotkey will likely conflict with Alt Gr+A on some keyboards. I advise making the default shortcut Ctrl+Win+Alt+A or disable the module by default.
4 - New telemetry needs to be added into "DATA_AND_PRIVACY.md".

In the meanwhile, I've merged latest main, added the "New" badge in Settings and tweaked gpo and spellcheck a bit.

@jaimecbernardo
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Aaron-Junker
Copy link
Collaborator Author

Code LGTM! Regarding changes I think we're still missing: 1 - Save file as acts as a "Move to" when there's a conflict and you select "Replace" and as a "Copy to" when there's no conflict. I assume the intended is acting as a "Copy to" everytime? 2 - It's crashing for me when I try to use it on some link files. One example is the shortcut .lnk file for "OBS Studio". 3 - The default Ctrl+Alt+A hotkey will likely conflict with Alt Gr+A on some keyboards. I advise making the default shortcut Ctrl+Win+Alt+A or disable the module by default. 4 - New telemetry needs to be added into "DATA_AND_PRIVACY.md".

In the meanwhile, I've merged latest main, added the "New" badge in Settings and tweaked gpo and spellcheck a bit.

  1. Yes, this is a mistake. I fixed it
  2. Don't know why this is happening, but atleast it is not crashing anymore now.
  3. I don't think your proposed idea would be easy to press. So I switched it to Ctrl+Shift+A
  4. I added them

Thanks again for your review.

This comment has been minimized.

@stefansjfw
Copy link
Collaborator

Code LGTM! Regarding changes I think we're still missing: 1 - Save file as acts as a "Move to" when there's a conflict and you select "Replace" and as a "Copy to" when there's no conflict. I assume the intended is acting as a "Copy to" everytime? 2 - It's crashing for me when I try to use it on some link files. One example is the shortcut .lnk file for "OBS Studio". 3 - The default Ctrl+Alt+A hotkey will likely conflict with Alt Gr+A on some keyboards. I advise making the default shortcut Ctrl+Win+Alt+A or disable the module by default. 4 - New telemetry needs to be added into "DATA_AND_PRIVACY.md".
In the meanwhile, I've merged latest main, added the "New" badge in Settings and tweaked gpo and spellcheck a bit.

  1. Yes, this is a mistake. I fixed it
  2. Don't know why this is happening, but atleast it is not crashing anymore now.
  3. I don't think your proposed idea would be easy to press. So I switched it to Ctrl+Shift+A
  4. I added them

Thanks again for your review.

  1. was crashing because of unauthorized access to Program Files link target path. I tested your fix. Looks like it's working correctly

Copy link
Collaborator

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for the fixes!
Ctrl+Shift+A also sounds like something that will conflict with other programs. I've set it to off by default. The "new" moniker on Settings should now help with discoverability and that way users can change the shortcut to what they prefer.

Choose a reason for hiding this comment

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

Copilot reviewed 185 out of 201 changed files in this pull request and generated no comments.

Files not reviewed (16)
  • .github/actions/spell-check/expect.txt: Language not supported
  • .github/actions/spell-check/patterns.txt: Language not supported
  • .pipelines/ESRPSigning_core.json: Language not supported
  • Directory.Packages.props: Language not supported
  • PowerToys.sln: Language not supported
  • installer/PowerToysSetup/Common.wxi: Language not supported
  • installer/PowerToysSetup/FileActionsMenu.wxs: Language not supported
  • installer/PowerToysSetup/PowerToysInstaller.wixproj: Language not supported
  • installer/PowerToysSetup/Product.wxs: Language not supported
  • installer/PowerToysSetup/generateAllFileComponents.ps1: Language not supported
  • installer/PowerToysSetupCustomActions/CustomAction.cpp: Language not supported
  • installer/PowerToysSetupCustomActions/PowerToysSetupCustomActions.vcxproj: Language not supported
  • src/common/GPOWrapper/GPOWrapper.cpp: Language not supported
  • src/common/GPOWrapper/GPOWrapper.h: Language not supported
  • src/common/GPOWrapper/GPOWrapper.idl: Language not supported
  • src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj: Language not supported
@yeelam-gordon
Copy link
Contributor

Ctrl+Shift+A

This one conflict with Microsoft Word to make highlight word to capital.
Even Win+Shift+A is better in case

Copy link
Contributor

@yeelam-gordon yeelam-gordon left a comment

Choose a reason for hiding this comment

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

I don't have objection beside the shortcut key as well.
There are many files has repeat pattern, but they looks good in general which I don't mean to update it.

@Aaron-Junker
Copy link
Collaborator Author

Ctrl+Shift+A

This one conflict with Microsoft Word to make highlight word to capital.
Even Win+Shift+A is better in case

But you cannot open File Actions Menu from Word anyway. But I'm also good with deactivating it

Copy link
Collaborator

@cinnamon-msft cinnamon-msft left a comment

Choose a reason for hiding this comment

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

After playing with this, I think providing the ability to add these items to the existing File Explorer context menu would feel more natural. Additionally, we should provide the ability to enable/disable the options as I don't think everyone will want everything. I'm going to block this for now while we investigate if we can extend the existing context menu.

@Aaron-Junker
Copy link
Collaborator Author

After playing with this, I think providing the ability to add these items to the existing File Explorer context menu would feel more natural. Additionally, we should provide the ability to enable/disable the options as I don't think everyone will want everything. I'm going to block this for now while we investigate if we can extend the existing context menu.

@cinnamon-msft the reason the whole thing was made was to have a menu which is way more customizable then the classic context menu. In the classic one you for instance cannot use checkbox menu items.

For enabling/disabling I find it a good idea, but this adds a new huge item to an already huge PR. Please reconsider your decision to block, cause this will just add another 1-2 months of setback.

@ukanuk
Copy link

ukanuk commented Feb 26, 2025

Personally I'd have expected this to trigger in the same was as PowerRename -- Shift + Right-click an object(s) in File Explorer context menu, choose "PowerRename" in the context menu, then open a popup window where you select more specific details before executing.

@htcfreek htcfreek added the Status-Blocked We can't make progress due to a dependency or issue label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Review This Pull Request awaits the review of a maintainer. Status-Blocked We can't make progress due to a dependency or issue
Projects
Status: 📑In Review
Status: No status
Development

Successfully merging this pull request may close these issues.

10 participants