Skip to content

Fix: show all symbols in letter long-press popup (#113)#114

Merged
LeanBitLab merged 1 commit into
LeanBitLab:mainfrom
AsafMah:fix-symbols-popup
May 18, 2026
Merged

Fix: show all symbols in letter long-press popup (#113)#114
LeanBitLab merged 1 commit into
LeanBitLab:mainfrom
AsafMah:fix-symbols-popup

Conversation

@AsafMah
Copy link
Copy Markdown
Contributor

@AsafMah AsafMah commented May 18, 2026

Summary

When long-pressing a letter, the popup includes a symbol taken from the corresponding position of the symbols layout. Previously only the symbol key's primary label was propagated; the symbol key's own popups were silently dropped. So a symbols-layout entry like % ‰ (where % is the key and is its popup) would only contribute % to the letter's popup.

This PR makes the letter popup include both the symbol key's label and all of its popup labels.

Changes

  • PopupSet.symbol: String?PopupSet.symbols: Collection<String>? (the existing // maybe list of keys? TODO comment hinted at this).
  • KeyboardParser.addSymbolPopupKeys (and the number-row-in-symbols branch of addNumberRowOrPopupKeys) now collect key.label plus key.popup.getPopupKeyLabels(params).
  • PopupKeysUtils.createPopupKeysArray uses addAll(symbols); getHintLabel keeps a single hint via firstOrNull().

The change is local to the symbols-popup pipeline and doesn't touch any other popup source (number / layout / language / language priority).

Test

  • ./gradlew :app:compileStandardDebugKotlin succeeds.
  • ./gradlew :app:testStandardDebugUnitTest: the 9 failures present are the same ones present on main before this patch (unrelated — LayoutUtils.getContent cannot find layout assets in the test classpath, plus a couple of pre-existing emoji/input-logic failures). No new regressions.
  • Manually verified by reading the symbols layout file: e.g. q (row 0, col 0) now offers % and ; f (row 1, col 3) offers _, %, ; b (row 2, col 5) offers -, , , , ·.

Disclosure

This patch was AI-assisted: investigation and code changes were produced with GitHub Copilot CLI. I reviewed the diff before opening the PR.

Fixes #113

When long-pressing a letter, the popup keyboard now includes all
symbols defined at the corresponding position in the symbols layout,
not just the primary label. Previously a symbols-layout entry such as
`% per` or `( < { [` only contributed its first label to the
letter's popup; the symbol key's own popup keys were discarded.

addSymbolPopupKeys (and the number-row-in-symbols branch of
addNumberRowOrPopupKeys) now collect both the symbol key's label and
its popup labels via PopupSet.getPopupKeyLabels. PopupSet.symbol is
renamed to PopupSet.symbols and changed from String? to
Collection<String>?. createPopupKeysArray addAll's them; getHintLabel
keeps a single-character hint via firstOrNull().

Fixes LeanBitLab#113

Assisted-by: GitHub Copilot CLI
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@LeanBitLab LeanBitLab merged commit 5f2ea0e into LeanBitLab:main May 18, 2026
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.

Symbols only showing one option (details inside)

2 participants