Skip to content

Resize internal content container when ScrollView content is resized#16385

Merged
rmarinho merged 2 commits intomainfrom
fix-14257-part-2
Jul 27, 2023
Merged

Resize internal content container when ScrollView content is resized#16385
rmarinho merged 2 commits intomainfrom
fix-14257-part-2

Conversation

@hartez
Copy link
Copy Markdown
Contributor

@hartez hartez commented Jul 26, 2023

Description of Change

The iOS ScrollView's internal content container was correctly sized for off-screen content at first layout, but was failing to update correctly when the content was resized (possibly because of a data binding change).

These changes correct that problem, and add automated UI tests to verify this scenario.

Issues Fixed

Fixes #14257
Fixes #15762
Fixes #14624
Fixes #12727

@rmarinho rmarinho merged commit 0047ca2 into main Jul 27, 2023
@rmarinho rmarinho deleted the fix-14257-part-2 branch July 27, 2023 08:53
@gerhartz
Copy link
Copy Markdown

gerhartz commented Aug 2, 2023

@hartez will this be backported to .net7 like the first part was? #15424

@samhouts samhouts added the backport/suggested The PR author or issue review has suggested that the change should be backported. label Aug 3, 2023
@PureWeen PureWeen added the backport/approved After some discussion or review, this PR or change was approved to be backported. label Aug 9, 2023
@PureWeen
Copy link
Copy Markdown
Member

PureWeen commented Aug 9, 2023

/backport to net7.0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2023

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/5811129750

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2023

@PureWeen backporting to net7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Resize internal content container when ScrollView content is resized Fixes #14257
.git/rebase-apply/patch:44: trailing whitespace.
			resizeButton.Clicked += (sender, args) => { 
.git/rebase-apply/patch:47: trailing whitespace.
				layoutContent.HeightRequest = 1000; 
.git/rebase-apply/patch:130: trailing whitespace.
			
.git/rebase-apply/patch:372: trailing whitespace.
			// This method will keep scrolling in the specified direction until it finds an element 
.git/rebase-apply/patch:377: trailing whitespace.
			
warning: 5 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	src/Core/src/Handlers/ScrollView/ScrollViewHandler.iOS.cs
A	src/TestUtils/src/TestUtils.Appium.UITests/AppiumUITestApp.cs
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): src/TestUtils/src/TestUtils.Appium.UITests/AppiumUITestApp.cs deleted in HEAD and modified in Resize internal content container when ScrollView content is resized Fixes #14257. Version Resize internal content container when ScrollView content is resized Fixes #14257 of src/TestUtils/src/TestUtils.Appium.UITests/AppiumUITestApp.cs left in tree.
Auto-merging src/Core/src/Handlers/ScrollView/ScrollViewHandler.iOS.cs
CONFLICT (content): Merge conflict in src/Core/src/Handlers/ScrollView/ScrollViewHandler.iOS.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Resize internal content container when ScrollView content is resized Fixes #14257
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2023

@PureWeen an error occurred while backporting to net7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@Ghostbird
Copy link
Copy Markdown
Contributor

Ghostbird commented Nov 28, 2023

This claims to have fixed #15762, so we removed our workaround in our MAUI 8 app. Immediately all dynamically added controls in scrollviews on iOS did not react to taps. Do we need to do anything special to make this work?

@Ghostbird
Copy link
Copy Markdown
Contributor

Ah never mind, it's broken too when we keep our workaround. It seems the move to MAUI 8 works just fine on Android, but the iOS app is borked in many places. So it's probably not directly related to this issue.

@PureWeen
Copy link
Copy Markdown
Member

PureWeen commented Dec 1, 2023

@Ghostbird can you test out nightly https://github.com/dotnet/maui/wiki/Nightly-Builds ?

If you're still seeing an issue please log a new bug with a repro.

@Ghostbird
Copy link
Copy Markdown
Contributor

@PureWeen Sorry, I think this was mostly a mistake on my part. It turns out that TapGestureRecognizer is broken in MAUI 8 at least on Buttons. I've created #19099

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2023
@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/approved After some discussion or review, this PR or change was approved to be backported. backport/suggested The PR author or issue review has suggested that the change should be backported. fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171

Projects

None yet

6 participants