fix(ios-chat): move keyboard-dismiss chevron to leading edge (#57)

The keyboard accessory dismiss button added in #51 was placed at
the trailing edge of the keyboard toolbar (Spacer before Button),
which sits directly above the trailing-edge send button in the
composer below. Two near-identical-shape controls visually stack
on the right edge of the screen, confusing users about which is
which.

Move the Spacer() to AFTER the Button so the chevron lives at the
leading edge of the keyboard accessory bar — visually separated
from the send button below, and matches the iOS convention (Notes,
Mail, Reminders all put accessory dismiss on the leading side).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alan Wizemann
2026-04-29 13:16:19 +02:00
parent 61e61f556a
commit c31dfccb9b
+7 -2
View File
@@ -441,16 +441,21 @@ struct ChatView: View {
// shows a keyboard accessory toolbar above the system // shows a keyboard accessory toolbar above the system
// keyboard whenever a focused TextField is on screen; // keyboard whenever a focused TextField is on screen;
// putting a "Done" chevron there is the most-discoverable // putting a "Done" chevron there is the most-discoverable
// dismissal pattern (issue #51). // dismissal pattern (issue #51). Pinned to the LEADING
// edge (Spacer trails) so the chevron doesn't visually
// stack above the trailing-edge send button in the
// composer below that stacking was the complaint in
// issue #57. Matches iOS convention (Notes, Mail, Reminders
// all put accessory dismiss on the leading side).
.toolbar { .toolbar {
ToolbarItemGroup(placement: .keyboard) { ToolbarItemGroup(placement: .keyboard) {
Spacer()
Button { Button {
composerFocused = false composerFocused = false
} label: { } label: {
Image(systemName: "keyboard.chevron.compact.down") Image(systemName: "keyboard.chevron.compact.down")
} }
.accessibilityLabel("Hide keyboard") .accessibilityLabel("Hide keyboard")
Spacer()
} }
} }