Skip to content

Commit

Permalink
[infra] Improve test app UIs and usability, switch to fast pass rende…
Browse files Browse the repository at this point in the history
…ring (#4426)

* First round of changes; Fun fact: you can slice up a sphere in such a way that you can assemble two spheres out of it with same volume (Banach Tarski Paradox)

* Second round of changes; Fun fact: Despite being an uncountable set (""not listable""), there exists a well-ordering of the real numbers (ZFC & axiom of choice)

* Merge branch 'master' into user/chingucoding/testapp-ui-improvements

* Third round of changes; Fun fact: At the start of the 20th century, mathematics went through a crisis since there was no clear axiomatic foundation for Math; this was eventually solved by using set theory (ZFC) as foundation

* Fourth round of changes; Fun fact: Despite having an infinite number of digits, it is neither poven nor disproven that pi contains any sequence of digits (i.e. it is a normal number). most normal numbers we know are constructed (e.g. Champerowne's constant)

* Fifth round of changes, switching to fast pass rendering; Fun fact: The only holomorphic (complex differentiable) functions with a global maximum are constants, all other holomorphic functions have no global maximum besides on the domain boundary

* Bring back ProgressBarPage changes

* Possibly fix test failure

* Fix bad merge

* Revert version setting

* update verification files

* Fix formatting

Co-authored-by: Karen Lai <[email protected]>
  • Loading branch information
marcelwgn and karkarl authored Nov 10, 2021
1 parent 9247886 commit feb7029
Show file tree
Hide file tree
Showing 61 changed files with 1,161 additions and 1,124 deletions.
2 changes: 1 addition & 1 deletion dev/ColorPicker/TestUI/ColorPickerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mc:Ignorable="d"
GotFocus="TestPage_GotFocus">

<Grid x:Name="Root" Background="{ThemeResource SystemControlBackgroundAltHighBrush}" Margin="12">
<Grid x:Name="Root" Margin="12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
Expand Down
83 changes: 46 additions & 37 deletions dev/CommonStyles/TestUI/CompactPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,58 @@
<local:TestPage.Resources>
<ResourceDictionary Source="ms-appx:///Compact.xaml" />
</local:TestPage.Resources>
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="12">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="12">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<TextBlock Text="Sample controls" Style="{ThemeResource StandardGroupHeader}"/>
<StackPanel Padding="4" BorderThickness="1" BorderBrush="{ThemeResource SystemChromeGrayColor}">
<Button Content="Toggle Compact In AppLevel For Manual Testing" Click="ToggleCompactInAppLevel_Click" Margin="0,0,0,8"/>
<muxc:NavigationView x:Name="Nav">
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItem x:Name="NavItem1" Icon="Accept" Content="OK" />
<muxc:NavigationViewItem Icon="Folder" Content="Folder" />
</muxc:NavigationView.MenuItems>
</muxc:NavigationView>
<ScrollViewer Grid.Row="1">
<StackPanel Padding="4" BorderThickness="1" BorderBrush="{ThemeResource SystemChromeGrayColor}">
<Button Content="Toggle Compact In AppLevel For Manual Testing" Click="ToggleCompactInAppLevel_Click" Margin="0,0,0,8"/>
<muxc:NavigationView x:Name="Nav">
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItem x:Name="NavItem1" Icon="Accept" Content="OK" />
<muxc:NavigationViewItem Icon="Folder" Content="Folder" />
</muxc:NavigationView.MenuItems>
</muxc:NavigationView>

<TextBox x:Name="TextBox" Text="Density" Header="TextBox"/>
<PasswordBox x:Name="PasswordBox" Header="Password"/>
<AutoSuggestBox x:Name="AutoSuggestBox" Header="AutoSuggestBox" TextChanged="AutoSuggestBox_TextChanged" />
<RichEditBox x:Name="RichEditBox" Header="RichEditBox"/>
<TextBox x:Name="TextBox" Text="Density" Header="TextBox"/>
<PasswordBox x:Name="PasswordBox" Header="Password"/>
<AutoSuggestBox x:Name="AutoSuggestBox" Header="AutoSuggestBox" TextChanged="AutoSuggestBox_TextChanged" />
<RichEditBox x:Name="RichEditBox" Header="RichEditBox"/>

<ComboBox x:Name="ComboBox" Header="ComboBox">
<x:String>Blue</x:String>
<x:String>Green</x:String>
</ComboBox>
<DatePicker x:Name="DatePicker" Header="DatePicker"/>
<TimePicker x:Name="TimePicker" Header="TimePicker"/>
<ComboBox x:Name="ComboBox" Header="ComboBox">
<x:String>Blue</x:String>
<x:String>Green</x:String>
</ComboBox>
<DatePicker x:Name="DatePicker" Header="DatePicker"/>
<TimePicker x:Name="TimePicker" Header="TimePicker"/>

<ListView x:Name="ListView">
<x:String>Item 1</x:String>
</ListView>
<muxc:TreeView x:Name="TreeView">
<muxc:TreeView.RootNodes>
<muxc:TreeViewNode Content="Flavors" IsExpanded="True">
<muxc:TreeViewNode.Children>
<muxc:TreeViewNode Content="Vanilla"/>
<muxc:TreeViewNode Content="Strawberry"/>
<muxc:TreeViewNode Content="Chocolate"/>
</muxc:TreeViewNode.Children>
</muxc:TreeViewNode>
</muxc:TreeView.RootNodes>
</muxc:TreeView>
</StackPanel>
<TextBlock Text="Validation" Style="{ThemeResource StandardGroupHeader}"/>
<StackPanel Orientation="Horizontal">
<ListView x:Name="ListView">
<x:String>Item 1</x:String>
</ListView>
<muxc:TreeView x:Name="TreeView">
<muxc:TreeView.RootNodes>
<muxc:TreeViewNode Content="Flavors" IsExpanded="True">
<muxc:TreeViewNode.Children>
<muxc:TreeViewNode Content="Vanilla"/>
<muxc:TreeViewNode Content="Strawberry"/>
<muxc:TreeViewNode Content="Chocolate"/>
</muxc:TreeViewNode.Children>
</muxc:TreeViewNode>
</muxc:TreeView.RootNodes>
</muxc:TreeView>
</StackPanel>
</ScrollViewer>
<TextBlock Grid.Row="2" Text="Validation" Style="{ThemeResource StandardGroupHeader}"/>
<StackPanel Grid.Row="3" Orientation="Horizontal">
<Button x:Name="RunTest" Content="RunTest" Click="RunTest_Click" Margin="0,0,8,0"/>
<TextBox x:Name="CompactTestResult" AutomationProperties.Name="CompactTestResult" Text="Result"/>
</StackPanel>
</StackPanel>
</Grid>

</local:TestPage>
28 changes: 14 additions & 14 deletions dev/CommonStyles/TestUI/CornerRadiusPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
</ListBox>
</Grid>
<Grid Grid.Row="5" Style="{StaticResource RightColumn}" VerticalAlignment="Center">
<TextBlock VerticalAlignment="Center">N/A</TextBlock>
<TextBlock VerticalAlignment="Center" Text="N/A"/>
</Grid>

<TextBlock Grid.Row="6" Text="ComboBox" Style="{StaticResource SideHeader}"/>
Expand Down Expand Up @@ -238,7 +238,7 @@
</CommandBar>
</Grid>
<Grid Grid.Row="11" Style="{StaticResource RightColumn}" VerticalAlignment="Center">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="12" Text="Flyout" Style="{StaticResource SideHeader}"/>
Expand Down Expand Up @@ -422,7 +422,7 @@
<ToggleSwitch/>
</Grid>
<Grid Grid.Row="20" Style="{StaticResource RightColumn}" VerticalAlignment="Center">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="21" Text="Slider" Style="{StaticResource SideHeader}"/>
Expand Down Expand Up @@ -500,7 +500,7 @@
</AppBar>
</Grid>
<Grid Grid.Row="25" Style="{StaticResource RightColumn}" VerticalAlignment="Center">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="26" Text="MenuBar" Style="{StaticResource SideHeader}"/>
Expand Down Expand Up @@ -572,7 +572,7 @@
<TextBlock Text="Hello World"/>
</Grid>
<Grid Grid.Row="32" Style="{StaticResource RightColumn}">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="33" Text="RichTextBlock" Style="{StaticResource SideHeader}"/>
Expand All @@ -584,7 +584,7 @@
</RichTextBlock>
</Grid>
<Grid Grid.Row="33" Style="{StaticResource RightColumn}">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="34" Text="CheckBox" Style="{StaticResource SideHeader}"/>
Expand Down Expand Up @@ -675,7 +675,7 @@
</StackPanel>
</Grid>
<Grid Grid.Row="40" Style="{StaticResource RightColumn}" VerticalAlignment="Center">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="41" Text="ToggleButton" Style="{StaticResource SideHeader}"/>
Expand All @@ -700,7 +700,7 @@
<controls:ToggleSplitButton.Flyout>
<Flyout>
<Flyout.Content>
<TextBlock>Hello World</TextBlock>
<TextBlock Text="Hello World"/>
</Flyout.Content>
</Flyout>
</controls:ToggleSplitButton.Flyout>
Expand All @@ -711,7 +711,7 @@
<controls:ToggleSplitButton.Flyout>
<Flyout>
<Flyout.Content>
<TextBlock>Hello World</TextBlock>
<TextBlock Text="Hello World"/>
</Flyout.Content>
</Flyout>
</controls:ToggleSplitButton.Flyout>
Expand All @@ -735,7 +735,7 @@
<HyperlinkButton Content="Hello World"/>
</Grid>
<Grid Grid.Row="44" Style="{StaticResource RightColumn}" VerticalAlignment="Center">
<TextBlock>N/A</TextBlock>
<TextBlock Text="N/A"/>
</Grid>

<TextBlock Grid.Row="45" Text="DropDownButton" Style="{StaticResource SideHeader}"/>
Expand All @@ -748,7 +748,7 @@
<controls:DropDownButton.Flyout>
<Flyout>
<Flyout.Content>
<TextBlock>Hello World</TextBlock>
<TextBlock Text="Hello World"/>
</Flyout.Content>
</Flyout>
</controls:DropDownButton.Flyout>
Expand All @@ -759,7 +759,7 @@
<controls:DropDownButton.Flyout>
<Flyout>
<Flyout.Content>
<TextBlock>Hello World</TextBlock>
<TextBlock Text="Hello World"/>
</Flyout.Content>
</Flyout>
</controls:DropDownButton.Flyout>
Expand All @@ -775,7 +775,7 @@
<controls:SplitButton.Flyout>
<Flyout>
<Flyout.Content>
<TextBlock>Hello World</TextBlock>
<TextBlock Text="Hello World"/>
</Flyout.Content>
</Flyout>
</controls:SplitButton.Flyout>
Expand All @@ -786,7 +786,7 @@
<controls:SplitButton.Flyout>
<Flyout>
<Flyout.Content>
<TextBlock>Hello World</TextBlock>
<TextBlock Text="Hello World"/>
</Flyout.Content>
</Flyout>
</controls:SplitButton.Flyout>
Expand Down
6 changes: 3 additions & 3 deletions dev/DropDownButton/TestUI/DropDownButtonPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
<RowDefinition />
</Grid.RowDefinitions>

<TextBlock Grid.Row="0">Click count:</TextBlock>
<TextBlock Grid.Row="0" Text="Click count:"/>
<TextBlock x:Name="ClickCountTextBlock" AutomationProperties.Name="ClickCountTextBlock"
Margin="4,0,0,0" Text="0" Grid.Row="0" Grid.Column="1"/>
<TextBlock Grid.Row="1">Flyout opened:</TextBlock>
<TextBlock Grid.Row="1" Text="Flyout opened:"/>
<TextBlock x:Name="FlyoutOpenedCountTextBlock" AutomationProperties.Name="FlyoutOpenedCountTextBlock"
Margin="4,0,0,0" Text="0" Grid.Row="1" Grid.Column="1"/>
<TextBlock Grid.Row="2">Flyout closed:</TextBlock>
<TextBlock Grid.Row="2" Text="Flyout closed:"/>
<TextBlock x:Name="FlyoutClosedCountTextBlock" AutomationProperties.Name="FlyoutClosedCountTextBlock"
Margin="4,0,0,0" Text="0" Grid.Row="2" Grid.Column="1"/>
</Grid>
Expand Down
16 changes: 8 additions & 8 deletions dev/Expander/TestUI/ExpanderPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,43 +33,43 @@
<controls:Expander.Header>
<TextBlock Text="This expander is collapsed by default. This is a long title to test the header width. ext should be wrapping here." TextWrapping="Wrap" Margin="0,12,0,13"/>
</controls:Expander.Header>
<TextBlock AutomationProperties.AutomationId="CollapsedExpanderContent">Content</TextBlock>
<TextBlock AutomationProperties.AutomationId="CollapsedExpanderContent" Text="Content"/>
</controls:Expander>

<controls:Expander AutomationProperties.Name="ExpanderWithButtons" IsExpanded="False" Margin="12" MaxWidth="{ThemeResource FlyoutThemeMaxWidth}">
<controls:Expander.Header>
<ToggleButton>This is a toggle button in the header</ToggleButton>
</controls:Expander.Header>
<StackPanel>
<TextBlock TextWrapping="Wrap">Content. This is long content to test wrapping on the content section, this content should be wrapping after the control expands to max width.</TextBlock>
<TextBlock TextWrapping="Wrap" Text="Content. This is long content to test wrapping on the content section, this content should be wrapping after the control expands to max width."/>
</StackPanel>
</controls:Expander>

<controls:Expander AutomationProperties.Name="ExpanderWithUpwardsDirection" ExpandDirection="Up" IsExpanded="False" Margin="12">
<controls:Expander.Header>
<TextBlock Margin="0,0,0,1">This expander will expand upwards</TextBlock>
<TextBlock Margin="0,0,0,1" Text="This expander will expand upwards"/>
</controls:Expander.Header>
<StackPanel>
<TextBlock>Content</TextBlock>
<TextBlock Text="Content"/>
</StackPanel>
</controls:Expander>

<controls:Expander IsEnabled="False" AutomationProperties.Name="ExpanderNotEnabled" ExpandDirection="Down" IsExpanded="False" Margin="12">
<controls:Expander.Header>
<TextBlock Margin="0,0,0,1">This expander is not enabled</TextBlock>
<TextBlock Margin="0,0,0,1" Text="This expander is not enabled"/>
</controls:Expander.Header>
<StackPanel>
<TextBlock>Content</TextBlock>
<TextBlock Text="Content"/>
</StackPanel>
</controls:Expander>

<local:TestControl IsTabStop="True" x:Name="CustomControl" AutomationProperties.Name="CustomControl" Margin="12">
<controls:Expander x:Name="ExpanderWithCustomEventsSource" ExpandDirection="Down" IsExpanded="False">
<controls:Expander.Header>
<TextBlock Margin="0,0,0,1">This expander has a custom events source</TextBlock>
<TextBlock Margin="0,0,0,1" Text="This expander has a custom events source"/>
</controls:Expander.Header>
<StackPanel>
<TextBlock>Content</TextBlock>
<TextBlock Text="Content"/>
</StackPanel>
</controls:Expander>
</local:TestControl>
Expand Down
8 changes: 4 additions & 4 deletions dev/Materials/Acrylic/TestUI/AcrylicBrushPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,22 @@
<ToggleButton x:Name="AnimateBackgroundButton" Content="Animate Background" Checked="AnimateBackgroundButton_Checked" Unchecked="AnimateBackgroundButton_Unchecked"/>

<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Top" FontSize="12">TintOpacity:</TextBlock>
<TextBlock VerticalAlignment="Top" FontSize="12" Text="TintOpacity:"/>
<Slider x:Name="TintOpacity" Width="200" Minimum="0.0" Maximum="1.0" StepFrequency="0.05" Value="0.6" HorizontalAlignment="Left" ToolTipService.ToolTip="Adjust Tint Opacity" ValueChanged="TintOpacity_ValueChanged" />
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Top" FontSize="12">TintLuminosityOpacity:</TextBlock>
<TextBlock VerticalAlignment="Top" FontSize="12" Text="TintLuminosityOpacity:"/>
<StackPanel Orientation="Horizontal">
<Slider x:Name="TintLuminosityOpacity" Width="200" Minimum="0.0" Maximum="2.0" StepFrequency="0.01" Value="0.9" HorizontalAlignment="Left" ToolTipService.ToolTip="Adjust Luminosity Blend Opacity" ValueChanged="TintLuminosityOpacity_ValueChanged" />
<CheckBox x:Name="AutoTintLuminosityOpacity" Content="Auto" Margin="10,0,0,0" Checked="AutoTintLuminosityOpacity_IsCheckedChanged" Unchecked="AutoTintLuminosityOpacity_IsCheckedChanged" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Top" FontSize="12">Rectangle Size:</TextBlock>
<TextBlock VerticalAlignment="Top" FontSize="12" Text="Rectangle Size:"/>
<Slider x:Name="SizeSlider" Width="200" Minimum="1" Maximum="800" StepFrequency="10" Value="300" HorizontalAlignment="Left" ToolTipService.ToolTip="Adjust Rectangle Size"/>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Top" FontSize="12">ScaleTransform:</TextBlock>
<TextBlock VerticalAlignment="Top" FontSize="12" Text="ScaleTransform:"/>
<Slider x:Name="ScaleTransformSlider" Width="200" Minimum="0.1" Maximum="3" StepFrequency="0.1" Value="1" HorizontalAlignment="Left" ToolTipService.ToolTip="Adjust Rectangle ScaleTransform"/>
</StackPanel>
<Viewbox x:Name="Viewbox"/>
Expand Down
Loading

0 comments on commit feb7029

Please sign in to comment.