Skip to content

Commit

Permalink
Remove the animations from the command palette too (#17335)
Browse files Browse the repository at this point in the history
Exactly the same as #17247, but also just applied to the command
palette. It's so much better guys.
  • Loading branch information
zadjii-msft committed May 29, 2024
1 parent 0bd0eea commit a7c99be
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
19 changes: 19 additions & 0 deletions src/cascadia/TerminalApp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,25 @@
</Setter>
</Style>

<!--
Remove all item animations from the suggestions UI and command
palette. 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.ThemeDictionaries>
<ResourceDictionary x:Key="Dark">
<!-- Define resources for Dark mode here -->
Expand Down
3 changes: 2 additions & 1 deletion src/cascadia/TerminalApp/CommandPalette.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@
ItemClick="_listItemClicked"
ItemsSource="{x:Bind FilteredActions}"
SelectionChanged="_listItemSelectionChanged"
SelectionMode="Single" />
SelectionMode="Single"
Style="{StaticResource NoAnimationsPlease}" />

</Grid>

Expand Down
18 changes: 0 additions & 18 deletions src/cascadia/TerminalApp/SuggestionsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,6 @@
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

0 comments on commit a7c99be

Please sign in to comment.