Skip to content

Commit

Permalink
chore: Fix to get navbar on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklimakc committed Oct 4, 2024
1 parent 8c1ad2f commit ec38dd8
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 119 deletions.
5 changes: 3 additions & 2 deletions build/ci/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ stages:
# Don't trigger this stage if only docs files are changed
condition: ne(dependencies.Determine_Changes.outputs['evaluate_changes.DetermineChanges.docsOnly'], 'true')
jobs:
- template: stage-build-uitests-wasm.yml
- template: stage-build-uitests-android.yml
# Temporary disabled to make build faster
#- template: stage-build-uitests-wasm.yml
#- template: stage-build-uitests-android.yml
- template: stage-build-uitests-ios.yml
# Disabled waiting on uno fix: https://github.com/unoplatform/uno/pull/17668
# - template: stage-build-runtimetests-skia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ public async Task When_Commerce_Responsive()
iOS: () =>
{
var title = App.CreateQuery(x => x.WithClass("navigationBar").Descendant("label")).FirstResult();
Assert.IsNotNull(title);
Assert.AreEqual("Deals", title.Text);
},
Android: async () => App.WaitElement("DealsNavigationBar"),
Browser: async () => App.WaitElement("DealsNavigationBar")
Android: () => App.WaitElement("DealsNavigationBar"),
Browser: () => App.WaitElement("DealsNavigationBar")
);

// Select a product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,138 +21,119 @@
TargetElement="{Binding ElementName=ParentGrid}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="Tabs.Visibility"
Value="Collapsed" />
<Setter Target="NavView.IsPaneToggleButtonVisible"
Value="True" />
<Setter Target="NavView.IsPaneVisible"
Value="true" />
<Setter Target="NavView.PaneDisplayMode"
Value="Auto" />
<Setter Target="Tabs.Visibility" Value="Collapsed" />
<Setter Target="NavView.IsPaneToggleButtonVisible" Value="True" />
<Setter Target="NavView.IsPaneVisible" Value="true" />
<Setter Target="NavView.PaneDisplayMode" Value="Auto" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Narrow">
<VisualState.StateTriggers>
<triggers:ControlSizeTrigger MinWidth="0" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="Tabs.Visibility"
Value="Visible" />
<Setter Target="NavView.IsPaneToggleButtonVisible"
Value="false" />
<Setter Target="NavView.PaneDisplayMode"
Value="LeftMinimal" />
<Setter Target="NavView.IsPaneOpen"
Value="False" />
<Setter Target="Tabs.Visibility" Value="Visible" />
<Setter Target="NavView.IsPaneToggleButtonVisible" Value="false" />
<Setter Target="NavView.PaneDisplayMode" Value="LeftMinimal" />
<Setter Target="NavView.IsPaneOpen" Value="False" />
</VisualState.Setters>
</VisualState>

</VisualStateGroup>
</VisualStateManager.VisualStateGroups>

