-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[.NET10] Add An API to SearchHandler so users can hide or show the softkeyboard #29600
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
base: net10.0
Are you sure you want to change the base?
Conversation
…softkeyboard Added a UI Test
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.
Pull Request Overview
This PR introduces public methods to show and hide the soft keyboard via SearchHandler
, wires those requests through platform handlers, and adds a UI scenario plus automated tests to verify the behavior.
- Exposed
ShowKeyboard()
/HideKeyboard()
onSearchHandler
with corresponding internal events. - Updated iOS and Android appearance trackers to respond to new keyboard events.
- Added a sample Shell page and UI tests to validate keyboard visibility toggling.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/Controls/src/Core/Shell/SearchHandler.cs | Added ShowKeyboard() /HideKeyboard() methods and events. |
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/SearchHandlerAppearanceTracker.cs | Subscribed/unsubscribed to new keyboard events. |
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/SearchHandlerAppearanceTracker.cs | Subscribed/unsubscribed to new keyboard events. |
src/Controls/tests/TestCases.HostApp/Issues/Issue29559.xaml | Added buttons wired to the new keyboard API. |
src/Controls/tests/TestCases.HostApp/Issues/Issue29559.xaml.cs | Hooked up show/hide click handlers. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29559.cs | Added UI test for keyboard show/hide. |
src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt | Published the new API surface. |
(and other PublicAPI.Unshipped.txt updates for each target) |
Comments suppressed due to low confidence (1)
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29559.cs:20
- [nitpick] The variable
IskeyboardVisible
does not follow camelCase conventions; consider renaming toisKeyboardVisible
or similar.
bool IskeyboardVisible = App.IsKeyboardShown();
@@ -0,0 +1,30 @@ | |||
#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST //In windows and mac catalyst, keyboard won't visible on focus and unfocus |
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.
The preprocessor condition uses &&
but should use ||
so the test is excluded on either Windows or Catalyst, not only when both are defined.
#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST //In windows and mac catalyst, keyboard won't visible on focus and unfocus | |
#if TEST_FAILS_ON_WINDOWS || TEST_FAILS_ON_CATALYST //In windows and mac catalyst, keyboard won't visible on focus and unfocus |
Copilot uses AI. Check for mistakes.
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issues Fixed
Fixes #29559