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

iOS Keyboard Scrolling Improvements and UITests (not from fork) #17670

Merged
merged 21 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
930833e
Squash all the iOS Keyboard Improvements
tj-devel709 Jul 17, 2023
ba192a1
delay was enough manually, but not for tests
tj-devel709 Sep 27, 2023
71af5e3
remove debugging
tj-devel709 Sep 27, 2023
163bf20
Add logic for Disconnect to be more useful
tj-devel709 Sep 28, 2023
5dfbf81
Merge branch 'main' into dev/TJ/KeyboardScrolling-Improvements1
tj-devel709 Sep 29, 2023
37398d5
fix spacing from github merge conflict commit
tj-devel709 Sep 29, 2023
c67f32d
Merge branch 'main' into dev/TJ/KeyboardScrolling-Improvements1
tj-devel709 Oct 23, 2023
0071fa9
accidently removed a var declaration
tj-devel709 Oct 24, 2023
d66e15d
Merge remote-tracking branch 'origin/main' into dev/TJ/KeyboardScroll…
tj-devel709 Nov 16, 2023
47ae351
Merge remote-tracking branch 'origin/main' into dev/TJ/KeyboardScroll…
tj-devel709 Nov 18, 2023
2954d77
Improve UITests and add double scroll for LargeTitles
tj-devel709 Nov 20, 2023
6f445b8
Add UITest for the grid star
tj-devel709 Nov 21, 2023
9041f34
Style changes
tj-devel709 Nov 21, 2023
7df1c34
Merge remote-tracking branch 'origin/main' into dev/TJ/KeyboardScroll…
tj-devel709 Nov 21, 2023
09c7ce0
more style
tj-devel709 Nov 21, 2023
f568a8d
add fixtureTeardown
tj-devel709 Nov 28, 2023
951a8c5
Merge remote-tracking branch 'origin/main' into dev/TJ/KeyboardScroll…
tj-devel709 Nov 28, 2023
f0f0701
only check for LargeTitles in portrait mode
tj-devel709 Dec 8, 2023
2feb67e
Add changes for LargeTitles on iPad
tj-devel709 Dec 8, 2023
cf9695f
remove the popover code until we get tests
tj-devel709 Dec 19, 2023
45cd439
Merge remote-tracking branch 'origin' into dev/TJ/KeyboardScrolling-I…
tj-devel709 Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ public override string ToString()
new GalleryPageFactory(() => new FrameCoreGalleryPage(), "Frame Gallery"),
new GalleryPageFactory(() => new ImageButtonCoreGalleryPage(), "Image Button Gallery"),
new GalleryPageFactory(() => new ImageCoreGalleryPage(), "Image Gallery"),
new GalleryPageFactory(() => new LabelCoreGalleryPage(), "Label Gallery"),
new GalleryPageFactory(() => new KeyboardScrollingGridGallery(), "Keyboard Scrolling Gallery - Grid with Star Row"),
new GalleryPageFactory(() => new KeyboardScrollingNonScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - NonScrolling Page / Large Titles"),
new GalleryPageFactory(() => new KeyboardScrollingNonScrollingPageSmallTitlesGallery(), "Keyboard Scrolling Gallery - NonScrolling Page / Small Titles"),
new GalleryPageFactory(() => new KeyboardScrollingScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Large Titles"),
new GalleryPageFactory(() => new KeyboardScrollingScrollingPageSmallTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Small Titles"),
new GalleryPageFactory(() => new LabelCoreGalleryPage(), "Label Gallery"),
new GalleryPageFactory(() => new ListViewCoreGalleryPage(), "ListView Gallery"),
new GalleryPageFactory(() => new PickerCoreGalleryPage(), "Picker Gallery"),
new GalleryPageFactory(() => new ProgressBarCoreGalleryPage(), "Progress Bar Gallery"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingEditorsPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingEditorsPage">
<Grid RowDefinitions="*,*">
<Grid Grid.Row="0">
<VerticalStackLayout>
<Editor Placeholder="Editor1" AutomationId="Editor1" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor2" AutomationId="Editor2" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor3" AutomationId="Editor3" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor4" AutomationId="Editor4" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor5" AutomationId="Editor5" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor6" AutomationId="Editor6" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor7" AutomationId="Editor7" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor8" AutomationId="Editor8" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor9" AutomationId="Editor9" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor10" AutomationId="Editor10" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor11" AutomationId="Editor11" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor12" AutomationId="Editor12" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor13" AutomationId="Editor13" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor14" AutomationId="Editor14" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor15" AutomationId="Editor15" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor16" AutomationId="Editor16" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor17" AutomationId="Editor17" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor18" AutomationId="Editor17" Background="lightgray" HeightRequest="65"/>
</VerticalStackLayout>
</Grid>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingEditorsPage : ContentView
{
public KeyboardScrollingEditorsPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingEntriesPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingEntriesPage"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls">
<Grid RowDefinitions="*,*">
<Grid Grid.Row="0">
<VerticalStackLayout>
<Entry Placeholder="Entry1" AutomationId="Entry1" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry2" AutomationId="Entry2" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry3" AutomationId="Entry3" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry4" AutomationId="Entry4" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry5" AutomationId="Entry5" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry6" AutomationId="Entry6" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry7" AutomationId="Entry7" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry8" AutomationId="Entry8" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry9" AutomationId="Entry9" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry10" AutomationId="Entry10" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry11" AutomationId="Entry11" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry12" AutomationId="Entry12" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry13" AutomationId="Entry13" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry14" AutomationId="Entry14" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry15" AutomationId="Entry15" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry16" AutomationId="Entry16" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry17" AutomationId="Entry17" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry18" AutomationId="Entry18" Background="lightgray" HeightRequest="50"/>
</VerticalStackLayout>
</Grid>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingEntriesPage : ContentView
{
public KeyboardScrollingEntriesPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingEntryNextEditorPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingEntryNextEditorPage">
<Grid RowDefinitions="100,100,100,100" RowSpacing="25">
<Entry Placeholder="First Entry" AutomationId="Entry1" Background="lightgray" ReturnType="Next" Grid.Row="0"/>
<Entry Placeholder="Second Entry" AutomationId="Entry2" Background="lightgray" ReturnType="Next" Grid.Row="1"/>
<Entry Placeholder="Third Entry" AutomationId="Entry3" Background="lightgray" ReturnType="Next" Grid.Row="2"/>
<Editor Placeholder="Editor" AutomationId="Editor" Background="lightgray" Grid.Row="3"/>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingEntryNextEditorPage : ContentView
{
public KeyboardScrollingEntryNextEditorPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample;

[Preserve(AllMembers = true)]
public class KeyboardScrollingGridGallery : ContentViewGalleryPage
{
public KeyboardScrollingGridGallery()
{
Content = new KeyboardScrollingGridPage();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingGridPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingGridPage">
<Grid RowDefinitions="*, Auto">
<VerticalStackLayout Grid.Row="1">
<Entry Placeholder="Entry 1" AutomationId="Entry1"/>
<Entry Placeholder="Entry 2" AutomationId="Entry2"/>
<Entry Placeholder="Entry 3" AutomationId="Entry3"/>
<Entry Placeholder="Entry 4" AutomationId="Entry4"/>
<Entry Placeholder="Entry 5" AutomationId="Entry5"/>
<Entry Placeholder="Entry 6" AutomationId="Entry6"/>
<Entry Placeholder="Entry 7" AutomationId="Entry7"/>
</VerticalStackLayout>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingGridPage : ContentView
{
public KeyboardScrollingGridPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingNonScrollingPageLargeTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingNonScrollingPageLargeTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Always);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return false; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingNonScrollingPageSmallTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingNonScrollingPageSmallTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Never);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return false; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingScrollingPageLargeTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingScrollingPageLargeTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Always);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return true; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingScrollingPageSmallTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingScrollingPageSmallTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Never);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return true; }
}
}
}
Loading
Loading