CmdPal: Added settings for limiting apps on top level searches #40915
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
inMainListPage.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
inAllAppsCommandProvider.cs
to retrieve the result limit from settings. If no limit is configured, it defaults to-1
(no limit).Configuration and Settings:
SearchResultLimit
inAllAppsSettings.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:
Resources.Designer.cs
andResources.resx
. This enables proper display of the new setting in the user interface. [1] [2]