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

Arrange content based on arrangement bounds rather than viewport bounds #18586

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Nov 7, 2023

Description of Change

The final content arrangement was being done using the viewport bounds, which are offset by the scroll distance. The arrangement should be done by the ScrollView's arrangement bounds, as passed into the CrossPlatformArrange() method.

Issues Fixed

Fixes #18513

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

Tested against our template and it looks like the scroll bars return

https://github.com/dotnet/maui/tree/fix-18513-repro

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Nov 8, 2023
@hartez hartez marked this pull request as ready for review November 8, 2023 07:01
@hartez hartez requested a review from a team as a code owner November 8, 2023 07:01
@hartez hartez requested review from rmarinho and PureWeen and removed request for a team November 8, 2023 07:01
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

D:\a_work\1\s\src\Core\src\Handlers\ScrollView\ScrollViewHandler.iOS.cs(350,8): error CS0128: A local variable or function named 'contentSize' is already defined in this scope [D:\a_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-maccatalyst]
D:\a_work\1\s\src\Core\src\Handlers\ScrollView\ScrollViewHandler.iOS.cs(348,32): error CS0104: 'Point' is an ambiguous reference between 'System.Drawing.Point' and 'Microsoft.Maui.Graphics.Point' [D:\a_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-ios]
D:\a_work\1\s\src\Core\src\Handlers\ScrollView\ScrollViewHandler.iOS.cs(350,8): error CS0128: A local variable or function named 'contentSize' is already defined in this scope [D:\a_work\1\s\src\Core\src\Core.csproj::TargetFramework=net8.0-ios]
36 Warning(s)
4 Error(s)

@PureWeen PureWeen changed the base branch from release/8.0.1xx to main November 8, 2023 18:57
@PureWeen PureWeen requested a review from a team as a code owner November 8, 2023 18:57
@PureWeen PureWeen changed the base branch from main to release/8.0.1xx November 8, 2023 18:58
@PureWeen PureWeen changed the base branch from release/8.0.1xx to main November 8, 2023 19:40
@PureWeen
Copy link
Member

PureWeen commented Nov 9, 2023

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Nov 9, 2023

/rebase

tj-devel709
tj-devel709 previously approved these changes Nov 9, 2023
Copy link
Contributor

@tj-devel709 tj-devel709 left a comment

Choose a reason for hiding this comment

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

I applied this PR and was able to see that my scrollviews that used to come too far down on the screen are respecting the bottom safe areas as I would expect!

@PureWeen PureWeen enabled auto-merge (squash) November 10, 2023 13:13
@PureWeen PureWeen merged commit 275dd6d into main Nov 13, 2023
47 checks passed
@PureWeen PureWeen deleted the fix-18513 branch November 13, 2023 00:52
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2023
@samhouts samhouts added the fixed-in-8.0.6 Look for this fix in 8.0.6 SR1! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-8.0.6 Look for this fix in 8.0.6 SR1!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrollview shifts content down when a subview element visibility changes (after scrolling).
6 participants