mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* iOS: your text replacements win over chat shorthand
Hex leaves chat shorthand alone (brb, omg, idk, btw, … in shorthandAllowlist) so
autocorrect never turns it into a dictionary word, but that guard ran before the
text replacement lookup, so a user's own replacement with such a shortcut
("brb" -> "be right back") never applied, with Autocorrect on or off. Apple's
keyboard applies every text replacement (black box, iOS 27.2 sim: "Brb" offers and
becomes "Be right back").
Now the user's UILexicon shortcut is checked before the shorthand guard, on space
and punctuation and in the strip; only lexicon entries get past it, never Hex's own
corrections, so shorthand without a replacement ("idk") still stays as typed.
Words you kept (a tapped literal, an undone fix, Learn how I type's rejections)
still block the replacement, as before.
Verified: new AutocorrectEngineTests case (brb with Autocorrect on, omg with it off,
idk untouched, one backspace restores the shortcut); full HEXMobileTests suite
(465 tests) passes on the branch; live in Messages on an iOS 27.2 sim with a "brb"
text replacement added in Settings: Hex offers and applies it with Autocorrect on
and off.
* iOS: with Autocorrect off, the strip offers completions but no fixes
With Settings > Keyboard > Autocorrect off, Hex's strip still offered every fix it
would have applied, just without applying it: spelling guesses ("One" for "omw"),
contractions ("don't" for "dont"), learned typo fixes and Spatial autocorrect's
readings.
Apple's keyboard with Auto-Correction off (black box, iOS 27.2 sim, Predictive Text
on) offers what you typed, your text replacements and completions, and no fix:
"teh" and "dont" get nothing (with Auto-Correction on: "The", "Don't"), "im" gets
"Imagine" but no "I'm", "th" gets "The", "This", "omw" only "On my way!". Its
completions tolerate a slip ("wierd": Weird, Weirdly), which UITextChecker's
completions can't; Hex keeps its prefix completions only.
So with Autocorrect off the strip now holds the typed word, a text replacement and
completions (UITextChecker's and the typing model's short-prefix completion); learned
fixes, suggest-only contractions, Spatial readings and spelling guesses need
Autocorrect on, in either language of bilingual autocorrect. With Autocorrect on
nothing changes.
The old testTurningAutocorrectSettingOffKeepsSuggestionsWithoutAutoReplacing
expected a "dont" suggestion with Autocorrect off; it is replaced by
testTurningAutocorrectSettingOffKeepsCompletionsWithoutFixes, which checks the new
behaviour (no "don't", no "the" for "teh", "the" for "th", fixes back once on).
Verified: AutocorrectEngineTests and the full HEXMobileTests suite (465 tests) pass;
live in Messages on an iOS 27.2 sim with Hex's Autocorrect off: "Teh" and "Dont"
show only themselves, "Th" offers The and That, "Im" Important and Image, "Omw" only
"On my way!".
|
||
| .. | ||
| 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 | ||