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

[iOS] Simplify iOS ScrollView - improvement #26893

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jan 1, 2025

Description of Change

I think, I've identified a potential regression related to the simplified ScrollView on iOS (#26763). The issue occurs when an explicit HeightRequest is set on the ScrollView. In such cases, the content of the ScrollView is restricted to the specified height, which prevents scrolling as intended.

Issues Fixed

Fixes #26900

<ScrollView HeightRequest="200" BackgroundColor="Blue">
        <VerticalStackLayout BackgroundColor="Yellow">
                <Label Text="Hello, world!"
                        HeightRequest="250"
                        BackgroundColor="Red"/>
                <Label Text="Hello, world2!"
                        BackgroundColor="Green"
                        HeightRequest="200"/>
        </VerticalStackLayout>
</ScrollView>
Before After
Screen.Recording.2025-01-01.at.02.26.16.mov
Screen.Recording.2025-01-01.at.02.32.19.mov

@kubaflo kubaflo requested a review from a team as a code owner January 1, 2025 01:39
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 1, 2025
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.

@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 1, 2025

@albyrock87 could you please take a look :)

@albyrock87
Copy link
Contributor

albyrock87 commented Jan 1, 2025

@kubaflo good catch.. this use case was totally missing from UI tests.

If you could add a UI test which covers this it'd be great!

The fix itself looks good to me.

@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 1, 2025

@albyrock87 sure! I will add a UI test soon

@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 1, 2025

@albyrock87 I've just added a test :)

@jfversluis
Copy link
Member

jfversluis commented Jan 1, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis added the p/0 Work that we can't release without label Jan 2, 2025
@PureWeen PureWeen added this to the .NET 9 SR3 milestone Jan 4, 2025
@PureWeen
Copy link
Member

PureWeen commented Jan 5, 2025

/rebase

@github-actions github-actions bot force-pushed the iOS-scrollview-with-explicit-height branch from cbbadcc to daa4853 Compare January 5, 2025 17:07
@PureWeen
Copy link
Member

PureWeen commented Jan 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo kubaflo force-pushed the iOS-scrollview-with-explicit-height branch 2 times, most recently from 0095c7d to 680f489 Compare January 5, 2025 23:39
@PureWeen
Copy link
Member

PureWeen commented Jan 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo kubaflo force-pushed the iOS-scrollview-with-explicit-height branch from 680f489 to 421344b Compare January 5, 2025 23:41
@PureWeen
Copy link
Member

PureWeen commented Jan 5, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Jan 6, 2025

  • failing tests are unrelated

@PureWeen PureWeen merged commit 2f9a0f8 into dotnet:main Jan 6, 2025
101 of 104 checks passed
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/0 Work that we can't release without platform/iOS 🍎
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[iOS] Scroll view doesn't scroll when its height is explicitly set
4 participants