Skip to content

Commit

Permalink
Remove experiment from Install Application's search bar (#3954)
Browse files Browse the repository at this point in the history
* Update AppManagement search bar

* Add back search bar style

* Unwrap SearchBox from ExperimentControl
  • Loading branch information
lauren-ciha authored Nov 5, 2024
1 parent b050500 commit 1900e4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -685,10 +685,6 @@
<value>Try "GitHub"</value>
<comment>{Locked="GitHub"}Placeholder text displayed in a search box</comment>
</data>
<data name="SearchBox_Experiment.PlaceholderText" xml:space="preserve">
<value>Search for apps</value>
<comment>Placeholder text displayed in a search box</comment>
</data>
<data name="SelectAll.Content" xml:space="preserve">
<value>Select all</value>
<comment>Label for select all checkbox</comment>
Expand Down
43 changes: 13 additions & 30 deletions tools/SetupFlow/DevHome.SetupFlow/Views/AppManagementView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
<ResourceDictionary Source="ms-appx:///DevHome.SetupFlow/Styles/SetupFlowStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<converters:DoubleToVisibilityConverter x:Key="CountToVisibilityConverter" GreaterThan="0" FalseValue="Visible" TrueValue="Collapsed" />
<Style x:Key="SearchBoxStyle" TargetType="AutoSuggestBox" BasedOn="{StaticResource DefaultAutoSuggestBoxStyle}">
<Setter Property="QueryIcon" Value="Find"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Width" Value="400"/>
<Setter Property="Margin" Value="0,0,0,20"/>
</Style>
</ResourceDictionary>
</UserControl.Resources>

Expand Down Expand Up @@ -58,36 +64,13 @@
</Grid.RowDefinitions>

<!-- Search bar -->
<common:ExperimentControl ExperimentKey="AppManagement_SearchBoxPlaceholder" x:Name="SearchBox">
<common:ExperimentControl.Resources>
<Style TargetType="AutoSuggestBox" BasedOn="{StaticResource DefaultAutoSuggestBoxStyle}">
<Setter Property="QueryIcon" Value="Find"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Width" Value="400"/>
<Setter Property="Margin" Value="0,0,0,20"/>
</Style>
</common:ExperimentControl.Resources>

<common:ExperimentControl.DefaultContent>
<AutoSuggestBox x:Name="SearchBox_Default" x:Uid="SearchBox" Text="{x:Bind ViewModel.SearchText, Mode=TwoWay}">
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="TextChanged">
<ic:InvokeCommandAction Command="{x:Bind ViewModel.SearchTextChangedCommand}" CommandParameter="{x:Bind Path=SearchBox_Default.Text, Mode=OneWay}"/>
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
</AutoSuggestBox>
</common:ExperimentControl.DefaultContent>

<common:ExperimentControl.ExperimentContent>
<AutoSuggestBox x:Name="SearchBox_Experiment" x:Uid="SearchBox_Experiment" Text="{x:Bind ViewModel.SearchText, Mode=TwoWay}">
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="TextChanged">
<ic:InvokeCommandAction Command="{x:Bind ViewModel.SearchTextChangedCommand}" CommandParameter="{x:Bind Path=SearchBox_Experiment.Text, Mode=OneWay}"/>
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
</AutoSuggestBox>
</common:ExperimentControl.ExperimentContent>
</common:ExperimentControl>
<AutoSuggestBox x:Name="SearchBox" x:Uid="SearchBox" Text="{x:Bind ViewModel.SearchText, Mode=TwoWay}" Style="{StaticResource SearchBoxStyle}">
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="TextChanged">
<ic:InvokeCommandAction Command="{x:Bind ViewModel.SearchTextChangedCommand}" CommandParameter="{x:Bind Path=SearchBox.Text, Mode=OneWay}"/>
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
</AutoSuggestBox>

<!-- Main content -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Name="MainContent" AutomationProperties.AccessibilityView="Raw">
Expand Down

0 comments on commit 1900e4f

Please sign in to comment.