Skip to content

Feature: Added an option to disable the "Open in Windows Terminal" action #17250

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lamparter
Copy link
Contributor

Resolved / Related Issues

Steps used to test these changes

  1. Opened Files
  2. Navigated to the settings page
  3. Clicked on the 'context menu options' expander and disabled the "Show option to open folders in Windows Terminal" toggle
  4. Opened the context menu of folders in the sidebar, in the file browser, and in the homepage
  5. Observed that the "Open in Windows Terminal" option is no longer present

Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

Otherwise, LGTM

@@ -10,6 +10,8 @@ internal partial class OpenTerminalAction : ObservableObject, IAction
{
private readonly IContentPageContext context;

private IUserSettingsService UserSettingsService { get; } = Ioc.Default.GetRequiredService<IUserSettingsService>();
Copy link
Member

Choose a reason for hiding this comment

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

Please use field for DI instances

@@ -10,6 +10,8 @@ internal partial class OpenTerminalAction : ObservableObject, IAction
{
private readonly IContentPageContext context;

private IUserSettingsService UserSettingsService { get; } = Ioc.Default.GetRequiredService<IUserSettingsService>();
Copy link
Member

Choose a reason for hiding this comment

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

The action should still be available when the menu item is turned off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand what you mean by that.
The action should be executable when the setting to turn it off is turned off?

Copy link
Member

Choose a reason for hiding this comment

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

Correct, this setting is only for the context menu item, it's not meant to disable the action.

@@ -261,6 +261,11 @@
<ToggleSwitch AutomationProperties.Name="{helpers:ResourceString Name=ShowOpenInNewPane}" IsOn="{x:Bind ViewModel.ShowOpenInNewPane, Mode=TwoWay}" />
</wctcontrols:SettingsCard>

<!-- Open in Windows Terminal -->
Copy link
Member

Choose a reason for hiding this comment

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

The setting should probably match the order of the context menu item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? The setting is shown after all the "Open folder in xyz" settings

Copy link
Member

Choose a reason for hiding this comment

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

The setting should be right before the setting for 'Edit tags', this way it's consistent with the order of the Context Menu items.

@yaira2 yaira2 force-pushed the main branch 2 times, most recently from 42c8207 to 4c7493f Compare July 6, 2025 15:16
@yaira2 yaira2 added the changes requested Changes are needed for this pull request label Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes are needed for this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add option to disable "Open in Windows Terminal" context menu item
3 participants