Preserve custom layout and options in emoji picker search - #518
Merged
Merged
Conversation
Keep the remembered custom slot and normal layout options while searching. Return through KeyboardState on explicit search exit without navigating or reclaiming pointer drawing during panel teardown. Add Robolectric coverage for the magnifier and close controls, all five custom slots, options, local query input, RTL, selection, and panel transitions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
With
CUSTOM1–CUSTOM5active, opening the emoji picker and its magnifier rebuilds the query keyboard fromMAINinstead of the active custom layout. It also omits normal keyboard options such as the number row and one-handed mode. Explicitly closing search renders the alphabet keyboard directly instead of restoring the custom slot throughKeyboardState.Related to the layout/number-row portion of #330, specifically the report that the number row/layout remained missing after other cursor fixes. That issue also bundles cursor editing, language switching, and swipe behavior and was closed as not planned; swipe support in emoji search was declined on July 26, 2026. This PR addresses only layout/options/restoration, does not enable glide typing or language switching inside search, and does not attempt to resolve or reopen the whole issue.
Fix
KeyboardStateon explicit cancellation.PointerTrackerdrawing/timer ownership from the next panel.The change touches four production files; most of the diff is the 458-line regression test file. No dependencies, branding, release behavior, swipe/glide support, inline
:querybehavior, or GIF/media UX changes are included.Repro
MAINand omits normal options.Expected: the query keyboard uses the active custom layout and normal options, and explicit cancellation restores the correct keyboard state.
Verification
Prior verification of this patch:
z/x/vkey arrangements for all five custom slots (not a fallback), subtype/options/RTL, query input remaining local rather than reaching the host, shift/symbol behavior, cancel state/listener restoration, hide/detach/selection, and clipboard/numpad real-touch ownership.ParserTestWindows asset failures reproduced unchanged on the baseline; 38 tests passed on both. This is not a full-suite pass.Separately, the same patch integrated on the downstream
v2fork passed 89 combined tests and a normal native APK build; the user tried that debug build and reported it works. Downstream integration build — this is integration evidence, not an isolated upstream build.