From 8e5fe275856fa274fc23207e42dbf41eee07dd57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:21:44 +0000 Subject: [PATCH 01/34] Initial plan From 50b9fd02e4d2d39bf9e96af489864aaf2149336e Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Thu, 24 Jul 2025 13:40:55 -0500 Subject: [PATCH 02/34] Add Edge Support for SafeAreas and extend to ScrollView --- NuGet.config | 12 +- .../Pages/Controls/TitleBarPage.xaml | 9 +- .../Pages/Others/LargeTitlesPageiOS.cs | 2 +- .../iOS/iOSSafeAreaPage.xaml | 3 +- .../iOS/iOSSafeAreaPage.xaml.cs | 4 +- .../SafeAreaEdgesTypeDesignConverter.cs | 41 ++ src/Controls/src/Core/BindableProperty.cs | 2 +- src/Controls/src/Core/Border/Border.cs | 60 +- .../src/Core/ContentPage/ContentPage.cs | 47 +- .../src/Core/ContentView/ContentView.cs | 62 +- .../Handlers/Items/CarouselViewHandler.iOS.cs | 34 +- src/Controls/src/Core/ISafeAreaElement.cs | 14 + src/Controls/src/Core/Layout/Layout.cs | 67 +- .../src/Core/Layout/LayoutExtensions.cs | 2 + src/Controls/src/Core/Page/Page.cs | 26 +- .../PlatformConfiguration/iOSSpecific/Page.cs | 20 + src/Controls/src/Core/SafeAreaElement.cs | 107 +++ .../src/Core/ScrollView/ScrollView.cs | 52 +- src/Controls/src/Core/Shell/BaseShellItem.cs | 2 + src/Controls/src/Core/TitleBar/TitleBar.cs | 2 + .../tests/Core.UnitTests/SafeAreaTests.cs | 646 ++++++++++++++++++ .../CollectionView/CollectionViewTests.cs | 52 +- .../Elements/Page/PageTests.iOS.cs | 32 + .../Elements/Shell/ShellTests.iOS.cs | 65 ++ .../TestCases.HostApp/Issues/Issue21325.xaml | 5 +- .../TestCases.HostApp/Issues/Issue28986.xaml | 306 +++++++++ .../Issues/Issue28986.xaml.cs | 209 ++++++ .../Issues/Issue28986_Border.xaml | 158 +++++ .../Issues/Issue28986_Border.xaml.cs | 84 +++ .../Issues/Issue28986_ContentPage.xaml | 158 +++++ .../Issues/Issue28986_ContentPage.xaml.cs | 84 +++ .../Issues/Issue28986_ContentView.xaml | 157 +++++ .../Issues/Issue28986_ContentView.xaml.cs | 84 +++ .../Issues/Issue28986_ScrollView.xaml | 165 +++++ .../Issues/Issue28986_ScrollView.xaml.cs | 84 +++ .../Tests/Issues/Issue22417.cs | 2 +- .../Tests/Issues/Issue28986.cs | 160 +++++ .../Xaml.UnitTests/SafeAreaEdgesTests.xaml | 33 + .../Xaml.UnitTests/SafeAreaEdgesTests.xaml.cs | 88 +++ .../Converters/SafeAreaEdgesTypeConverter.cs | 85 +++ src/Core/src/Core/ISafeAreaView2.cs | 14 + .../ScrollView/ScrollViewHandler.iOS.cs | 9 + src/Core/src/Platform/iOS/MauiScrollView.cs | 188 ++++- src/Core/src/Platform/iOS/MauiView.cs | 258 +++++-- src/Core/src/Platform/iOS/SafeAreaPadding.cs | 3 + src/Core/src/Primitives/SafeAreaEdges.cs | 175 +++++ src/Core/src/Primitives/SafeAreaRegions.cs | 37 + .../net-android/PublicAPI.Unshipped.txt | 36 + .../net-tizen/PublicAPI.Unshipped.txt | 6 + .../src/PublicAPI/net/PublicAPI.Unshipped.txt | 36 + .../netstandard/PublicAPI.Unshipped.txt | 36 + .../netstandard2.0/PublicAPI.Unshipped.txt | 36 + .../tests/DeviceTests/Stubs/LayoutStub.cs | 9 +- 53 files changed, 3956 insertions(+), 112 deletions(-) create mode 100644 src/Controls/src/Core.Design/SafeAreaEdgesTypeDesignConverter.cs create mode 100644 src/Controls/src/Core/ISafeAreaElement.cs create mode 100644 src/Controls/src/Core/SafeAreaElement.cs create mode 100644 src/Controls/tests/Core.UnitTests/SafeAreaTests.cs create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986.xaml.cs create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Border.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Border.xaml.cs create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentPage.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentPage.xaml.cs create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentView.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ContentView.xaml.cs create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ScrollView.xaml create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue28986_ScrollView.xaml.cs create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986.cs create mode 100644 src/Controls/tests/Xaml.UnitTests/SafeAreaEdgesTests.xaml create mode 100644 src/Controls/tests/Xaml.UnitTests/SafeAreaEdgesTests.xaml.cs create mode 100644 src/Core/src/Converters/SafeAreaEdgesTypeConverter.cs create mode 100644 src/Core/src/Primitives/SafeAreaEdges.cs create mode 100644 src/Core/src/Primitives/SafeAreaRegions.cs diff --git a/NuGet.config b/NuGet.config index d7fb073a2b47..131e022afa45 100644 --- a/NuGet.config +++ b/NuGet.config @@ -10,19 +10,15 @@ - - - - - - + + @@ -35,6 +31,10 @@ + + + + diff --git a/src/Controls/samples/Controls.Sample/Pages/Controls/TitleBarPage.xaml b/src/Controls/samples/Controls.Sample/Pages/Controls/TitleBarPage.xaml index 9a77c401124c..5f2a6c48f89c 100644 --- a/src/Controls/samples/Controls.Sample/Pages/Controls/TitleBarPage.xaml +++ b/src/Controls/samples/Controls.Sample/Pages/Controls/TitleBarPage.xaml @@ -2,16 +2,15 @@ - - @@ -20,7 +19,7 @@ Text="Content Options" FontSize="24"/> - + ().SetPrefersLargeTitles(true); var page = new ContentPage { Title = "New Title", BackgroundColor = Colors.Red }; - page.On().SetUseSafeArea(true); + SafeAreaElement.SetIgnore(page, SafeAreaEdges.None); var listView = new ListView(ListViewCachingStrategy.RecycleElementAndDataTemplate) { HasUnevenRows = true, diff --git a/src/Controls/samples/Controls.Sample/Pages/PlatformSpecifics/iOS/iOSSafeAreaPage.xaml b/src/Controls/samples/Controls.Sample/Pages/PlatformSpecifics/iOS/iOSSafeAreaPage.xaml index 0a2a844fad9f..012f2d184663 100644 --- a/src/Controls/samples/Controls.Sample/Pages/PlatformSpecifics/iOS/iOSSafeAreaPage.xaml +++ b/src/Controls/samples/Controls.Sample/Pages/PlatformSpecifics/iOS/iOSSafeAreaPage.xaml @@ -2,10 +2,9 @@ + SafeAreaEdges="None">