-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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] Fix ScrollTo method issues #15984
Conversation
{ | ||
// If the ContentSize of the UIScrollView has not yet been defined, | ||
// we create a pending scroll request that we will launch after performing the Layout and sizing process. | ||
scrollViewHandler.PendingScrollToRequest = request; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change. Do the scroll to request once we have values in the UIScrollView ContentSize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of exposing the event can we try the proxy approach also so we don't have new api added?
Also is it possible to add a UITest ?
Added UI Tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems good to merge. Doesn't leak. We just need to fix the UITests seems to be failing on Windows and Android.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just needs some cleanup.
/backport to net7.0 |
Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/6017947256 |
@hartez backporting to net7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix iOS ScrollTo issues
Using index info to reconstruct a base tree...
A src/Controls/src/Core/ScrollView/ScrollView.cs
M src/Core/src/Handlers/ScrollView/ScrollViewHandler.iOS.cs
A src/Core/src/Platform/iOS/MauiScrollView.cs
M src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
M src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
Falling back to patching base and 3-way merge...
Auto-merging src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
Auto-merging src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
CONFLICT (modify/delete): src/Core/src/Platform/iOS/MauiScrollView.cs deleted in HEAD and modified in Fix iOS ScrollTo issues. Version Fix iOS ScrollTo issues of src/Core/src/Platform/iOS/MauiScrollView.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
Auto-merging src/Controls/src/Core/ScrollView.cs
CONFLICT (content): Merge conflict in src/Controls/src/Core/ScrollView.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 Fix iOS ScrollTo issues
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! |
@hartez 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. |
* Fix iOS ScrollTo issues --------- Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
* Fix iOS ScrollTo issues --------- Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
* [iOS] Fix ScrollTo method issues (#15984) * Fix iOS ScrollTo issues --------- Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> * Fix build errors * More changes * - fix compile errors --------- Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com> Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com> Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Description of Change
Fix iOS ScrollTo method issues.
To validate the changes can use the added sample in the .NET MAUI Gallery in Control > ScrollView.
Issues Fixed
Fixes #7295