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

Bug: "Format..." shouldn't be visible if items are selected #12401

Closed
imhe6 opened this issue May 19, 2023 · 7 comments · Fixed by #12444
Closed

Bug: "Format..." shouldn't be visible if items are selected #12401

imhe6 opened this issue May 19, 2023 · 7 comments · Fixed by #12444
Assignees

Comments

@imhe6
Copy link
Contributor

imhe6 commented May 19, 2023

What feature or improvement do you think would benefit Files?

As title. The top option is "Format" instead of "Open" / "Open with". This could cause a mistaking operation.
P.S. This happens only in the root directory of a drive.
image

Requirements

  • "Format..." should not display in item context menu at all (since it only relates to the drive itself, not items in it), or at least stay at the second or the third part of context menu.

Files Version

2.4.82.0 (Preview)

Windows Version

10.0.22621.1702

Comments

No response

@yaira2
Copy link
Member

yaira2 commented May 19, 2023

Do you have any items selected? This looks like a bigger issue where right clicking an empty space is showing the menu options for the selected items.

@yaira2
Copy link
Member

yaira2 commented May 19, 2023

#12402

@tsurrdurr
Copy link
Contributor

Good day!

I'm new here. I've done a bit of research on this one, and I think it is not connected to the other issue highlighted.
To replicate this one, you have to have more than 1 drive on your system, it only occurs on a non-system drive.
The cause is in this piece of code:

public bool IsExecutable => context.HasItem && (drivesViewModel.Drives.Cast<DriveItem>().FirstOrDefault(x => string.Equals(x.Path, context.Folder?.ItemPath))?.MenuOptions.ShowFormatDrive ?? false);

The property is calculated without taking into account if any files are currently selected. This command should only be executable, if the right click was performed on an empty space, and thus no files were selected (I assume).

@yaira2 May I have a permission to fix this one? In accordance with contribution guidelines of the repo, of course.

@yaira2
Copy link
Member

yaira2 commented May 24, 2023

@tsurrdurr by all means, please let us know if you have any questions.

@yaira2 yaira2 changed the title "Format..." should not be at the top of an item's context menu, but only the drive's context menu instead Bug: "Format..." should not be at the top of an item's context menu, but only the drive's context menu instead May 24, 2023
@yaira2 yaira2 moved this from 🆕 New to 🔖 Ready to build in Files task board May 24, 2023
@yaira2 yaira2 changed the title Bug: "Format..." should not be at the top of an item's context menu, but only the drive's context menu instead Bug: "Format..." shouldn't be visible if items are selected May 24, 2023
tsurrdurr pushed a commit to tsurrdurr/Files that referenced this issue May 24, 2023
@imhe6 imhe6 closed this as completed May 25, 2023
@github-project-automation github-project-automation bot moved this from 🔖 Ready to build to ✅ Done in Files task board May 25, 2023
@imhe6
Copy link
Contributor Author

imhe6 commented May 25, 2023

Sorry that I have not check GitHub for a while, but thanks for mentioning. (so it is really a bug...)
(p.s. sorry that i mistouched the close issue button)

@imhe6 imhe6 reopened this May 25, 2023
@github-project-automation github-project-automation bot moved this from ✅ Done to 🆕 New in Files task board May 25, 2023
@yaira2
Copy link
Member

yaira2 commented May 25, 2023

@imhe6 we have a potential fix in #12444.

@Josh65-2201 Josh65-2201 moved this from 🆕 New to 🏗 In progress in Files task board Jul 13, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Files task board Aug 6, 2023
@yaira2
Copy link
Member

yaira2 commented Aug 6, 2023

@imhe6 this issue is resolved in main and will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants