Skip to content

Preserve custom layout and options in emoji picker search - #518

Merged
LeanBitLab merged 1 commit into
LeanBitLab:mainfrom
AsafMah:pr/upstream-emoji-search
Sep 17, 2026
Merged

LeanBitLab merged 1 commit into
LeanBitLab:mainfrom
AsafMah:pr/upstream-emoji-search

Conversation

@AsafMah

@AsafMah AsafMah commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Problem

With CUSTOM1CUSTOM5 active, opening the emoji picker and its magnifier rebuilds the query keyboard from MAIN instead 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 through KeyboardState.

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

  • Reuse the remembered custom slot and the normal shared keyboard-builder options for emoji search.
  • Restore the keyboard through KeyboardState on explicit cancellation.
  • Keep hide, detach, and panel-transition cleanup non-navigating, without taking PointerTracker drawing/timer ownership from the next panel.
  • Preserve ignored keys and the existing behavior that selecting an emoji keeps search open.

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 :query behavior, or GIF/media UX changes are included.

Repro

  1. Configure a distinctive custom layout and enable options such as the number row.
  2. Activate that custom layout, open the emoji picker, then tap the magnifier.
  3. Observe that the query keyboard falls back to MAIN and omits normal options.
  4. Cancel search and observe that the custom slot is reset.

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:

  • 13 Robolectric regressions using the actual inflated palette, magnifier, and close controls, plus 3 focused controls, passed. Coverage includes actual z/x/v key 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.
  • Negative control: restoring all four production files to byte-equivalent upstream caused 12 of the 13 regressions to fail; the remaining control passed.
  • Four broader ParserTest Windows asset failures reproduced unchanged on the baseline; 38 tests passed on both. This is not a full-suite pass.
  • JVM verification used a test-only Windows asset-path slash wrapper and JNI shadow, plus external native-disabled Build Tools 36 configuration. It is not evidence of a native build of the isolated upstream patch.

Separately, the same patch integrated on the downstream v2 fork 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.

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>
@LeanBitLab
LeanBitLab merged commit c5529c1 into LeanBitLab:main Sep 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants