mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-10-09 21:21:18 +11:00
Show preset JSON key in app, tweak, and feature tooltips (#4995)
* Add Get-WinUtilEntryToolTip helper for preset-key tooltips * Show preset JSON key in app and tweak tooltips * Match apps search against preset key for consistency with tweaks * Limit preset-key tooltips to preset-representable controls Comboboxes and package-manager radio buttons cannot appear in a preset file. Update-WinUtilSelections routes a flat list of keys by the WPFInstall/WPFTweaks/WPFToggle/WPFFeature/WPFAppx prefixes, so a preset can carry neither a combobox selected value nor a radio group choice; WingetRadioButton and ChocoRadioButton do not even carry a WPF prefix. Advertising those control names as preset keys invited users to add keys that fall through the switch and abort the whole import. Revert the combobox label and radio button tooltips to the plain description, and add tests that fail if the key is reattached to a control the preset importer cannot accept. * fix: address preset key review feedback * docs: clarify preset key search scope --------- Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
co-authored by
Chris Titus
parent
a7074963a6
commit
b8b81edcdb
@@ -5,9 +5,9 @@ function Find-AppsByNameOrDescription {
|
||||
|
||||
.DESCRIPTION
|
||||
Search text and categories are independent filters that both have to pass. An entry is
|
||||
shown when its name or description matches the search text, and when its category is in
|
||||
the selected set. An empty search matches everything, and an empty category set matches
|
||||
every category.
|
||||
shown when its name, description, or application preset key matches the search text, and
|
||||
when its category is in the selected set. An empty search matches everything, and an empty
|
||||
category set matches every category.
|
||||
|
||||
While either filter is active the matching categories are expanded, since a collapsed
|
||||
category would otherwise hide the very results that were asked for. With no filter at
|
||||
@@ -115,7 +115,8 @@ function Find-AppsByNameOrDescription {
|
||||
$categoryMatch = -not $hasCategories -or $activeCategories -contains $appEntry.Category
|
||||
$textMatch = -not $hasSearch -or
|
||||
$appEntry.Content -like "*$escapedSearchString*" -or
|
||||
$appEntry.Description -like "*$escapedSearchString*"
|
||||
$appEntry.Description -like "*$escapedSearchString*" -or
|
||||
$appTag -like "*$escapedSearchString*"
|
||||
|
||||
if ($categoryMatch -and $textMatch) {
|
||||
$appControl.Visibility = [Windows.Visibility]::Visible
|
||||
|
||||
Reference in New Issue
Block a user