Repository navigation
CmdPal: Add setting to hide app descriptions in All Apps - #47128
Michael Jolley (michaeljolley) merged 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Add a new ToggleSetting (default: false) to the All Apps extension that hides description text (Subtitle) next to app results for a cleaner look. - AllAppsSettings.cs: Add HideAppDescriptions ToggleSetting following existing EnableStartMenuSource pattern - AllAppsPage.cs: Conditionally clear Subtitle in GetPrograms() when setting is enabled - Resources.resx/Designer.cs: Add resource strings for the setting - AllAppsPageTests.cs: Add tests verifying subtitle visibility with setting on/off Closes #46634 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
412eedb to
704e868
Compare
This comment has been minimized.
This comment has been minimized.
CI Note: Unrelated test failureThe failing test This PR only modifies files in Files changed in this PR:
None of these touch Shell extension code. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
check-spelling-bot Reportðī Please reviewSee the ð files view, the ðaction log, ðž SARIF report, or ð job summary for details.Unrecognized words (1)DEFAULTTONEAREST These words are not needed and should be removeddefaulttonearest diu IPREVIEW ITHUMBNAIL LPCFHOOKPROC LUMA MAXDWORD MRT suntimes timespan traies udit VSyncTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:microsoft/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/24728402825/attempts/1' &&
git commit -m 'Update check-spelling metadata'OR To have the bot accept them for you, comment in the PR quoting the following line: If the flagged items are ðĪŊ false positivesIf items relate to a ...
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new All Apps extension setting in CmdPal to hide the descriptive subtitle text shown for application results, aiming to provide a cleaner results list.
Changes:
- Introduces a new
HideAppDescriptionstoggle setting (defaultfalse) for the Apps provider. - Updates All Apps item generation to clear
AppListItem.Subtitlewhen the setting is enabled. - Adds localized strings and unit tests covering the on/off behavior.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsSettings.cs |
Adds the new HideAppDescriptions toggle setting and wires it into the settings manager. |
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsPage.cs |
Applies the setting by clearing subtitles on generated AppListItems. |
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Properties/Resources.resx |
Adds label/description strings for the new setting. |
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Properties/Resources.Designer.cs |
Updates the generated resource accessors for the new strings. |
src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Apps.UnitTests/AllAppsPageTests.cs |
Adds tests validating subtitle visibility when the setting is enabled/disabled. |
Files not reviewed (1)
- src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)
src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Apps.UnitTests/AllAppsPageTests.cs:94
- These tests rely on
Task.Delay(100)to wait for background initialization. Time-based delays make tests slower and can be flaky on loaded CI machines. SinceGetItems()callsBuildListItems()synchronously, consider removing the delay and/or using a deterministic helper (like the existing refresh/initialization pattern inAppsTestBase) to ensure the page is ready.
AllAppsSettings.Instance.Settings.Update("{\"apps.HideAppDescriptions\": \"true\"}");
var page = new AllAppsPage(mockCache);
await Task.Delay(100);
// Act
var items = page.GetItems();
| if (AllAppsSettings.Instance.HideAppDescriptions) | ||
| { | ||
| foreach (var item in items) | ||
| { | ||
| item.Subtitle = string.Empty; |
| if (AllAppsSettings.Instance.HideAppDescriptions) | ||
| { | ||
| foreach (var item in items) | ||
| { | ||
| item.Subtitle = string.Empty; | ||
| } | ||
| } |
| try | ||
| { | ||
| AllAppsSettings.Instance.Settings.Update("{\"apps.HideAppDescriptions\": \"true\"}"); | ||
|
|
||
| var page = new AllAppsPage(mockCache); | ||
| await Task.Delay(100); | ||
|
|
||
| // Act | ||
| var items = page.GetItems(); | ||
|
|
||
| // Assert | ||
| Assert.AreEqual(1, items.Length); | ||
| var appItem = items.OfType<AppListItem>().Single(); | ||
| Assert.AreEqual(string.Empty, appItem.Subtitle); | ||
| } | ||
| finally | ||
| { | ||
| AllAppsSettings.Instance.Settings.Update("{\"apps.HideAppDescriptions\": \"false\"}"); | ||
| } |
| <value>Hide app description in search results</value> | ||
| </data> | ||
| <data name="hide_app_descriptions_description" xml:space="preserve"> | ||
| <value>Hide description text next to app results for a cleaner look</value> |
Summary
Adds a Hide app descriptions toggle setting to the Command Palette All Apps extension. When enabled, the descriptive subtitle text next to app results is hidden for a cleaner look.
Changes
AllAppsSettings.csHideAppDescriptionsToggleSetting(default:false), following the existingEnableStartMenuSourcepatternAllAppsPage.csSubtitleon eachAppListIteminGetPrograms()when setting is enabledResources.resx/Resources.Designer.csAllAppsPageTests.csValidation
false(preserves current behavior)Closes #46634