Repository navigation
iOS: a balanced top bar, with a small chip for an autocorrection - #2207
Merged
Merged
Conversation
Centred in the strip (#2204), the words sat 5.5 pt below Apple's line with more room above than below them, and the slot-wide pill, cut short by the band iOS draws over a third-party keyboard, read as squashed (Ryan, from his iPhone). Apple's words sit midway between the panel's edge and row 1's keycaps, so Hex's now do too (26 pt above row 1, 9 pt below the band), and everything in the bar centres on that line, evenly above and below it: - an autocorrection, a pressed word and a revert get a small chip around the word, 18 pt tall (Ryan's pick of four marks, rendered side by side), replacing the slot-wide pill; - the dividers are as tall as the chip and stay beside it (not beside a revert); - the Hex mark and its pressed chip sit on the same line. Elsewhere (landscape, the Duo) the line is the strip's middle and the chip the pill height. Verified in the iOS 27.2 simulator (iPhone 17 Pro, a third-party host app): words 20-32 pt below the panel's edge (Apple's 19-31.7), the chip and mark centred on them (chip-balanced.png at hex-kb.i.vogel.dev).
R44VC0RP
added a commit
that referenced
this pull request
Nov 21, 2026
…ste, and typing logs off (#2210) * iOS: hold an empty part of the top bar to dictate A tester found the Hex key (44 pt, in the strip) too small to hit quickly. A still hold of 0.4 s (Apple's long press) anywhere on the bar with no word under it now dictates exactly as holding the Hex key does: hold to talk, release to finish. It reuses the Hex key's own path: a HexKeyGesture fed by FullKeyboardView's touches, then the key's press (in-keyboard dictation arms) and hexKeyHeld / hexKeyReleased, so without Full Access it shows the Full Access hint, and a hold that can only open Hex opens Hex, as the key does. The empty space is every touch nothing else takes in the bar: empty slots (their buttons take no touches), the strip around Paste, Undo or a status, the gaps beside the Hex key, and a bar with no suggestions. A word's slot keeps its tap and its hold (Add to vocabulary, #2205). A tap on empty space does nothing, and a slide past 10 pt cancels the hold. No hold while the bar shows the Full Access hint or a notice, while a dictation records or transcribes, or with the emoji panel or style menu up. Typing logs name the source (bar_hold / bar_release). Verified in the iOS 27.2 simulator (iPhone 17 Pro, a UIKit host app, Hex keyboard with Full Access): holding an empty slot showed the recording panel and releasing finished it; holding a suggestion ("The") and tapping empty space did nothing; holds in the 2 pt gap left of the Hex key and past its right edge took the Hex key's path (opened Hex, as the key does once in-keyboard dictation is unavailable). On origin/dev the same hold did nothing. * iOS: Learn how I type is on by default Settings › Privacy › Learn how I type now reads on when the switch was never set (no key in the App Group: true). The toggle saves an explicit false when turned off (UserDefaults.set on change), so "off" and "never set" are distinct and nobody who turned it off is switched back on; no migration is needed. Without an App Group (no Full Access) it stays off, as there is nowhere to learn. Every reader goes through TypingJournalSettings.isEnabled, so both sides follow it: typing (TypingJournal.sharedIfEnabled in the full keyboard) and dictation (the keyboard's DictationEditInference tracking in learnsFromDictation, its learned fixes for in-keyboard dictation, and the app's DictationPipeline fixes and raw-transcript sharing in DictationController). The switch's line now says what it does: "Learns on this iPhone from your taps and the words you fix with Hex, never from what you write elsewhere" (zh-Hans added; the old line is removed from the catalog). Verified: TypingJournalLearningTests.testLearnHowITypeIsOnUntilTurnedOff (an unset switch learns, one turned off stays off and stores nothing) in the full xcodebuild test run. * iOS: the bar's Paste is plain text, centred on the keyboard The clipboard offer drew Paste as a chip (a filled background with a 15 pt corner radius, 12.5 pt medium type) and centred it in the strip's bounds, which leave out the Hex key, so it sat visibly left of the middle. Ryan wanted no chip: plain text in the bar like a suggestion word. - Paste (and Paste dictation) is now SF 17 pt regular in the bar words' ink (palette.stripText), with no background. The clipboard glyph stays, sized to the text's font (small scale), since it sits on the line beside the word. - Paste and the Next keyboard chip (or the pair in a code field) centre on the keyboard's middle, where the middle slot's word centres (KeyboardStripView.barMidX = stripBarFrame.midX in the strip's coordinates), clamped inside the strip. - Their line stays the bar's word line (textCenterY, KeyboardMetrics.stripTextCenter from #2207); the chip and line geometry of #2207 is unchanged. Verified in the iOS 27.2 simulator (iPhone 17 Pro, a copied string through simctl pbcopy): before, the chip spanned x 126-219 pt of a 402 pt keyboard (centre 172); after, glyph and word span 169-232 (centre 201, the keyboard's middle), on the same line as "The" in the middle slot. * iOS: turn Record typing logs off once for everyone The bar's "● Logging" mark shows while Settings › Privacy › Advanced › Record typing logs is on, and Ryan wants it gone. A one-time migration, TypingLogSettings.turnOffOnce, switches the setting off for anyone who has it on and records migrations.typingLogsOff.v1 in the App Group so it never runs again: turning it back on afterwards keeps it on. It runs where either process starts, the app's launch (before the simulator scenes' launch argument) and the keyboard's viewDidLoad (before any typing log session), so a keyboard updated before Hex is opened drops the mark too. The logs already recorded stay, and so does the switch in Settings. Nothing in a build turns it on: the key is set to true only by the switch's consent dialog, the simulator-only --experiment-typing-logs launch argument, and the Settings snapshot fixtures (settings-*-on scenes); no scheme, ci_scripts or Xcode Cloud step passes either, so there was no build or TestFlight default to remove. Verified: TypingLogTests.testTypingLogsTurnOffOnceAndKeepWhatTheyRecorded in the full xcodebuild test run, and in the iOS 27.2 simulator: with experiments.typingLogs set to true and the flag removed from the keyboard's defaults, showing the keyboard left it false and the flag true.
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.
The words go back on Apple's line, midway between the keyboard's edge and row 1, and everything in the bar centres on it evenly: an autocorrection, a pressed word and a revert get a small 18 pt chip around the word (replacing the slot-wide pill the iOS band cut short), dividers match the chip, and the Hex mark and its pressed chip sit on the same line. Landscape and the Duo keep their bar. Verified in the iOS 27.2 simulator: words 20–32 pt below the panel edge (Apple 19–31.7), chip and mark centred on them.