Skip to content

Comments

Simplify iOS ScrollView#26763

Merged
PureWeen merged 14 commits intodotnet:mainfrom
albyrock87:ios-scrollview-refactor
Dec 27, 2024
Merged

Simplify iOS ScrollView#26763
PureWeen merged 14 commits intodotnet:mainfrom
albyrock87:ios-scrollview-refactor

Conversation

@albyrock87
Copy link
Contributor

@albyrock87 albyrock87 commented Dec 20, 2024

Description of Change

The current ScrollView implementation on iOS contains a middle layer between the ScrollView and the actual content.
The reason hides behind device tests, where the ScrollView is being hosted by a standard UIView which knows nothing about MAUI.
So it won't invoke the handler's GetDesiredSize and PlatformArrange.
So they've crated this hack, where the container view has its parent's Handler (ScrollViewHandler) as ICrossPlatformLayout.
This way, if you invalidate the container view it triggers a forced layout on its parent: the ScrollView.
This is an absolute hack and creates an useless resize loop.

In addition to that, CV2 is not properly reporting the desired size when unbounded, so this PR brings back and improves some code we had in CV1 to measure the content size when the CV is smaller than the constraints.

Issues Fixed

@albyrock87 albyrock87 requested a review from a team as a code owner December 20, 2024 16:58
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 20, 2024
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 SR3 milestone Dec 22, 2024
@PureWeen PureWeen added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Dec 22, 2024
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@albyrock87 albyrock87 force-pushed the ios-scrollview-refactor branch from c953cb3 to 5648b49 Compare December 23, 2024 17:46
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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

Labels

area-controls-scrollview ScrollView community ✨ Community Contribution p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants