-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Fix UI loop when setting ContentInset #21140
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
Merged
PureWeen
merged 5 commits into
release/8.0.1xx-sr3
from
20294-ios-collectionview-containing-a-footer-and-a-border-with-strokethickness-set-to-decimal-value-crashes-on-scroll
Mar 15, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4a622fd
[controls] Add repo for issue #20294
rmarinho 392d2b2
[iOS] Fix ShouldInvalidateLayoutForBoundsChange
rmarinho 2165041
[controls] Add uitest for issue #20294
rmarinho 7516780
[testing] Fix UITest by actually scrolling the colelctionview
rmarinho fe24a31
[tests] Just run test on iOS
rmarinho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
src/Controls/samples/Controls.Sample.UITests/Issues/Issue20294.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
| Title="Issue 20294" | ||
| x:Class="Maui.Controls.Sample.Issues.Issue20294"> | ||
| <CollectionView SelectionMode="Single" Margin="10.0" AutomationId="theCollectionView"> | ||
| <CollectionView.ItemsSource> | ||
| <x:Array Type="{x:Type x:String}"> | ||
| <x:String>ONE</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>asdf</x:String> | ||
| <x:String>LAST</x:String> | ||
| </x:Array> | ||
| </CollectionView.ItemsSource> | ||
| <CollectionView.ItemsLayout> | ||
| <LinearItemsLayout | ||
| Orientation="Vertical" | ||
| ItemSpacing="15"/> | ||
| </CollectionView.ItemsLayout> | ||
| <CollectionView.Footer> | ||
| <Label HeightRequest="45" Text="FOOTER" AutomationId="FOOTER"/> | ||
| </CollectionView.Footer> | ||
| <CollectionView.ItemTemplate> | ||
| <DataTemplate x:DataType="x:String"> | ||
| <Border AutomationId="{Binding}" StrokeThickness="0.2"> | ||
| <Label Text="{Binding}" FontSize="20"/> | ||
| </Border> | ||
| </DataTemplate> | ||
| </CollectionView.ItemTemplate> | ||
| </CollectionView> | ||
| </ContentPage> |
15 changes: 15 additions & 0 deletions
15
src/Controls/samples/Controls.Sample.UITests/Issues/Issue20294.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using Microsoft.Maui.Controls; | ||
| using Microsoft.Maui.Controls.Xaml; | ||
|
|
||
| namespace Maui.Controls.Sample.Issues | ||
| { | ||
| [XamlCompilation(XamlCompilationOptions.Compile)] | ||
| [Issue(IssueTracker.Github, 20294, "CollectionView containing a Footer and a Border with StrokeThickness set to decimal value crashes on scroll", PlatformAffected.iOS)] | ||
| public partial class Issue20294 : ContentPage | ||
| { | ||
| public Issue20294() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| using System.Drawing; | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.AppiumTests.Issues; | ||
|
|
||
| public class Issue20294 : _IssuesUITest | ||
| { | ||
| public Issue20294(TestDevice device) : base(device) { } | ||
|
|
||
| public override string Issue => "CollectionView containing a Footer and a Border with StrokeThickness set to decimal value crashes on scroll"; | ||
|
|
||
| [Test] | ||
| public void ScrollToEndDoesntCrash() | ||
| { | ||
| this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Mac, TestDevice.Windows }); | ||
|
|
||
| App.ScrollTo("FOOTER"); | ||
| App.ScrollUp("theCollectionView", ScrollStrategy.Gesture, 0.5); | ||
| App.ScrollDown("theCollectionView", ScrollStrategy.Gesture, 0.5); | ||
| App.ScrollDown("theCollectionView", ScrollStrategy.Gesture, 0.5); | ||
| App.ScrollUp("theCollectionView", ScrollStrategy.Gesture, 0.5); | ||
| App.ScrollDown("theCollectionView", ScrollStrategy.Gesture, 0.5); | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These changes on this file is just small cleanup and seems we need braces now :)