unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.8k stars 706 forks source link

[iOS] PipsPager breaks app layout #16715

Closed mcocaroUX closed 4 months ago

mcocaroUX commented 4 months ago

Current behavior

Currently when having a PipsPager+FlipView linked by SelectorExtensions at a Page and its changes it selected value, safe area (bottom and top) turns black. I could reproduce this only on iOS Before sliding: Simulator_Screenshot_-_iPhone_15_-_2024-05-07_at_16 59 20 After sliding: Simulator_Screenshot_-_iPhone_15_-_2024-05-07_at_16 59 39

Expected behavior

Safe area should not be affected

How to reproduce it (as minimally and precisely as possible)

FlipViewSafeArea.zip

Run sample Flip to show next image Notice how safe area turns black

Environment

Package Version(s): Uno.Sdk: 5.2.108

<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="NUnit" Version="4.0.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.4.231219000" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageVersion Include="Uno.Extensions.Hosting" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Hosting.WinUI" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.7.0" />
<PackageVersion Include="Uno.Extensions.Logging.WinUI" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Navigation" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Navigation.WinUI" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Navigation.Toolkit.WinUI" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Reactive" Version="4.1.21" />
<PackageVersion Include="Uno.Extensions.Reactive.WinUI" Version="4.1.21" />
<PackageVersion Include="Uno.Material.WinUI" Version="5.0.13" />
<PackageVersion Include="Uno.Toolkit.WinUI" Version="6.0.18" />
<PackageVersion Include="Uno.Toolkit.WinUI.Material" Version="6.0.18" />
<PackageVersion Include="Uno.Resizetizer" Version="1.4.8" />
<PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="$(UnoVersion)" />
<PackageVersion Include="Uno.UniversalImageLoader" Version="1.9.36" />
<PackageVersion Include="Uno.WinUI" Version="$(UnoVersion)" />
<PackageVersion Include="Uno.WinUI.Lottie" Version="$(UnoVersion)" />
<PackageVersion Include="Uno.WinUI.DevServer" Version="$(UnoVersion)" />
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.10.0.2" />
<PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.70" />
<PackageVersion Include="Xamarin.UITest" Version="4.3.3" />

Visual Studio:

Relevant plugins:

Anything else we need to know?

kazo0 commented 4 months ago

Looks to be the same/related to https://github.com/unoplatform/uno.toolkit.ui/issues/1125

kazo0 commented 4 months ago

This doesn't look to be related to SafeArea or SelectorExtensions. It seems to be an issue specific to PipsPager. If I create a simple all with just a PipsPager and attempt to change pips, I see the behavior:

MainPage.xaml

<Page x:Class="PipsApp.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:PipsApp"
      Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
      <Grid Background="Red">
            <PipsPager Background="Green"
                  HorizontalAlignment="Center"
                  Margin="0,50,0,0"
                  NumberOfPages="10"
                  x:Name="FlipViewPipsPager" />
      </Grid>
</Page>

https://github.com/unoplatform/uno.toolkit.ui/assets/4793020/7d9f82cc-0ea2-4a9e-bd4b-bb085fdf36a8

kazo0 commented 4 months ago

PipsApp.zip

Simple repro app

kazo0 commented 4 months ago

@mcocaroUX Would you be able to confirm that this is no longer occurring as of the Uno.Sdk version 5.3.0-dev.1256?

mcocaroUX commented 4 months ago

@kazo0 Issue is fixed on 5.3.0-dev.1256. Thank you!

agneszitte commented 4 months ago

@kazo0 do we need to backport something for 5.2 stable?

jeromelaban commented 4 months ago

@agneszitte the changes implied cannot be backported, it's related to lifecycle changes.