Skip to content

Commit

Permalink
Remove the animations from the suggestions UI (#17247)
Browse files Browse the repository at this point in the history
gotta go fast, and these animations are not fast

noted in #15845
  • Loading branch information
zadjii-msft committed May 13, 2024
1 parent 30ef1f4 commit 46526bc
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/cascadia/TerminalApp/SuggestionsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
xmlns:model="using:Microsoft.Terminal.Settings.Model"
xmlns:mtu="using:Microsoft.Terminal.UI"
xmlns:mux="using:Microsoft.UI.Xaml.Controls"
MinWidth="256"
AllowFocusOnInteraction="True"
AutomationProperties.Name="{x:Bind ControlName, Mode=OneWay}"
IsTabStop="True"
Expand Down Expand Up @@ -99,6 +100,24 @@
GeneralItemTemplate="{StaticResource GeneralItemTemplate}"
NestedItemTemplate="{StaticResource NestedItemTemplate}" />

<!--
Remove all item animations from the suggestions UI. They're
entirely too slow to let that UI be usable.
-->
<Style x:Key="NoAnimationsPlease"
TargetType="ListView">
<Setter Property="ItemContainerTransitions">
<Setter.Value>
<TransitionCollection>
<!-- (deleted transitions are left for reference for what we removed) -->
<ContentThemeTransition />
<!--<AddDeleteThemeTransition/>-->
<!--<ReorderThemeTransition/>-->
<!--<EntranceThemeTransition IsStaggeringEnabled="False"/>-->
</TransitionCollection>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</UserControl.Resources>

Expand Down Expand Up @@ -203,7 +222,8 @@
ItemClick="_listItemClicked"
ItemsSource="{x:Bind FilteredActions}"
SelectionChanged="_listItemSelectionChanged"
SelectionMode="Single" />
SelectionMode="Single"
Style="{StaticResource NoAnimationsPlease}" />

</Grid>

Expand Down

0 comments on commit 46526bc

Please sign in to comment.