From 4a9b908be5c4f749578d99ef7536d1f114eccd6c Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 15 Jun 2023 13:08:54 +1000 Subject: [PATCH 001/105] [essentials] ensure WebUtils.ParseQueryString captures fragment parameters --- .../src/Types/Shared/WebUtils.shared.cs | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Essentials/src/Types/Shared/WebUtils.shared.cs b/src/Essentials/src/Types/Shared/WebUtils.shared.cs index c72ec2894ac6..2654b0b63e50 100644 --- a/src/Essentials/src/Types/Shared/WebUtils.shared.cs +++ b/src/Essentials/src/Types/Shared/WebUtils.shared.cs @@ -6,21 +6,31 @@ namespace Microsoft.Maui.ApplicationModel { static class WebUtils { - // The following method is a port of the logic found in https://source.dot.net/#Microsoft.AspNetCore.WebUtilities/src/Shared/QueryStringEnumerable.cs - // but refactored such that it: - // - // 1. avoids the IEnumerable overhead that isn't needed (the ASP.NET logic was clearly designed that way to offer a public API whereas we don't need that) - // 2. avoids the use of unsafe code internal static IDictionary ParseQueryString(Uri uri) { var parameters = new Dictionary(StringComparer.Ordinal); - if (uri == null || string.IsNullOrEmpty(uri.Query)) + if (uri == null) return parameters; // Note: Uri.Query starts with a '?' - var query = uri.Query.AsSpan(1); + if (!string.IsNullOrEmpty(uri.Query)) + UnpackParameters(uri.Query.AsSpan(1), parameters); + + // Note: Uri.Fragment starts with a '#' + if (!string.IsNullOrEmpty(uri.Fragment)) + UnpackParameters(uri.Fragment.AsSpan(1), parameters); + + return parameters; + } + // The following method is a port of the logic found in https://source.dot.net/#Microsoft.AspNetCore.WebUtilities/src/Shared/QueryStringEnumerable.cs + // but refactored such that it: + // + // 1. avoids the IEnumerable overhead that isn't needed (the ASP.NET logic was clearly designed that way to offer a public API whereas we don't need that) + // 2. avoids the use of unsafe code + static void UnpackParameters(ReadOnlySpan query, Dictionary parameters) + { while (!query.IsEmpty) { int delimeterIndex = query.IndexOf('&'); @@ -66,8 +76,6 @@ internal static IDictionary ParseQueryString(Uri uri) parameters[name] = Uri.UnescapeDataString(value); } } - - return parameters; } internal static Uri EscapeUri(Uri uri) From 1ee73e85a398eb6f6d8ea4a7fc24a65f5cfd2a97 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Thu, 15 Jun 2023 11:27:49 +0100 Subject: [PATCH 002/105] [main] Updates to new released packages (#15648) * Bump Microsoft.AspNetCore.Components.WebView from 7.0.5 to 7.0.7 Bumps [Microsoft.AspNetCore.Components.WebView](https://github.com/dotnet/aspnetcore) from 7.0.5 to 7.0.7. - [Release notes](https://github.com/dotnet/aspnetcore/releases) - [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md) - [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.5...v7.0.7) --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.Components.WebView dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bumps to 7.0.7 * Update Versions.props * Revert sdk bump --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eng/Versions.props | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 955f0a4456ef..3e6b2282427b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -5,7 +5,7 @@ 7.0.203 - 7.0.5 + 7.0.7 7.0.0 7.0.0 @@ -20,24 +20,24 @@ 7.0.105 - 7.0.5 + 7.0.7 1.3.230502000 10.0.22621.756 1.0.5.1 - 7.0.5 - 7.0.5 - 7.0.5 - 7.0.5 - 7.0.5 + 7.0.7 + 7.0.7 + 7.0.7 + 7.0.7 + 7.0.7 7.0.1 7.0.1 7.0.1 - 7.0.5 - 7.0.5 + 7.0.7 + 7.0.7 7.0.1 - 7.0.5 + 7.0.7 7.0.1 3.3.4 From 6dde0556a561f0564c709869114390bc92b25e8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 11:36:56 +0100 Subject: [PATCH 003/105] Bump Microsoft.WindowsAppSDK from 1.3.230502000 to 1.3.230602002 (#15639) Bumps [Microsoft.WindowsAppSDK](https://github.com/microsoft/windowsappsdk) from 1.3.230502000 to 1.3.230602002. - [Release notes](https://github.com/microsoft/windowsappsdk/releases) - [Commits](https://github.com/microsoft/windowsappsdk/commits) --- updated-dependencies: - dependency-name: Microsoft.WindowsAppSDK dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 3e6b2282427b..c072d58788fc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -22,7 +22,7 @@ 7.0.7 - 1.3.230502000 + 1.3.230602002 10.0.22621.756 1.0.5.1 From 2d50fc8873627caced4ade0a5939a90fc21331a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 11:37:44 +0100 Subject: [PATCH 004/105] Bump System.Text.Json from 7.0.2 to 7.0.3 (#15641) Bumps [System.Text.Json](https://github.com/dotnet/runtime) from 7.0.2 to 7.0.3. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v7.0.2...v7.0.3) --- updated-dependencies: - dependency-name: System.Text.Json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index c072d58788fc..ddefcbc5c010 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -45,7 +45,7 @@ 4.5.0 4.5.5 4.5.1 - 7.0.2 + 7.0.3 7.0.0 7.0.0 4.3.0 From 601fa4496375ba1e4385f95681d1c6f83c919222 Mon Sep 17 00:00:00 2001 From: "E.Z. Hart" Date: Thu, 15 Jun 2023 05:42:46 -0500 Subject: [PATCH 005/105] Fix sizing issues with CollectionView on Windows (#15587) --- .../Handlers/Items/ItemsViewHandler.Windows.cs | 13 ++++++++++++- .../Windows/CollectionView/ItemsViewStyles.xaml | 2 +- .../CollectionView/CollectionViewTests.cs | 16 +++++++++------- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs b/src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs index f6f742941c6a..70b906abc9bc 100644 --- a/src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs +++ b/src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs @@ -337,8 +337,19 @@ void ListViewLoaded(object sender, RoutedEventArgs e) void UpdateVerticalScrollBarVisibility() { + if (Element.VerticalScrollBarVisibility != ScrollBarVisibility.Default) + { + // If the value is changing to anything other than the default, record the default + if (_defaultVerticalScrollVisibility == null) + _defaultVerticalScrollVisibility = ScrollViewer.GetVerticalScrollBarVisibility(Control); + } + if (_defaultVerticalScrollVisibility == null) - _defaultVerticalScrollVisibility = ScrollViewer.GetVerticalScrollBarVisibility(Control); + { + // If the default has never been recorded, then this has never been set to anything but the + // default value; there's nothing to do. + return; + } switch (Element.VerticalScrollBarVisibility) { diff --git a/src/Controls/src/Core/Platform/Windows/CollectionView/ItemsViewStyles.xaml b/src/Controls/src/Core/Platform/Windows/CollectionView/ItemsViewStyles.xaml index e0b416e109c0..edc6f6fbed7e 100644 --- a/src/Controls/src/Core/Platform/Windows/CollectionView/ItemsViewStyles.xaml +++ b/src/Controls/src/Core/Platform/Windows/CollectionView/ItemsViewStyles.xaml @@ -99,7 +99,7 @@ get to a point where we don't have to support these earlier versions, we can replace this style with just the template. (See also FormsGridView.cs) --> - - - - - - -