hex/ios/HEXMobileTests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 27ba512e45 Match Apple's long-press accent callout: arrangement, layout, timing
What: the accent callout now looks and behaves like the system keyboard's
(iOS 27.2 simulators, every English letter, digit and symbol key held and
screenshotted):
- Arrangement: options sit where Apple puts them, the key's own selected over
  the key (e: ë é [e] è ê ě ẽ ē ė ę; $: ₽ ¥ € [$] ¢ £ ₩; " « » „ “ ” ["]).
  "a" gets two rows (æ ã å ā ă ą over a à á â ä ǎ). The characters stay
  #2140's observed lists (KeyboardLanguage.letterHolds, symbolHolds, the
  123/#+= list). AccentCatalog.arrangement only places them, and only while its
  table lists exactly the same options, so a list change can't drop or invent
  one. Languages without a checked arrangement open from the key toward the
  middle, as before.
- Geometry: cells are the held key's width + 4 pt (36.3 on a 390 pt iPhone's
  letters, 51.7 on the wide . , ? ! ' keys, 67 in landscape). Rows are 47 pt
  with 10.5/10.35 pt padding and 20.8 pt corners, 3 pt above the key, kept
  6.67 pt from the sides. Sliding picks by row, then by nearest cell.
- Look: the selection is a grey rounded square (227/227/230, dark 87 grey,
  6.3 pt corners) behind 21.5 pt regular options, on the pop-up's bubble with no
  border. The dark callout lightens toward its bottom.
- Letting go more than 57.5 pt below the key's middle closes the callout with
  nothing typed (Apple: 55 pt types, 60 cancels).
- Hold delay 0.36 s: the callout replaces the pop-up about 380 ms in (Apple
  382, Hex was 420).
The emoji panel's skin-tone picker passes its own cell width and keeps its
layout and drawing unchanged (AccentMenu.buildFixed, drawFixed).

Removed: the blue selected cell with white medium text, the 1 px border, the
44 pt cells and 4 pt padding, and opening every list sideways from the key with
the base at the thumb end.

Why: press-and-hold visuals should match the system keyboard one to one.

Verified: 17e simulator screenshots of Apple vs Hex holds (e with slide and
drag-off cancel, a, n, u, k, $, 0, ", ', .), light and dark, and landscape (i).
The drag-off typed nothing on both. Updated testLongPressAccentPicker... for
Apple's arrangement. Full HEXMobileTests pass apart from #2142's emoji bar band
test, fixed with the key-plane geometry it depends on.

Rebased on #2164 and #2172: the arrangement is looked up for the layout's
language and letters, as the options are (the bilingual English & Spanish
keyboard holds English's; Spanish on plain QWERTY, whose n also holds ñ, opens
its own list). testEnglishOnQWERTZTypesOnItsOwnKeys checks the selected option
is the key's own instead of the first, since Apple's y reads ÿ ŷ ý [y].
2026-11-21 07:19:29 -05:00
..
Fixtures
AutocorrectEngineTests.swift
CleanupTaggerTests.swift
CustomVocabularyTests.swift
DictationControllerTests.swift
DictationLearningTests.swift
DotScopeTests.swift
EmojiSuggesterTests.swift
FullKeyboardEngineTests.swift
HexKeyGestureTests.swift
KeyboardBridgeTests.swift
KeyboardLayoutTests.swift
ShiftStateMachineTests.swift
SwipeDecoderTests.swift
TranscriptCleanupTests.swift
TypingLogTests.swift