Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jan 12, 2025

Description of Change

Refactored the CrossPlatformMeasure method for ScrollViewHandler on Android and Windows, so that it is similar to the iOS one introduced by this PR #26763

@PureWeen

@kubaflo kubaflo requested a review from a team as a code owner January 12, 2025 17:58
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 12, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

if (double.IsInfinity(widthConstraint))
{
widthConstraint = result.Width;
widthConstraint = contentSize.Width;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to delete both of these if checks on Android and Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without them AdjustForFill doesn't work correctly

@MartyIX
Copy link
Contributor

MartyIX commented Jan 16, 2025

@kubaflo Does this PR potentially improve performance please?

@PureWeen PureWeen self-assigned this Jan 16, 2025
@PureWeen PureWeen added this to the .NET 9 SR5 milestone Jan 16, 2025
@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 17, 2025

@kubaflo Does this PR potentially improve performance please?

I hope so, but I didn't measure anything. The main idea was to uniform the code across the platforms

@PureWeen PureWeen modified the milestones: .NET 9 SR5, .NET 9 Servicing Mar 2, 2025
@kubaflo kubaflo self-assigned this Apr 28, 2025
@kubaflo kubaflo force-pushed the scroll-view-refactor branch from e44c057 to 74be47b Compare April 28, 2025 22:25
@kubaflo kubaflo force-pushed the scroll-view-refactor branch from 74be47b to 383e3d4 Compare August 3, 2025 20:37
Copilot AI review requested due to automatic review settings August 3, 2025 20:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the CrossPlatformMeasure method for ScrollViewHandler on Android and Windows to align with the iOS implementation introduced in a previous PR. The changes include code improvements, spelling corrections, bug fixes, and extensive localization updates.

Key changes include:

  • Refactoring of BlazorWebView components with improved request handling and platform-specific optimizations
  • Correction of spelling errors in logging methods (ReponseContentNotFoundResponseContentNotFound)
  • Addition of new test files for BlazorWebView functionality across different scenarios
  • Extensive localization updates across multiple languages and template files

Reviewed Changes

Copilot reviewed 289 out of 2334 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/BlazorWebView/tests/MauiDeviceTests/Elements/BlazorWebViewTests.*.cs New test files for BlazorWebView covering navigation, logging, components, and behaviors
src/BlazorWebView/src/SharedSource/WebView2WebViewManager.cs Updated request filtering and fixed logging method name
src/BlazorWebView/src/SharedSource/Log.cs Corrected method name spelling
src/BlazorWebView/src/Maui/iOS/IOSWebViewManager.cs Platform-specific improvements and bounce scrolling disabled by default
src/BlazorWebView/src/Maui/Windows/WinUIWebViewManager.cs Enhanced request handling with logging improvements
src/BlazorWebView/src/Maui/Android/WebKitWebViewClient.cs Refactored request interception logic
loc/**/*.lcl Extensive localization updates across multiple languages

@@ -1 +1,2 @@
#nullable enable
Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebView.WebResourceRequested -> System.EventHandler<Microsoft.Maui.Controls.WebViewWebResourceRequestedEventArgs!>?
Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a new public API member being added. Please verify this is not a breaking change, as breaking changes should not be made in minor versions or service releases.

Copilot uses AI. Check for mistakes.
/// Defines a contract for a view that renders Blazor content.
/// </summary>
public interface IBlazorWebView : IView
public interface IBlazorWebView : IView, IWebRequestInterceptingWebView
Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change to the public interface signature. Adding a new base interface to an existing public interface is a breaking change that should not be made in minor versions or service releases.

Copilot uses AI. Check for mistakes.
@kubaflo kubaflo changed the base branch from main to net10.0 August 3, 2025 20:38
@PureWeen
Copy link
Member

/rebase

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready To Review

Development

Successfully merging this pull request may close these issues.

4 participants