-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Turn the Install category filters into toggle chips #4926
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
Merged
ChrisTitusTech
merged 4 commits into
ChrisTitusTech:main
from
MyDrift-user:feat/install-filter-tabs
Aug 9, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8394910
Turn the Install category filters into toggle chips
MyDrift-user 7aa727f
Fix the filter interactions the category chips missed
MyDrift-user f55cdca
Document the Install category filters
MyDrift-user 88a4ea9
Correct the category filter guide wording
MyDrift-user File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| function Invoke-WinUtilAppCategoryChip { | ||
| <# | ||
| .SYNOPSIS | ||
| Handles a click on an Install tab category chip | ||
|
|
||
| .DESCRIPTION | ||
| The chip carries its category in Tag, so every chip shares this handler. Holding ctrl | ||
| adds the category to the current selection instead of replacing it. | ||
|
|
||
| .PARAMETER Chip | ||
| The chip that was clicked | ||
| #> | ||
| param( | ||
| [Parameter(Mandatory)] | ||
| $Chip | ||
| ) | ||
|
|
||
| $ctrlDown = [bool]([System.Windows.Input.Keyboard]::Modifiers -band [System.Windows.Input.ModifierKeys]::Control) | ||
| Set-WinUtilAppCategoryFilter -Category $Chip.Tag -Additive:$ctrlDown | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,50 @@ | ||
| function Set-WinUtilAppCategoryFilter { | ||
| <# | ||
| .SYNOPSIS | ||
| Applies an exact application category filter from an Install tab search chip. | ||
| Applies the Install tab category filter and syncs the chip states to it | ||
|
|
||
| .DESCRIPTION | ||
| The selection lives in $sync.SelectedAppCategories. An empty selection means every | ||
| category is shown, which is what the All chip represents. The category filter and the | ||
| search box are independent: this only touches categories, and the current search text | ||
| is reapplied on top. | ||
|
|
||
| .PARAMETER Category | ||
| The application category to show. An empty value clears the filter. | ||
| The category to act on. An empty value clears the filter back to All. | ||
|
|
||
| .PARAMETER Additive | ||
| Toggles this category in or out of the current selection instead of replacing it. | ||
| Bound to ctrl click. | ||
| #> | ||
| param( | ||
| [Parameter(Mandatory = $false)] | ||
| [string]$Category = "" | ||
| [string]$Category = "", | ||
|
|
||
| [Parameter(Mandatory = $false)] | ||
| [switch]$Additive | ||
| ) | ||
|
|
||
| $sync.SearchBar.Tag = $Category | ||
| $sync.SearchBar.Text = $Category | ||
| Find-AppsByNameOrDescription -SearchString $Category -Category $Category | ||
| if ($null -eq $sync.SelectedAppCategories) { | ||
| $sync.SelectedAppCategories = [System.Collections.Generic.List[string]]::new() | ||
| } | ||
| $selected = $sync.SelectedAppCategories | ||
|
|
||
| if ([string]::IsNullOrWhiteSpace($Category)) { | ||
| $selected.Clear() | ||
| } elseif ($Additive) { | ||
| if ($selected.Contains($Category)) { | ||
| [void]$selected.Remove($Category) | ||
| } else { | ||
| $selected.Add($Category) | ||
| } | ||
| } elseif ($selected.Count -eq 1 -and $selected.Contains($Category)) { | ||
| # Clicking the only active category again clears the filter | ||
| $selected.Clear() | ||
| } else { | ||
| $selected.Clear() | ||
| $selected.Add($Category) | ||
| } | ||
|
|
||
| Update-WinUtilAppCategoryChip | ||
| Find-AppsByNameOrDescription -SearchString $sync.SearchBar.Text -Categories $selected.ToArray() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| function Update-WinUtilAppCategoryChip { | ||
| <# | ||
| .SYNOPSIS | ||
| Pushes the current category selection onto the Install tab filter chips | ||
|
|
||
| .DESCRIPTION | ||
| The chips are toggle buttons, so their checked state has to follow the selection | ||
| rather than whatever the last click did to them. The All chip is checked when no | ||
| category is selected. | ||
| #> | ||
| $selected = $sync.SelectedAppCategories | ||
| if ($null -eq $selected) { return } | ||
|
|
||
| foreach ($chip in $sync.AppCategoryChips) { | ||
| $control = $sync[$chip.Name] | ||
| if ($null -eq $control) { continue } | ||
| $control.IsChecked = if ($chip.Category) { $selected.Contains($chip.Category) } else { $selected.Count -eq 0 } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.