Skip to content

CmdPal: Added settings for limiting apps on top level searches #40915

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michaeljolley
Copy link
Contributor

@michaeljolley michaeljolley commented Jul 31, 2025

Closes #40062

Adds a setting to limit the number of apps returned on top level searches.

Can limit to none, 1, 5, 10, or 20.
This pull request introduces a feature to limit the number of top-level application results displayed in the command palette. The changes include adding a configurable setting for result limits, updating the filtering logic to respect this limit, and adding localized strings for the new settings.

Feature: Top-Level Application Result Limiting

Logic Updates:

  • Updated UpdateSearchText in MainListPage.cs to filter top-level application results based on the configured limit (AllAppsCommandProvider.TopLevelResultLimit). This ensures that the displayed results adhere to the user-defined limit.

  • Added a static property TopLevelResultLimit in AllAppsCommandProvider.cs to retrieve the result limit from settings. If no limit is configured, it defaults to -1 (no limit).

Configuration and Settings:

  • Introduced a new setting SearchResultLimit in AllAppsSettings.cs to allow users to specify the maximum number of top-level results. This setting is backed by a choice set with predefined options (e.g., 0, 1, 5, 10, 20). [1] [2] [3]

Localization:

  • Added localized strings for the result limit options and their descriptions in Resources.Designer.cs and Resources.resx. This enables proper display of the new setting in the user interface. [1] [2]

@michaeljolley michaeljolley self-assigned this Jul 31, 2025
@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Command Palette Refers to the Command Palette utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CmdPal: Add option to disable fallback items for 'Installed apps'
1 participant