mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
CmdPal: Remove subtitle from all built-in top level commands (#44621)
## Summary of the Pull Request This PR removes subtitles from all built-in top-level commands, except for fallbacks, apps, and bookmarks. <img width="885" height="987" alt="image" src="https://github.com/user-attachments/assets/4da7377d-2c86-4658-a96b-33a881333639" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
This commit is contained in:
@@ -21,7 +21,7 @@ public sealed partial class BuiltInsCommandProvider : CommandProvider
|
|||||||
public override ICommandItem[] TopLevelCommands() =>
|
public override ICommandItem[] TopLevelCommands() =>
|
||||||
[
|
[
|
||||||
new CommandItem(openSettings) { },
|
new CommandItem(openSettings) { },
|
||||||
new CommandItem(_newExtension) { Title = _newExtension.Title, Subtitle = Properties.Resources.builtin_new_extension_subtitle },
|
new CommandItem(_newExtension) { Title = _newExtension.Title },
|
||||||
];
|
];
|
||||||
|
|
||||||
public override IFallbackCommandItem[] FallbackCommands() =>
|
public override IFallbackCommandItem[] FallbackCommands() =>
|
||||||
|
|||||||
@@ -90,20 +90,5 @@ namespace Microsoft.CmdPal.Ext.TimeDate.UnitTests
|
|||||||
// Assert
|
// Assert
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(displayName));
|
Assert.IsFalse(string.IsNullOrEmpty(displayName));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void GetTranslatedPluginDescriptionTest()
|
|
||||||
{
|
|
||||||
// Setup
|
|
||||||
var provider = new TimeDateCommandsProvider();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var commands = provider.TopLevelCommands();
|
|
||||||
var subtitle = commands[0].Subtitle;
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.IsFalse(string.IsNullOrEmpty(subtitle));
|
|
||||||
Assert.IsTrue(subtitle.Contains("Show time and date values in different formats"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ public partial class CalculatorCommandProvider : CommandProvider
|
|||||||
private static ISettingsInterface settings = new SettingsManager();
|
private static ISettingsInterface settings = new SettingsManager();
|
||||||
private readonly ListItem _listItem = new(new CalculatorListPage(settings))
|
private readonly ListItem _listItem = new(new CalculatorListPage(settings))
|
||||||
{
|
{
|
||||||
Subtitle = Resources.calculator_top_level_subtitle,
|
|
||||||
MoreCommands = [new CommandContextItem(((SettingsManager)settings).Settings.SettingsPage)],
|
MoreCommands = [new CommandContextItem(((SettingsManager)settings).Settings.SettingsPage)],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ public partial class ClipboardHistoryCommandsProvider : CommandProvider
|
|||||||
_clipboardHistoryListItem = new ListItem(new ClipboardHistoryListPage(_settingsManager))
|
_clipboardHistoryListItem = new ListItem(new ClipboardHistoryListPage(_settingsManager))
|
||||||
{
|
{
|
||||||
Title = Properties.Resources.list_item_title,
|
Title = Properties.Resources.list_item_title,
|
||||||
Subtitle = Properties.Resources.list_item_subtitle,
|
|
||||||
Icon = Icons.ClipboardListIcon,
|
Icon = Icons.ClipboardListIcon,
|
||||||
MoreCommands = [
|
MoreCommands = [
|
||||||
new CommandContextItem(_settingsManager.Settings.SettingsPage),
|
new CommandContextItem(_settingsManager.Settings.SettingsPage),
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public partial class RemoteDesktopCommandProvider : CommandProvider
|
|||||||
|
|
||||||
listPageCommand = new CommandItem(listPage)
|
listPageCommand = new CommandItem(listPage)
|
||||||
{
|
{
|
||||||
Subtitle = Resources.remotedesktop_subtitle,
|
|
||||||
Icon = Icons.RDPIcon,
|
Icon = Icons.RDPIcon,
|
||||||
MoreCommands = [
|
MoreCommands = [
|
||||||
new CommandContextItem(settingsManager.Settings.SettingsPage),
|
new CommandContextItem(settingsManager.Settings.SettingsPage),
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ public partial class ShellCommandsProvider : CommandProvider
|
|||||||
{
|
{
|
||||||
Icon = Icons.RunV2Icon,
|
Icon = Icons.RunV2Icon,
|
||||||
Title = Resources.shell_command_name,
|
Title = Resources.shell_command_name,
|
||||||
Subtitle = Resources.cmd_plugin_description,
|
|
||||||
MoreCommands = [
|
MoreCommands = [
|
||||||
new CommandContextItem(Settings.SettingsPage),
|
new CommandContextItem(Settings.SettingsPage),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ public sealed partial class TimeDateCommandsProvider : CommandProvider
|
|||||||
{
|
{
|
||||||
Icon = _timeDateExtensionPage.Icon,
|
Icon = _timeDateExtensionPage.Icon,
|
||||||
Title = Resources.Microsoft_plugin_timedate_plugin_name,
|
Title = Resources.Microsoft_plugin_timedate_plugin_name,
|
||||||
Subtitle = GetTranslatedPluginDescription(),
|
|
||||||
MoreCommands = [new CommandContextItem(_settingsManager.Settings.SettingsPage)],
|
MoreCommands = [new CommandContextItem(_settingsManager.Settings.SettingsPage)],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ public partial class WindowWalkerCommandsProvider : CommandProvider
|
|||||||
_windowWalkerPageItem = new CommandItem(new WindowWalkerListPage())
|
_windowWalkerPageItem = new CommandItem(new WindowWalkerListPage())
|
||||||
{
|
{
|
||||||
Title = Resources.window_walker_top_level_command_title,
|
Title = Resources.window_walker_top_level_command_title,
|
||||||
Subtitle = Resources.windowwalker_name,
|
|
||||||
MoreCommands = [
|
MoreCommands = [
|
||||||
new CommandContextItem(Settings.SettingsPage),
|
new CommandContextItem(Settings.SettingsPage),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ public sealed partial class WindowsSettingsCommandsProvider : CommandProvider
|
|||||||
_searchSettingsListItem = new CommandItem(new WindowsSettingsListPage(_windowsSettings))
|
_searchSettingsListItem = new CommandItem(new WindowsSettingsListPage(_windowsSettings))
|
||||||
{
|
{
|
||||||
Title = Resources.settings_title,
|
Title = Resources.settings_title,
|
||||||
Subtitle = Resources.settings_subtitle,
|
|
||||||
};
|
};
|
||||||
_fallback = new(_windowsSettings);
|
_fallback = new(_windowsSettings);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user