-
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
Implement Keyboard on SearchBarHandler #9851
Conversation
Changed target from net6.0 to main. |
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.
I just tested and unfortunately, this doesn't fix the issue referenced :/ The keyboard continues to switch immediately back from numeric to alphabetic
I am curious about your approach here, though, as the issue you're working on here is related to the issue I'm working on in #11981
On Android?. Let me review it and take a quick look to the Japanese issue. This one was target to net6.0 and retarget to main now. Maybe something has changed in between. |
var queryTextBox = platformControl.GetFirstDescendant<TextBox>(); | ||
|
||
if (queryTextBox == null) | ||
return; | ||
|
||
queryTextBox.UpdateInputScope(searchBar); |
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.
I have added #13421 to make it cleaner.
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.Android.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.Android.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.Android.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Outdated
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Outdated
Show resolved
Hide resolved
Was this already resolved by #11981? |
@jsuarezruiz lets close it or land it. We have too many PRs. |
This PR maps the |
I agree, let me add more reviewers and push forward. |
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
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 awesome! Left a few comments. I haven't been able to test on mac/ios yet, as my setup is currently in flux. I'll test on those platforms ASAP unless someone else is able to get to it first. Looking forward to seeing this through!
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Show resolved
Hide resolved
src/Core/tests/DeviceTests/Handlers/SearchBar/SearchBarHandlerTests.iOS.cs
Show resolved
Hide resolved
#if WINDOWS | ||
// The Text keyboard is the default one on Windows | ||
[InlineData(nameof(Keyboard.Default), true)] | ||
// Plain is the same as the Default keyboard on Windows | ||
[InlineData(nameof(Keyboard.Plain), true)] | ||
#else | ||
[InlineData(nameof(Keyboard.Default), false)] | ||
[InlineData(nameof(Keyboard.Plain), false)] |
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.
What are "Default" and "Plain" on the other platforms?
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.
on iOS, Default and Text appear the same, and Plain appears differently - maybe we can capture that somewhere?
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.
On Android:
Default = InputTypes.ClassText | InputTypes.TextVariationNormal
Text = InputTypes.ClassText | InputTypes.TextFlagCapSentences
On iOS:
Default
textInput.SetAutocapitalizationType(UITextAutocapitalizationType.Sentences);
textInput.SetAutocorrectionType(UITextAutocorrectionType.Default);
textInput.SetSpellCheckingType(UITextSpellCheckingType.Default);
Text
textInput.SetAutocapitalizationType(UITextAutocapitalizationType.Sentences);
textInput.SetAutocorrectionType(UITextAutocorrectionType.Yes);
textInput.SetSpellCheckingType(UITextSpellCheckingType.Yes);
We have this in the docs https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/entry?view=net-maui-7.0#customize-the-keyboard
We could extend more details by platform. cc @davidbritch
src/Controls/samples/Controls.Sample/Pages/Controls/BoxViewPage.xaml
Outdated
Show resolved
Hide resolved
looks great on iOS and iPadOS too |
Description of Change
Implement Keyboard on SearchBarHandler.
Issues Fixed
Fixes #9594