<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<utu:NavigationBar AutomationProperties.AutomationId="HomeNavigationBar"
Content="Home" />
<Grid.Resources>
<x:String x:Key="Icon_bolt">M 3.9962074756622314 18 L 2.9962074756622314 18 L 3.9962074756622314 11 L 0.4962073564529419 11 C -0.08379262685775757 11 -0.07379274815320969 10.68000015616417 0.11620724946260452 10.34000015258789 C 0.30620724707841873 10.000000149011612 0.16620741412043571 10.260000266134739 0.18620741367340088 10.220000267028809 C 1.4762073755264282 7.940000295639038 3.4162073135375977 4.539999961853027 5.996207237243652 0 L 6.996207237243652 0 L 5.996207237243652 7 L 9.496207237243652 7 C 9.986207246780396 7 10.056206554174423 7.330000221729279 9.966206550598145 7.510000228881836 L 9.896206855773926 7.659999847412109 C 5.956206798553467 14.549999713897705 3.9962074756622314 18 3.9962074756622314 18 Z</x:String>
<x:String x:Key="Icon_person">M 8 8 C 10.210000038146973 8 12 6.210000038146973 12 4 C 12 1.7899999618530273 10.210000038146973 0 8 0 C 5.789999961853027 0 4 1.7899999618530273 4 4 C 4 6.210000038146973 5.789999961853027 8 8 8 Z M 8 10 C 5.329999923706055 10 0 11.339999914169312 0 14 L 0 16 L 16 16 L 16 14 C 16 11.339999914169312 10.670000076293945 10 8 10 Z</x:String>
<x:String x:Key="Icon_storefront">M 19.894636154174805 5.890000343322754 L 18.844636917114258 1.5199999809265137 C 18.62463691830635 0.6200000047683716 17.844637095928192 8.881784197001252e-16 16.93463706970215 8.881784197001252e-16 L 3.044635772705078 8.881784197001252e-16 C 2.144635796546936 4.440892098500626e-16 1.3546356707811356 0.6299999952316284 1.1446356773376465 1.5199999809265137 L 0.0946355015039444 5.890000343322754 C -0.14536449313163757 6.910000324249268 0.07463562488555908 7.950000464916229 0.7146356105804443 8.770000457763672 C 0.794635608792305 8.880000457167625 0.9046355783939362 8.960000418126583 0.9946355819702148 9.0600004196167 L 0.9946355819702148 16 C 0.9946355819702148 17.100000023841858 1.894635558128357 18 2.994635581970215 18 L 16.99463653564453 18 C 18.09463655948639 18 18.99463653564453 17.100000023841858 18.99463653564453 16 L 18.99463653564453 9.0600004196167 C 19.08463653922081 8.97000041604042 19.19463722407818 8.879999734461308 19.27463722229004 8.779999732971191 C 19.914637207984924 7.959999740123749 20.144636154174805 6.910000324249268 19.894636154174805 5.890000343322754 Z M 16.90463638305664 1.989999771118164 L 17.954635620117188 6.359999656677246 C 18.054635621607304 6.779999643564224 17.964635610580444 7.1999997198581696 17.704635620117188 7.529999732971191 C 17.56463561952114 7.709999740123749 17.264636993408203 8 16.764636993408203 8 C 16.15463697910309 8 15.62463504821062 7.509999632835388 15.554635047912598 6.859999656677246 L 14.974635124206543 2 L 16.90463638305664 1.989999771118164 Z M 10.994635581970215 2 L 12.954635620117188 2 L 13.494635581970215 6.520000457763672 C 13.544635582715273 6.910000443458557 13.424635648727417 7.300000160932541 13.16463565826416 7.590000152587891 C 12.944635659456253 7.8500001430511475 12.624635845422745 8 12.214635848999023 8 C 11.544635832309723 8 10.994635581970215 7.40999960899353 10.994635581970215 6.689999580383301 L 10.994635581970215 2 Z M 6.484635353088379 6.520000457763672 L 7.034635543823242 2 L 8.994635581970215 2 L 8.994635581970215 6.689999580383301 C 8.994635581970215 7.40999960899353 8.44463562965393 8 7.7046356201171875 8 C 7.364635616540909 8 7.054635271430016 7.8500001430511475 6.814635276794434 7.590000152587891 C 6.564635276794434 7.300000160932541 6.444635353982449 6.910000443458557 6.484635353088379 6.520000457763672 Z M 2.034635543823242 6.359999656677246 L 3.044635772705078 2 L 5.0146355628967285 2 L 4.434635639190674 6.859999656677246 C 4.354635640978813 7.509999632835388 3.834635615348816 8 3.224635601043701 8 C 2.734635591506958 8 2.4246357679367065 7.709999740123749 2.294635772705078 7.529999732971191 C 2.024635761976242 7.209999740123749 1.934635542333126 6.779999643564224 2.034635543823242 6.359999656677246 Z M 2.994635581970215 16 L 2.994635581970215 9.970000267028809 C 3.0746355801820755 9.980000266805291 3.1446356028318405 10 3.224635601043701 10 C 4.094635605812073 10 4.884635388851166 9.64000016450882 5.464635372161865 9.050000190734863 C 6.064635396003723 9.650000214576721 6.8646352887153625 10 7.774635314941406 10 C 8.644635319709778 10 9.424635827541351 9.639999687671661 10.00463581085205 9.069999694824219 C 10.594635784626007 9.639999687671661 11.394635796546936 10 12.294635772705078 10 C 13.134635746479034 10 13.9346364736557 9.650000214576721 14.534636497497559 9.050000190734863 C 15.114636480808258 9.64000016450882 15.904637217521667 10 16.77463722229004 10 C 16.8546372205019 10 16.924636766314507 9.980000266805291 17.004636764526367 9.970000267028809 L 17.004636764526367 16 L 2.994635581970215 16 Z</x:String>
</Grid.Resources>

