Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify iOS ScrollView #26763

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

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

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

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

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that we use Shell on 17801 a title appeared, so I had to update the screenshot.
The goal here was to NOT have the scrollbar, and in fact it's not there.

@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

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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: Todo
Development

Successfully merging this pull request may close these issues.

2 participants