Repository navigation
iOS: shrink accessory-bar buttons to min width + consistent icon sizes - #5599
lawrencecchen wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 2 minutes and 5 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryTightens the iOS terminal accessory bar by making every button content-hugging (min 34pt floor, down from a 44pt fixed/floor) and unifying all SF Symbol rendering to one shared 13pt/medium config.
Confidence Score: 5/5Safe to merge — iOS-only UIKit layout change with no logic mutations and correct accessibility/localization handling. All three changed files are narrow and coherent: layout constants change, arrow keys gain SF Symbols and localized VoiceOver labels, and the string catalog adds the expected en+ja entries. No actor isolation, blocking runtime, or state-mutation issues are introduced. The only discrepancy worth a quick check is that the PR description says 14pt but the committed symbol config is 13pt — a description drift, not a code defect. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[TerminalInputTextView setupInputAccessoryView] --> B[makeAccessoryButton for builtin action]
A --> C[makeCustomAccessoryButton for CustomToolbarAction]
A --> D[makeToolbarSettingsButton]
A --> E[dismissButton UIButton.system]
B --> F{applyAccessoryButtonStyle}
C --> F
D --> G[plain UIButton.Configuration with slider.horizontal.3]
F --> H{action.symbolName?}
H -- yes --> I[config.image = SF Symbol @ 13pt]
H -- no --> J[config.attributedTitle = text @ 14pt font]
I --> K[width >= 34pt]
J --> K
G --> K
E --> L[setImage @ 13pt no UIButton.Configuration]
Reviews (2): Last reviewed commit: "iOS: shrink accessory-bar buttons to min..." | Re-trigger Greptile |
Every terminal accessory-bar button now sizes to its intrinsic content plus one shared compact horizontal inset, instead of being pinned wide. Width: - Tab/Esc/^C/^D and other text buttons were floored at accessoryButtonMinWidth (44pt via greaterThanOrEqualToConstant), so the short labels could not get narrower than 44pt. Modifier (⌃⌥⌘) and icon buttons (zoom/paste) were truly fixed at 44pt (equalToConstant). - All three creation paths (makeAccessoryButton, makeCustomAccessoryButton, makeToolbarSettingsButton) now use a single greaterThanOrEqualToConstant floor, lowered 44 -> 34 (tap-target minimum), so every button hugs its content and only floors when the glyph is tiny. - accessoryButtonContentInsets leading/trailing 10 -> 8 so the bar reads tight and uniform; this is what shrinks the already-wide "Tab". Icons: unify all SF Symbols under one shared symbol config. The keyboard toggle dropped from a private 16pt config to the shared 14pt config, and the arrow keys (↑↓←→) became arrow.up/down/left/right SF Symbols so they render at the same size as paste/zoom instead of as oversized Unicode glyphs. Arrow accessibility labels added (image-only buttons need them). Liquid Glass styling (#5536) and reorderable built-ins (#5579) are intact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6988ca4 to
e4e3208
Compare
Makes every terminal accessory-bar button hug its content (compact, min-width) and normalizes icon sizes. iOS-only change (lives entirely in
Packages/CmuxMobileTerminal,.iOS(.v18)); the macOS app does not build this package.Two dogfood reports this fixes:
accessoryButtonMinWidthviagreaterThanOrEqualToConstant), so short labels could never get narrower than 44pt. Modifier (⌃⌥⌘) and icon buttons (zoom/paste) were truly fixed at 44pt (equalToConstant). All three creation paths (makeAccessoryButton,makeCustomAccessoryButton,makeToolbarSettingsButton) now use a singlegreaterThanOrEqualToConstantfloor lowered 44 → 34 (a usable tap-target minimum), so every button sizes to its intrinsic content. The shared horizontal content inset dropped 10 → 8, which also tightens the wider text buttons like Tab. Floor removal is the lever for the short glyphs; the inset cut is what compacts the longer labels.accessoryButtonSymbolConfig, and its point size dropped 14 → 13: an SF Symbol's bounding box reads larger than text at the same size, so 13pt keeps paste/zoom/arrows/settings/keyboard-toggle visually in line with the 14pt text keys instead of looming over them. The keyboard toggle also dropped from its own private 16pt config onto the shared one. The arrow keys (↑↓←→) becamearrow.up/down/left/rightSF Symbols so they render at the same size as the other icons instead of as oversized Unicode glyphs. New localized accessibility labels (en + ja) added for the now-image-only arrow buttons.Liquid Glass styling (#5536) and the reorderable built-in behavior (#5579) are unchanged.
Trade-off: #5536 used fixed 44pt to keep single-glyph modifiers visually uniform. Going back to content-hugging may re-introduce small per-glyph width differences (⌃ vs ⌥ vs ⌘); the dogfood ask is explicitly compact over uniform, so that is accepted. The effective tap target is 34×28 (within the sanctioned 32-36 range); the visible chrome hugs content while staying tappable.
Verification: clean iOS simulator build (
cmux-ios, arm64). The exact symbol point size (13) is a visual dial; if the icons still read large next to the text, drop it to 12. That final call is dogfood (UIKit layout; not self-verifiable via the IOSurface-only debug screenshot path).Depends on #5579 (now merged); rebased onto
main.🤖 Generated with Claude Code