<Grid Grid.Row="1">
<Grid.Resources>
<x:String x:Key="Icon_bolt">M 3.9962074756622314 18 L 2.9962074756622314 18 L 3.9962074756622314 11 L 0.4962073564529419 11 C -0.08379262685775757 11 -0.07379274815320969 10.68000015616417 0.11620724946260452 10.34000015258789 C 0.30620724707841873 10.000000149011612 0.16620741412043571 10.260000266134739 0.18620741367340088 10.220000267028809 C 1.4762073755264282 7.940000295639038 3.4162073135375977 4.539999961853027 5.996207237243652 0 L 6.996207237243652 0 L 5.996207237243652 7 L 9.496207237243652 7 C 9.986207246780396 7 10.056206554174423 7.330000221729279 9.966206550598145 7.510000228881836 L 9.896206855773926 7.659999847412109 C 5.956206798553467 14.549999713897705 3.9962074756622314 18 3.9962074756622314 18 Z</x:String>
<x:String x:Key="Icon_person">M 8 8 C 10.210000038146973 8 12 6.210000038146973 12 4 C 12 1.7899999618530273 10.210000038146973 0 8 0 C 5.789999961853027 0 4 1.7899999618530273 4 4 C 4 6.210000038146973 5.789999961853027 8 8 8 Z M 8 10 C 5.329999923706055 10 0 11.339999914169312 0 14 L 0 16 L 16 16 L 16 14 C 16 11.339999914169312 10.670000076293945 10 8 10 Z</x:String>
<x:String x:Key="Icon_storefront">M 19.894636154174805 5.890000343322754 L 18.844636917114258 1.5199999809265137 C 18.62463691830635 0.6200000047683716 17.844637095928192 8.881784197001252e-16 16.93463706970215 8.881784197001252e-16 L 3.044635772705078 8.881784197001252e-16 C 2.144635796546936 4.440892098500626e-16 1.3546356707811356 0.6299999952316284 1.1446356773376465 1.5199999809265137 L 0.0946355015039444 5.890000343322754 C -0.14536449313163757 6.910000324249268 0.07463562488555908 7.950000464916229 0.7146356105804443 8.770000457763672 C 0.794635608792305 8.880000457167625 0.9046355783939362 8.960000418126583 0.9946355819702148 9.0600004196167 L 0.9946355819702148 16 C 0.9946355819702148 17.100000023841858 1.894635558128357 18 2.994635581970215 18 L 16.99463653564453 18 C 18.09463655948639 18 18.99463653564453 17.100000023841858 18.99463653564453 16 L 18.99463653564453 9.0600004196167 C 19.08463653922081 8.97000041604042 19.19463722407818 8.879999734461308 19.27463722229004 8.779999732971191 C 19.914637207984924 7.959999740123749 20.144636154174805 6.910000324249268 19.894636154174805 5.890000343322754 Z M 16.90463638305664 1.989999771118164 L 17.954635620117188 6.359999656677246 C 18.054635621607304 6.779999643564224 17.964635610580444 7.1999997198581696 17.704635620117188 7.529999732971191 C 17.56463561952114 7.709999740123749 17.264636993408203 8 16.764636993408203 8 C 16.15463697910309 8 15.62463504821062 7.509999632835388 15.554635047912598 6.859999656677246 L 14.974635124206543 2 L 16.90463638305664 1.989999771118164 Z M 10.994635581970215 2 L 12.954635620117188 2 L 13.494635581970215 6.520000457763672 C 13.544635582715273 6.910000443458557 13.424635648727417 7.300000160932541 13.16463565826416 7.590000152587891 C 12.944635659456253 7.8500001430511475 12.624635845422745 8 12.214635848999023 8 C 11.544635832309723 8 10.994635581970215 7.40999960899353 10.994635581970215 6.689999580383301 L 10.994635581970215 2 Z M 6.484635353088379 6.520000457763672 L 7.034635543823242 2 L 8.994635581970215 2 L 8.994635581970215 6.689999580383301 C 8.994635581970215 7.40999960899353 8.44463562965393 8 7.7046356201171875 8 C 7.364635616540909 8 7.054635271430016 7.8500001430511475 6.814635276794434 7.590000152587891 C 6.564635276794434 7.300000160932541 6.444635353982449 6.910000443458557 6.484635353088379 6.520000457763672 Z M 2.034635543823242 6.359999656677246 L 3.044635772705078 2 L 5.0146355628967285 2 L 4.434635639190674 6.859999656677246 C 4.354635640978813 7.509999632835388 3.834635615348816 8 3.224635601043701 8 C 2.734635591506958 8 2.4246357679367065 7.709999740123749 2.294635772705078 7.529999732971191 C 2.024635761976242 7.209999740123749 1.934635542333126 6.779999643564224 2.034635543823242 6.359999656677246 Z M 2.994635581970215 16 L 2.994635581970215 9.970000267028809 C 3.0746355801820755 9.980000266805291 3.1446356028318405 10 3.224635601043701 10 C 4.094635605812073 10 4.884635388851166 9.64000016450882 5.464635372161865 9.050000190734863 C 6.064635396003723 9.650000214576721 6.8646352887153625 10 7.774635314941406 10 C 8.644635319709778 10 9.424635827541351 9.639999687671661 10.00463581085205 9.069999694824219 C 10.594635784626007 9.639999687671661 11.394635796546936 10 12.294635772705078 10 C 13.134635746479034 10 13.9346364736557 9.650000214576721 14.534636497497559 9.050000190734863 C 15.114636480808258 9.64000016450882 15.904637217521667 10 16.77463722229004 10 C 16.8546372205019 10 16.924636766314507 9.980000266805291 17.004636764526367 9.970000267028809 L 17.004636764526367 16 L 2.994635581970215 16 Z</x:String>
</Grid.Resources>



