Skip to content

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

Merged
PureWeen merged 4 commits into
mainfrom
fix-18513
Nov 13, 2023
Merged

PureWeen merged 4 commits into
mainfrom
fix-18513

Conversation

@hartez

@hartez hartez commented Nov 7, 2023

Copy link
Copy Markdown
Contributor

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

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

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 PureWeen and rmarinho and removed request for a team November 8, 2023 07:01

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

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

PureWeen commented Nov 9, 2023

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen

PureWeen commented Nov 9, 2023

Copy link
Copy Markdown
Member

/rebase

tj-devel709
tj-devel709 previously approved these changes Nov 9, 2023

@tj-devel709 tj-devel709 left a comment

Copy link
Copy Markdown
Member

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 disabled auto-merge November 10, 2023 16:55
@PureWeen
PureWeen merged commit 275dd6d into main Nov 13, 2023
@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