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

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

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).

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
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
None yet
Development

Successfully merging this pull request may close these issues.

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