mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Settings] Search Results Page Improvements (#41719)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Fix tab navigation issues #41717 - Minor improvement: - Show module group only if there are modules to show #41526 - Add line break in the "no results" message 0.94 <img width="769" height="422" alt="image" src="https://github.com/user-attachments/assets/111fc200-5811-43aa-9ea0-3f8d80543560" /> PR <img width="812" height="524" alt="image" src="https://github.com/user-attachments/assets/65070862-ff3f-4294-8aad-2ade4e6d4e90" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #41717 #41526 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Verified that tab navigation is smooth between search groups - Verified that narrator announces group names - Tested empty search results page
This commit is contained in:
committed by
GitHub
parent
dd25769a96
commit
64cbf222e1
@@ -8,6 +8,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="using:Settings.UI.Library"
|
||||
xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
|
||||
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI"
|
||||
xmlns:vm="using:Microsoft.PowerToys.Settings.UI.ViewModels"
|
||||
x:Name="RootPage"
|
||||
@@ -16,13 +17,20 @@
|
||||
|
||||
<Page.Resources>
|
||||
<converters:IconConverter x:Key="IconConverter" />
|
||||
<tkconverters:CollectionVisibilityConverter x:Key="CollectionVisibilityConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Name="PageControl" x:Uid="SearchResults_Title">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
<StackPanel Margin="0,-40,0,0" Orientation="Vertical">
|
||||
<controls:SettingsGroup x:Uid="SearchResults_ModulesTitle" Margin="0,-10,0,0">
|
||||
<ItemsControl x:Name="ModulesItemsControl" ItemsSource="{x:Bind ViewModel.ModuleResults, Mode=OneWay}">
|
||||
<controls:SettingsGroup
|
||||
x:Uid="SearchResults_ModulesTitle"
|
||||
Margin="0,-10,0,0"
|
||||
Visibility="{x:Bind ViewModel.ModuleResults, Mode=OneWay, Converter={StaticResource CollectionVisibilityConverter}}">
|
||||
<ItemsControl
|
||||
x:Name="ModulesItemsControl"
|
||||
IsTabStop="False"
|
||||
ItemsSource="{x:Bind ViewModel.ModuleResults, Mode=OneWay}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="models:SettingEntry">
|
||||
<tkcontrols:SettingsCard
|
||||
@@ -37,11 +45,14 @@
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<!-- Settings Groups -->
|
||||
<ItemsControl x:Name="SettingsGroupsItemsControl" ItemsSource="{x:Bind ViewModel.GroupedSettingsResults, Mode=OneWay}">
|
||||
<ItemsControl
|
||||
x:Name="SettingsGroupsItemsControl"
|
||||
IsTabStop="False"
|
||||
ItemsSource="{x:Bind ViewModel.GroupedSettingsResults, Mode=OneWay}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:SettingsGroup">
|
||||
<controls:SettingsGroup Header="{x:Bind GroupName}">
|
||||
<ItemsControl ItemsSource="{x:Bind Settings}">
|
||||
<ItemsControl IsTabStop="False" ItemsSource="{x:Bind Settings}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="models:SettingEntry">
|
||||
<tkcontrols:SettingsCard
|
||||
@@ -72,6 +83,7 @@
|
||||
Glyph="" />
|
||||
<TextBlock HorizontalAlignment="Center" TextAlignment="Center">
|
||||
<Run x:Uid="SearchResults_NoResultsHeader" FontWeight="SemiBold" />
|
||||
<LineBreak />
|
||||
<Run x:Uid="SearchResults_NoResultsDescription" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user