<muxc:NavigationView x:Name="NavView"
IsSettingsVisible="False"
IsPaneToggleButtonVisible="False"
PaneDisplayMode="LeftMinimal"
IsPaneOpen="False"
IsBackButtonVisible="Collapsed"
OpenPaneLength="200"
uen:Region.Attached="true">
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItem AutomationProperties.AutomationId="DealsNavigationViewItem"
Content="Deals"
uen:Region.Name="Deals">
<muxc:NavigationViewItem.Icon>
<muxc:NavigationView x:Name="NavView"
IsSettingsVisible="False"
IsPaneToggleButtonVisible="False"
PaneDisplayMode="LeftMinimal"
IsPaneOpen="False"
IsBackButtonVisible="Collapsed"
OpenPaneLength="200"
uen:Region.Attached="true">
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItem AutomationProperties.AutomationId="DealsNavigationViewItem"
Content="Deals"
uen:Region.Name="Deals">
<muxc:NavigationViewItem.Icon>
<PathIcon Data="{StaticResource Icon_bolt}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem AutomationProperties.AutomationId="ProductsNavigationViewItem"
Content="Products"
uen:Region.Name="Products">
<muxc:NavigationViewItem.Icon>
<PathIcon Data="{StaticResource Icon_storefront}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem AutomationProperties.AutomationId="ProfileNavigationViewItem"
Content="Profile"
uen:Region.Name="Profile">
<muxc:NavigationViewItem.Icon>
<PathIcon Data="{StaticResource Icon_person}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem AutomationProperties.AutomationId="SettingsNavigationViewItem"
Content="Settings"
uen:Navigation.Request="Settings">
<muxc:NavigationViewItem.Icon>
<PathIcon Data="{StaticResource Icon_person}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
</muxc:NavigationView.MenuItems>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Button Content="Products (threading test)"
Click="{x:Bind ViewModel.GoToProducts}" />
<Button Content="Products (clear stack)"
Click="{x:Bind ViewModel.GoToProductsClearStack}" />
</StackPanel>
<Grid uen:Region.Attached="True"
uen:Region.Navigator="Visibility"
Grid.Row="1" />
<utu:TabBar x:Name="Tabs"
Grid.Row="2"
uen:Region.Attached="True">
<utu:TabBarItem AutomationProperties.AutomationId="DealsTabBarItem"
IsSelectable="True"
uen:Region.Name="Deals">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_bolt}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem AutomationProperties.AutomationId="ProductsNavigationViewItem"
Content="Products"
uen:Region.Name="Products">
<muxc:NavigationViewItem.Icon>
</utu:TabBarItem.Icon>
</utu:TabBarItem>
<utu:TabBarItem AutomationProperties.AutomationId="ProductsTabBarItem"
IsSelectable="True"
uen:Region.Name="-/Products">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_storefront}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem AutomationProperties.AutomationId="ProfileNavigationViewItem"
Content="Profile"
uen:Region.Name="Profile">
<muxc:NavigationViewItem.Icon>
</utu:TabBarItem.Icon>
</utu:TabBarItem>
<utu:TabBarItem AutomationProperties.AutomationId="ProfileTabBarItem"
IsSelectable="True"
uen:Region.Name="Profile">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_person}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem AutomationProperties.AutomationId="SettingsNavigationViewItem"
Content="Settings"
uen:Navigation.Request="Settings">
<muxc:NavigationViewItem.Icon>
</utu:TabBarItem.Icon>
</utu:TabBarItem>
<utu:TabBarItem AutomationProperties.AutomationId="SettingsTabBarItem"
IsSelectable="False"
uen:Navigation.Request="Settings">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_person}" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
</muxc:NavigationView.MenuItems>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Button Content="Products (threading test)"
Click="{x:Bind ViewModel.GoToProducts}" />
<Button Content="Products (clear stack)"
Click="{x:Bind ViewModel.GoToProductsClearStack}" />
</StackPanel>
<Grid uen:Region.Attached="True"
uen:Region.Navigator="Visibility" Grid.Row="1"/>
<utu:TabBar x:Name="Tabs"
Grid.Row="2"
uen:Region.Attached="True">
<utu:TabBarItem AutomationProperties.AutomationId="DealsTabBarItem"
IsSelectable="True"
uen:Region.Name="Deals">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_bolt}" />
</utu:TabBarItem.Icon>
</utu:TabBarItem>
<utu:TabBarItem AutomationProperties.AutomationId="ProductsTabBarItem"
IsSelectable="True"
uen:Region.Name="-/Products">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_storefront}" />
</utu:TabBarItem.Icon>
</utu:TabBarItem>
<utu:TabBarItem AutomationProperties.AutomationId="ProfileTabBarItem"
IsSelectable="True"
uen:Region.Name="Profile">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_person}" />
</utu:TabBarItem.Icon>
</utu:TabBarItem>
<utu:TabBarItem AutomationProperties.AutomationId="SettingsTabBarItem"
IsSelectable="False"
uen:Navigation.Request="Settings">
<utu:TabBarItem.Icon>
<PathIcon Data="{StaticResource Icon_person}" />
</utu:TabBarItem.Icon>
</utu:TabBarItem>
</utu:TabBar>
</Grid>

</muxc:NavigationView>
</Grid>
</utu:TabBarItem.Icon>
</utu:TabBarItem>
</utu:TabBar>
</Grid>
</muxc:NavigationView>
</Grid>
</Page>

0 comments on commit ec38dd8

Please sign in to comment.